[poppler] API for outline/table of contents modification
Oliver Sander
oliver.sander at tu-dresden.de
Sun May 2 15:08:13 UTC 2021
Hi Rob,
> 2. After writing a bit of code to add an outline and save the
> resulting PDF, the file had a trailer section which referred to the
> new Catalog dictionary as expected. However, the new Catalog
> dictionary had the same object and generation numbers as the old one.
> So there were now two 'obj 1 0' in the file; is this expected
> behavior?
I don't think it is. And from my understanding of the spec the generation
number is practically always 0, so incrementing it may not be the
correct solution.
It will be easier to help you if we can see your code.
Maybe you can share your current patch at
https://gitlab.freedesktop.org/poppler/poppler
Best,
Oliver
>
> Seems like the generation number should be incremented so it's
> unambiguous. (The PDF spec seems to indicate the generation number gets
> bumped only when an object is freed so I'm unsure).
>
>
> thanks,
> Rob
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5198 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20210502/3ec9c379/attachment.bin>
More information about the poppler
mailing list