diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-01-31 22:45:52 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-02-19 02:18:40 +0100 |
commit | ebd5ed63decb90e26ae9129164214f9d7d684621 (patch) | |
tree | a4d8960a1c9f270315f9c9c3fff884b0198d9087 /TODO | |
parent | a0fd8875aabb244d35e2ddf785f546c336ed9622 (diff) | |
download | qpdf-ebd5ed63decb90e26ae9129164214f9d7d684621.tar.zst |
Add option to save pass 1 of lineariziation
This is useful only for debugging the linearization code.
Diffstat (limited to 'TODO')
-rw-r--r-- | TODO | 38 |
1 files changed, 0 insertions, 38 deletions
@@ -177,44 +177,6 @@ I find it useful to make reference to them in this list * See if we can avoid preserving unreferenced objects in object streams even when preserving the object streams. - * For debugging linearization bugs, consider adding an option to save - pass 1 of linearization. This code is sufficient. Change the - interface to allow specification of a pass1 file, which would - change the behavior as in this patch. - ------------------------------- -Index: QPDFWriter.cc -=================================================================== ---- QPDFWriter.cc (revision 932) -+++ QPDFWriter.cc (working copy) -@@ -1965,11 +1965,15 @@ - - // Write file in two passes. Part numbers refer to PDF spec 1.4. - -+ FILE* XXX = 0; - for (int pass = 1; pass <= 2; ++pass) - { - if (pass == 1) - { -- pushDiscardFilter(); -+// pushDiscardFilter(); -+ XXX = QUtil::safe_fopen("/tmp/pass1.pdf", "w"); -+ pushPipeline(new Pl_StdioFile("pass1", XXX)); -+ activatePipelineStack(); - } - - // Part 1: header -@@ -2204,6 +2208,8 @@ - - // Restore hint offset - this->xref[hint_id] = QPDFXRefEntry(1, hint_offset, 0); -+ fclose(XXX); -+ XXX = 0; - } - } - } ------------------------------- - * Provide APIs for embedded files. See *attachments*.pdf in test suite. The private method findAttachmentStreams finds at least cases for modern versions of Adobe Reader (>= 1.7, maybe earlier). |