mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-02 22:50:20 +00:00
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
This commit is contained in:
parent
84353451a3
commit
b71cef856b
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2010-04-18 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* 2.1.4: release
|
||||
|
||||
* libqpdf/QPDFWriter.cc (writeLinearized): the padding calculation
|
||||
fix in 2.1.2 was applied in only one place but it was needed in
|
||||
two places since there are actually two cross reference streams in
|
||||
a linearized file. The new padding calculation is now used for
|
||||
both streams. Hopefully this should put an end to linearization
|
||||
padding problems. (Fixes qpdf-Bugs-2979219.)
|
||||
|
||||
2010-04-10 Jay Berkenbilt <ejb@ql.org>
|
||||
|
||||
* qpdf/qpdf.cc (main): Since qpdf --check only checks syntax and
|
||||
|
@ -2145,18 +2145,16 @@ QPDFWriter::writeLinearized()
|
||||
writeXRefStream(second_half_xref,
|
||||
second_half_end, second_xref_offset,
|
||||
t_lin_second, 0, second_half_end,
|
||||
second_trailer_size/*,
|
||||
0, 0, 0, 0, (pass == 1)*/);
|
||||
/// int endpos = this->pipeline->getCount();
|
||||
second_trailer_size,
|
||||
0, 0, 0, 0, (pass == 1));
|
||||
int endpos = this->pipeline->getCount();
|
||||
|
||||
if (pass == 1)
|
||||
{
|
||||
// Pad so we have enough room for the real xref
|
||||
// stream. See comments for previous xref stream on
|
||||
// how we calculate the padding.
|
||||
|
||||
/// writePad(calculateXrefStreamPadding(endpos - pos));
|
||||
writePad(99);
|
||||
writePad(calculateXrefStreamPadding(endpos - pos));
|
||||
writeString("\n");
|
||||
second_xref_end = this->pipeline->getCount();
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user