Noor Khan created PDFBOX-5917:
---------------------------------
Summary: 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
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]