From 7adcd233889a910a4d2ee23206b34c2c7c4cbe2b Mon Sep 17 00:00:00 2001 From: John Whitington Date: Fri, 12 May 2023 14:04:14 +0100 Subject: [PATCH] more --- cpdfdraw.ml | 9 +++++++-- cpdfmanual.tex | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cpdfdraw.ml b/cpdfdraw.ml index 993c256..9ece3fc 100644 --- a/cpdfdraw.ml +++ b/cpdfdraw.ml @@ -290,8 +290,13 @@ let minimum_resource_number pdf range = | [] -> 0 | n::_ -> n + 1 -let contains_specials drawops = - List.exists (function SpecialText _ -> true | _ -> false) drawops +let rec contains_specials_drawop = function + | SpecialText _ -> true + | Qq l | TextSection l | FormXObject (_, _, _, _, _, l) -> contains_specials l + | _ -> false + +and contains_specials l = + List.exists contains_specials_drawop l let draw_single ~fast ~underneath ~filename ~bates ~batespad fast range pdf drawops = (res ()).num <- max (res ()).num (minimum_resource_number pdf range); diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 09315e3..a67c4cf 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -16,6 +16,7 @@ %Document -text-width %Error handling for png /jpeg loaders %-underneath for -draw +%URLs don't work in -draw for now \documentclass{book} % Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf, % dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.