<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:Thomas.Freitag@alfa.de" title="Thomas Freitag <Thomas.Freitag@alfa.de>"> <span class="fn">Thomas Freitag</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - PDFDoc::saveIncrementalUpdate() saves the trailer dict twice"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96529">bug 96529</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>NOTABUG
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - PDFDoc::saveIncrementalUpdate() saves the trailer dict twice"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96529#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED NOTABUG - PDFDoc::saveIncrementalUpdate() saves the trailer dict twice"
href="https://bugs.freedesktop.org/show_bug.cgi?id=96529">bug 96529</a>
from <span class="vcard"><a class="email" href="mailto:Thomas.Freitag@alfa.de" title="Thomas Freitag <Thomas.Freitag@alfa.de>"> <span class="fn">Thomas Freitag</span></a>
</span></b>
<pre>(In reply to Jakub Kucharski from <a href="show_bug.cgi?id=96529#c4">comment #4</a>)
<span class="quote">> A bit more reading of PDF reference and:
> "In an incremental update, any new or changed objects are appended to the
> file, a
> cross-reference section is added, and a new trailer is inserted."
> So this seems ok. Sorry for the trouble. But to make it a bit clearer: why
> is the "0000000000 65535 f" (always) added (line 942 in poppler/PDFDoc.cc)?</span >
You should read the spec carefully, then You will find the following sentence:
The first entry in the table (object number 0) shall always be free and shall
have a generation number of 65,535;
And if You look at the code in PDFDoc.cc You will encounter that it is just
done and then always if a new XRef() object is created to ensure this.
And it seems as if You haven't understand the PDFWriteMode parameter of saveAs.
If it is writeForceRewrite it will completely rewrite the complete PDF and You
will find just one trailerDict and xref section, otherwise it uses an
incremental update and just appends modified/new objects, of course the new
trailer dict and the xref section!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>