On Wed, 27 Apr 2022 at 18:27, Michal Sudolsky <[email protected]> wrote:
> Attached are 6 PDF files and all of them open well in 3 pdf viewers I > tested. > Hello, sorry for resurrecting this old thread. Here[1] you can find the old Michael's message as it was answered by me (unfortunately the original wasn't persisted in the archives for some reason). Shortly: all parsing issues with those attached files are solved and unit tested in PoDoFo. We also have a new recovery algorithm[2] that tries to rebuild cross reference tables/streams in case reading the document structure fails for any reason, similarly to what major PDF implementations do. All of this will appear in PoDoFo 1.1. Also [...] rev.pdf [...] has reordered xref and trailer. Note that there is > nothing in the pdf specification which says that trailer and xref must be > in particular order just that trailer is before startxref. It also does not > say how far from the end can be trailer or startxref (only that %%EOF must > be within 1024 bytes). > I tend to disagree with the statement that the trailer can appear before xref, see ISO 32000-2:2020 "Figure 2 - Initial structure of a PDF" file or any previous PDF reference. This file is opened in recovery mode in pdf.js (as it was broken) and that's the approach I decided to follow in PoDoFo as well. [1] https://www.mail-archive.com/[email protected]/msg04811.html [2] https://github.com/podofo/podofo/commit/449622d57e7cfe8e4ec6fbd795832d3f4b8e736b
_______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
