Commit b71cef856bf666824523bed445cffdbdd0871e0f
1 parent
84353451
fix linearization padding bug for second xref stream as well as first, which was previously fixed
git-svn-id: svn+q:///qpdf/trunk@957 71b93d88-0707-0410-a8cf-f5a4172ac649
Showing
6 changed files
with
15 additions
and
6 deletions
ChangeLog
| 1 | +2010-04-18 Jay Berkenbilt <ejb@ql.org> | |
| 2 | + | |
| 3 | + * 2.1.4: release | |
| 4 | + | |
| 5 | + * libqpdf/QPDFWriter.cc (writeLinearized): the padding calculation | |
| 6 | + fix in 2.1.2 was applied in only one place but it was needed in | |
| 7 | + two places since there are actually two cross reference streams in | |
| 8 | + a linearized file. The new padding calculation is now used for | |
| 9 | + both streams. Hopefully this should put an end to linearization | |
| 10 | + padding problems. (Fixes qpdf-Bugs-2979219.) | |
| 11 | + | |
| 1 | 12 | 2010-04-10 Jay Berkenbilt <ejb@ql.org> |
| 2 | 13 | |
| 3 | 14 | * qpdf/qpdf.cc (main): Since qpdf --check only checks syntax and | ... | ... |
libqpdf/QPDFWriter.cc
| ... | ... | @@ -2145,18 +2145,16 @@ QPDFWriter::writeLinearized() |
| 2145 | 2145 | writeXRefStream(second_half_xref, |
| 2146 | 2146 | second_half_end, second_xref_offset, |
| 2147 | 2147 | t_lin_second, 0, second_half_end, |
| 2148 | - second_trailer_size/*, | |
| 2149 | - 0, 0, 0, 0, (pass == 1)*/); | |
| 2150 | -/// int endpos = this->pipeline->getCount(); | |
| 2148 | + second_trailer_size, | |
| 2149 | + 0, 0, 0, 0, (pass == 1)); | |
| 2150 | + int endpos = this->pipeline->getCount(); | |
| 2151 | 2151 | |
| 2152 | 2152 | if (pass == 1) |
| 2153 | 2153 | { |
| 2154 | 2154 | // Pad so we have enough room for the real xref |
| 2155 | 2155 | // stream. See comments for previous xref stream on |
| 2156 | 2156 | // how we calculate the padding. |
| 2157 | - | |
| 2158 | -/// writePad(calculateXrefStreamPadding(endpos - pos)); | |
| 2159 | - writePad(99); | |
| 2157 | + writePad(calculateXrefStreamPadding(endpos - pos)); | |
| 2160 | 2158 | writeString("\n"); |
| 2161 | 2159 | second_xref_end = this->pipeline->getCount(); |
| 2162 | 2160 | } | ... | ... |
qpdf/qtest/qpdf/c-linearized.pdf
No preview for this file type
qpdf/qtest/qpdf/lin-special.generate.exp
No preview for this file type
qpdf/qtest/qpdf/object-stream.generate.exp
No preview for this file type
qpdf/qtest/qpdf/object-stream.preserve.exp
No preview for this file type