aws-samples / aws-samples/amazon-textract-searchable-pdf

Issue for some PDFs

Open
#12 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
78
Forks
28
PR merge metrics
No merged PRs in 30d

Description

java.lang.IllegalArgumentException: U+2448 ('.notdef') is not available in the font Courier, encoding: WinAnsiEncoding
at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:428)
at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:337)
at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:368)
at com.amazon.textract.pdf.PDFDocument.calculateFontSize(PDFDocument.java:60)
at com.amazon.textract.pdf.PDFDocument.addPage(PDFDocument.java:114)
at DemoPdfFromLocalPdf.run(DemoPdfFromLocalPdf.java:74)
at Demo.main(Demo.java:15)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the stack trace from DemoPdfFromLocalPdf.run in DemoPdfFromLocalPdf.java, then inspect PDFDocument.calculateFontSize at line 60 and addPage at line 114. Determine the expected behavior for PDFs containing U+2448 and verify the generated PDF after the font-encoding error is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.