25 ms·
pdfs are really really hard. the only viewer that parses them semi-correctly is ... Acrobat Reader. try to ever read any code for PDFs and see all the horrors.
by trustno2 2y ago
pdfs are really really hard. the only viewer that parses them semi-correctly is ... Acrobat Reader.
try to ever read any code for PDFs and see all the horrors.
Google gave up and just bought the code from foxit.
- kjksf 2y agoGoogle was never trying to write PDF reader from scratch so they never "gave up". They just bought foxit code to save years of development when they wanted to ship PDF reader in Chrome. Your comment about "the only viewer that is semi-correct" is also wildly off the mark. Parsing correctly written PDF files is hard but multiple engines can do it correctly. Parsing real life PDFs is much harder then correctly implementing PDF spec because lots of PDFs are just broken. They generators create invalid PDF files and then PDF readers have to spend heroic efforts to somehow make sense of this brokenness. Adobe does it better than most because... well it would be embarrassing if they didn't. They invented the format, they make money from their tools, they were doing it the longest, they have the largest archive of broken PDFs for testing etc. It's hard to expect that e.g. an open-source project with one or two developers can match that. I work on SumatraPDF so I know.
- trustno2 2y agoOK. In one of my previous jobs, I needed to auto-fill PDF forms on BE (among other things with PDFs), the only thing that worked reliably across PDFs was Acrobat. I did not try SummatraPDF. edit: it seems Summatra doesn't support PDF forms? Either AcroForms or XFA forms?