This commit is contained in:
John Whitington 2022-01-09 12:27:27 +00:00
parent 1c66d292b7
commit 85d323ddb5
1 changed files with 1 additions and 0 deletions

View File

@ -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