From 85d323ddb58f1a611b993a1b4fb15f0e4393ca2b Mon Sep 17 00:00:00 2001 From: John Whitington Date: Sun, 9 Jan 2022 12:27:27 +0000 Subject: [PATCH] more --- cpdftoc.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/cpdftoc.ml b/cpdftoc.ml index 93a7309..c45b0ed 100644 --- a/cpdftoc.ml +++ b/cpdftoc.ml @@ -60,6 +60,7 @@ let typeset_table_of_contents ~font ~fontsize ~title ~bookmark pdf = let indent = float mark.Pdfmarks.level *. fontsize *. 2. in let text = of_pdfdocencoding f mark.Pdfmarks.text in let label = + if mark.Pdfmarks.target = NullDestination then [' '] else let pde = let pnum = Pdfpage.pagenumber_of_target ~fastrefnums pdf mark.Pdfmarks.target in try Pdfpagelabels.pagelabeltext_of_pagenumber pnum labels with Not_found -> string_of_int pnum