From 35d16755535351047b167b1e8562bd6eae816a4f Mon Sep 17 00:00:00 2001 From: John Whitington Date: Mon, 22 Nov 2021 15:56:40 -0800 Subject: [PATCH] more --- cpdfcommand.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index b80d221..1169817 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -2950,6 +2950,8 @@ let typeset text = Pdfpage.add_root pageroot [] pdf let typeset_table_of_contents pdf = + let marks = Pdfmarks.read_bookmarks pdf in + if marks = [] then (Printf.eprintf "No bookmarks, not making table of contents\n%!"; pdf) else let f = (Pdftext.StandardFont (Pdftext.Courier, Pdftext.WinAnsiEncoding), 10.) in let firstpage = hd (Pdfpage.pages_of_pagetree pdf) in let firstpage_papersize =