From 344ea8524a406f96997d9bc2b3fe50191891cd8d Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 3 Jul 2019 17:43:36 +0100 Subject: [PATCH] Better destination handling for bookmarks --- cpdf.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpdf.ml b/cpdf.ml index b47dcd6..51118b4 100644 --- a/cpdf.ml +++ b/cpdf.ml @@ -1278,7 +1278,8 @@ let list_bookmarks encoding range pdf output = let inrange = keep (function x -> - x.Pdfmarks.target = Pdfdest.NullDestination || + x.Pdfmarks.target = Pdfdest.NullDestination || + (match x.Pdfmarks.target with Pdfdest.NamedDestinationElsewhere _ -> true | _ -> false) || Hashtbl.mem rangetable (Pdfpage.pagenumber_of_target ~fastrefnums pdf x.Pdfmarks.target)) bookmarks in iter