mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-02 03:48:24 +00:00
save pass1 patch
git-svn-id: svn+q:///qpdf/trunk@931 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
58b08ca681
commit
3416c60fe9
54
TODO
54
TODO
@ -1,9 +1,3 @@
|
||||
2.1
|
||||
===
|
||||
|
||||
* Remove rc1 from version; search for rc1 in release notes as
|
||||
well...just change rc1 to 2.1 and update the date.
|
||||
|
||||
2.2
|
||||
===
|
||||
|
||||
@ -21,6 +15,54 @@
|
||||
General
|
||||
=======
|
||||
|
||||
* 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 920)
|
||||
+++ QPDFWriter.cc (working copy)
|
||||
@@ -1958,11 +1960,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 = fopen("/tmp/pass1.pdf", "w");
|
||||
+ pushPipeline(new Pl_StdioFile("pass1", XXX));
|
||||
+ activatePipelineStack();
|
||||
}
|
||||
|
||||
// Part 1: header
|
||||
@@ -2037,7 +2043,8 @@
|
||||
t_lin_first, first_half_start, first_half_end,
|
||||
first_trailer_size,
|
||||
hint_length + second_xref_offset,
|
||||
- hint_id, hint_offset, hint_length);
|
||||
+ hint_id, hint_offset, hint_length,
|
||||
+ (pass == 1));
|
||||
int endpos = this->pipeline->getCount();
|
||||
if (pass == 1)
|
||||
{
|
||||
@@ -2187,6 +2194,8 @@
|
||||
|
||||
// Restore hint offset
|
||||
this->xref[hint_id] = QPDFXRefEntry(1, hint_offset, 0);
|
||||
+ fclose(XXX);
|
||||
+ XXX = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
------------------------------
|
||||
|
||||
* Handle embedded files. PDF Reference 1.7 section 3.10, "File
|
||||
Specifications", discusses this. Once we can definitely recongize
|
||||
all embedded files in a docucment, we can update the encryption
|
||||
|
Loading…
x
Reference in New Issue
Block a user