From 1a952619c93e90c355532210a3160b539d73e8e0 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Sun, 20 Jun 2021 17:30:14 +0100 Subject: [PATCH] more --- Changes | 3 ++- cpdfwriteJSON.ml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ab62ebd..1beeaab 100644 --- a/Changes +++ b/Changes @@ -5,10 +5,11 @@ o Optional Content Groups now preserved when merging / stamping pages o Listing, coalescing and modfying Optional Content Groups. o New -labels-progress option to improve page labels interface o New options -output-json et al. to export PDF files in JSON format +o New options to manipulate Optional Content Groups o New option -stamp-as-xobject to add one PDF as an xobject in another o No longer depends on Bigarray or Unix modules o Appearance streams transformed when transforming annotations -o Bookmark desitination positions transformed when transforming pages +o Bookmark destination positions transformed when transforming pages Version 2.3 (patchlevel 1, December 2019) diff --git a/cpdfwriteJSON.ml b/cpdfwriteJSON.ml index e5183d1..99f7d76 100644 --- a/cpdfwriteJSON.ml +++ b/cpdfwriteJSON.ml @@ -187,6 +187,9 @@ let json_of_pdf parse_content no_stream_data pdf = iter (fun n -> Pdfcodec.decode_pdfstream_until_unknown pdf (P.lookup_obj pdf n)) !content_streams; let pairs_parsed = if not parse_content then pairs else + (* FIXME. Here we must combine all the streams together, using a new + object number. This is so that the parsing can parse things split + across streams. *) map (fun (objnum, obj) -> if mem objnum !content_streams then