[
https://issues.apache.org/jira/browse/PDFBOX-5917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17902390#comment-17902390
]
Tilman Hausherr commented on PDFBOX-5917:
-----------------------------------------
Your PDF isn't "failing", it displays exceptions that seem scary. From what I
see, it is the space character in Arial-BoldMT (F7). Instead of having a proper
definition, it points outside of the font so we get EOF. I think we can just
swallow the exception. However I'd like to do some more research because the
EOF position doesn't match the length of the font stream.
> Particular PDF fails on renderImageWithDPI call
> -----------------------------------------------
>
> Key: PDFBOX-5917
> URL: https://issues.apache.org/jira/browse/PDFBOX-5917
> Project: PDFBox
> Issue Type: Bug
> Reporter: Noor Khan
> Priority: Major
> Attachments: test.pdf
>
>
> Hello,
>
> The pdf attached to this ticket fails in this following test code block I
> wrote:
>
> {code:java}
> try (PDDocument pdDocument = Loader.loadPDF(Path.of("path to
> test.pdf").toFile())) {
> PDFRenderer pdfRenderer = new PDFRenderer(pdDocument);
> for (int page = 1; page <= pdDocument.getNumberOfPages(); page++) {
> pdfRenderer.renderImageWithDPI(page - 1, 300, ImageType.RGB);
> }
> } {code}
> The error I get is:
> {code:java}
> Dec 02, 2024 11:59:23 AM org.apache.pdfbox.rendering.GlyphCache
> getPathForCharacterCode
> SEVERE: Glyph rendering failed for code 32 in font Arial-BoldMT
> java.io.EOFException: EOF at 108, b1: -1, b2: -1 {code}
> The pdf appears to load fine in the browser for me.
>
> I am using pdfbox 3.0.3:
> {code:java}
> implementation("org.apache.pdfbox:pdfbox:3.0.3") {code}
> I have many other PDFs who are failing in a similar way, but I thought to
> just include one for now. I can add more if it'll help.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]