From b71cef856bf666824523bed445cffdbdd0871e0f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 18 Apr 2010 23:19:54 +0000 Subject: 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 --- libqpdf/QPDFWriter.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libqpdf') diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 786d4e8c..8468459c 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -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(); } -- cgit v1.2.3-54-g00ecf