Better verification of bookmark files

This commit is contained in:
John Whitington 2019-07-02 18:37:08 +01:00
parent 80e7b0de32
commit 3139556838
1 changed files with 3 additions and 1 deletions

View File

@ -984,7 +984,9 @@ let rec verify_bookmarks pdf lastlevel fastrefnums endpage = function
let verify_bookmarks pdf lastlevel endpage marks =
let refnums = Pdf.page_reference_numbers pdf in
let fastrefnums = hashtable_of_dictionary (combine refnums (indx refnums)) in
verify_bookmarks pdf lastlevel fastrefnums endpage marks
match marks with
| [] -> true
| m::more -> m.Pdfmarks.level = 0 && verify_bookmarks pdf lastlevel fastrefnums endpage more
(* Parse a line of the bookmarks file. *)