Hi Andreas

>  Due to signed NDAs, I cannot send you the PDF. If we can't solve the
> > issue, I'll try to generate a stripped down version for you, however
> that's
> > going to take a day or so, and I have other pending issues which I'd like
> > to address first, as the deadline for the final delivery of the tool is
> now
> > definitely coming up.
> OK, I see you are not using an incremental update feature. The name of the
> modified method "doWriteXRefInc" pretends to be limited to incremental
> updates,
> but it isn't.
>

I have uploaded the PDFs here (for a limited time):

​
 ccalt-simple.pdf
<https://drive.google.com/file/d/0B7Bzk_1dcyc5RmcyWVo1ZURyV0k/view?usp=drive_web>
​​
 cctemp-simple.pdf
<https://drive.google.com/file/d/0B7Bzk_1dcyc5UHUtNWh6ampVMnc/view?usp=drive_web>
​

You should already have the code to reproduce my issue from a previous
email to this thread.


> >
> > > I just had another idea. Can you please check the following change
> > >
> > > if (trailer.getItem(COSName.PREV != null))
> > > {
> > >     trailer.setLong(COSName.PREV, doc.getStartXref())
> > > }
> > >
> > >
> > I modified to the following code, so it compiles:
> >
> > COSDictionary trailer = doc.getTrailer();
> > // use previous startXref value as new PREV value
> > //trailer.setLong(COSName.PREV, doc.getStartXref());
> > //trailer.removeItem(COSName.PREV);
> > if (trailer.getItem(COSName.PREV) != null)
> > {
> >     trailer.setLong(COSName.PREV, doc.getStartXref());
> > }
> >
> > No change, it still breaks my simple test case.
> I'm not at home, so that I can't check that myself, but I guess the
> following
> should do the trick
> if (incrementalUpdate)
> {
>     trailer.setLong(COSName.PREV, doc.getStartXref());
> }


Nope, this does not work either. The following does, but that's probably
not what you had in mind:

if (incrementalUpdate) {
   trailer.setLong(COSName.PREV, doc.getStartXref());
} else {
   trailer.removeItem(COSName.PREV);
}

Cheers
Roberto

Reply via email to