From 1e361059fc90b1593de76da9bb63f834db72b232 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Mon, 8 May 2023 14:39:37 +0100 Subject: [PATCH] more --- cpdfdraw.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpdfdraw.ml b/cpdfdraw.ml index a05bafe..969bb2b 100644 --- a/cpdfdraw.ml +++ b/cpdfdraw.ml @@ -186,6 +186,9 @@ let rec ops_of_drawop pdf endpage filename bates batespad num page = function and ops_of_drawops pdf endpage filename bates batespad num page drawops = flatten (map (ops_of_drawop pdf endpage filename bates batespad num page) drawops) +(* 1. We want resources to be created locally to the xobject, not on the page so it may be shared between pages. + a. make sure none are added to the page + b. make sure we collect them and add them to the xobject *) and create_form_xobject a b c d pdf endpage filename bates batespad num page n ops = let data = Pdfio.bytes_of_string (Pdfops.string_of_ops (ops_of_drawops pdf endpage filename bates batespad num page ops))