On 20.06.2024 23:42, Patrycja Zaremba wrote:
Is this an issue with PDF itself or the library?
Here is example of problematic PDF:
https://mega.nz/file/osthCK6Q#UVoaV75ExP9ro_x2hNvbP3xEmK-tkZja3eiwG7S8Ilc
Hi,
PDFBox fails to parse that type 1 font, but it recovers and uses a local
font:
Using fallback font ArialMT for CJGKGJ+HelveticaAB-Halvfet
About the parse error... it mentions garbled text, but I looked into the
uncompressed font text and I see a lot of complex PostScript, of which
we interpret only a subset (which works for almost all type 1 fonts). So
I wonder if the parser gets thrown off the rails much earlier already.
The end of the font file looks suspicious. FontForge is able to display
the font but brings up several warnings.
Anyway, the rendering looks good. PDF.js fails to render the font
("Aftonbladet" top right, and "Snacka..." begin of article). Chrome
succeeds. Adobe complains, and fails to display the part. Considering
that Adobe is the gold standard, I'd say your PDF is to blame.
Tilman