From d1236186ccd75e3342b6257e6e2d2656bcb36bba Mon Sep 17 00:00:00 2001 From: John Whitington Date: Fri, 21 Jul 2023 15:21:09 +0100 Subject: [PATCH] Clear font cache on initialisation --- cpdftoc.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/cpdftoc.ml b/cpdftoc.ml index 8bf0183..caf5a98 100644 --- a/cpdftoc.ml +++ b/cpdftoc.ml @@ -99,6 +99,7 @@ let used pdf fastrefnums labels title marks = CropBox. Font size of title twice body font size. Null page labels added for TOC, others bumped up and so preserved. *) let typeset_table_of_contents ~font ~fontsize ~title ~bookmark pdf = + Hashtbl.clear width_table_cache; let marks = Pdfmarks.read_bookmarks pdf in if marks = [] then (Pdfe.log "No bookmarks, not making table of contents\n"; pdf) else let labels = Pdfpagelabels.read pdf in