[
https://issues.apache.org/jira/browse/PDFBOX-5973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935156#comment-17935156
]
Tilman Hausherr commented on PDFBOX-5973:
-----------------------------------------
Just for fun I tried to fix the small file:
{code:java}
PDPage page = doc.getPage(0);
PDFont replacementFont = PDTrueTypeFont.load(doc, new File("Bettawork.ttf"),
WinAnsiEncoding.INSTANCE);
page.getResources().put(COSName.getPDFName("F9"), replacementFont);
doc.save(new File("PDFBOX-5973-saved.pdf"));
{code}
Result file: [^PDFBOX-5973-saved.pdf]
I got the file from here: https://wisabo.com/item/1948/bettawork/ but you'd
have to license it. And the [^PDFBOX-5973-saved.pdf] rendering in PDFBox is
extremely slow, maybe due to the complexity of the curves in the glyphs.
> java.io.EOFException when converting document to images
> -------------------------------------------------------
>
> Key: PDFBOX-5973
> URL: https://issues.apache.org/jira/browse/PDFBOX-5973
> Project: PDFBox
> Issue Type: Bug
> Components: Rendering
> Affects Versions: 2.0.27, 2.0.33, 3.0.4 PDFBox
> Reporter: Kabir Soneja
> Priority: Major
> Attachments:
> CORRECT_North-Carolina-Travel-Guide-2025-Stitched_compressed-flat-compressed-flat_compressedpdf.pdf,
> PDFBOX-5973-saved.pdf, PDFBOX-5973.pdf, image-2025-03-13-12-12-40-638.png,
> image-2025-03-13-12-13-46-555.png, image-2025-03-13-12-14-16-646.png
>
>
> Hi Team,
> We are using pdfbox version 2.0.27 to convert document to images. While doing
> we are seeing *java.io.EOFException* exception for one of the documents. Not
> sure if this is due to some corrupted text or due to font parsing in PDFBox.
> Can you help me understand what is the root cause and how we can fix this?
> I have attached the original document for reference. Please do let me know if
> you need any additional details. Thanks!
>
> [^CORRECT_North-Carolina-Travel-Guide-2025-Stitched_compressed-flat-compressed-flat_compressedpdf.pdf]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]