From cd4060c98ed0ddeb7c779235e05bad5e0e633e1e Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 30 Mar 2023 13:39:52 +0100 Subject: [PATCH] more --- cpdfpagespec.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpdfpagespec.ml b/cpdfpagespec.ml index ee5c34e..bca0e05 100644 --- a/cpdfpagespec.ml +++ b/cpdfpagespec.ml @@ -205,7 +205,7 @@ endpage of the PDF (which we don't have). Pass 100 as the endpage, doubling on page range exception, bailng out above 500000. *) let rec validate_pagespec_inner n spec = try - ignore (parse_pagespec_inner n (Pdf.empty ()) spec); true + ignore (parse_pagespec_inner n (Pdfpage.minimum_valid_pdf ()) spec); true with | PageSpecUnknownPage _ -> if n < 500000 then validate_pagespec_inner (n * 2) spec else false | PageSpecBadSyntax | _ -> false @@ -215,7 +215,7 @@ let validate_pagespec spec = let rec parse_pagespec_without_pdf_inner n spec = try - parse_pagespec_inner n (Pdf.empty ()) spec + parse_pagespec_inner n (Pdfpage.minimum_valid_pdf ()) spec with PageSpecUnknownPage _ -> if n < 500000