[ 
https://issues.apache.org/jira/browse/PDFBOX-6288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18144819#comment-18144819
 ] 

Tilman Hausherr commented on PDFBOX-6288:
-----------------------------------------

I was wondering what's going on here. I have the font on my system. The CIDs 
with the codes in the PDF do exist and it's space, exclamation and a top-down 
heart. If we'd just do code = gid then it would work. My feeling is that it 
takes a wrong turn in codeToGID(). There is a comment by me referencing 
PDFBOX-5612 and indicating that I wasn't really 100% of what I did there 😂

> Invalid ToUnicode CMap
> ----------------------
>
>                 Key: PDFBOX-6288
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6288
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Oliver Schmidtmer
>            Priority: Major
>         Attachments: MalformedToUnicodeCMap.pdf, 
> image-2026-11-12-12-51-25-119.png, image-2026-11-12-12-53-07-456.png, 
> image-2026-11-12-12-55-54-029.png, toUnicode-CMAP.patch
>
>
> A problematic PDF file contains a "ToUnicode CMap" that uses "begincidrange" 
> instead of "beginbfchar" or "beginbfrange".
> Since the CMap is ignored in this case, the wrong glyphs are used during 
> rendering. Because the file displays correctly in Acrobat, a workaround might 
> be justified.
> The attached PDF file is a generated example, as the original contains 
> sensitive data. I used Copilot for the analysis and to create a potential 
> patch:
> https://github.com/Schmidor/pdfbox/commit/425e83caaa28c66e6e4438c7818f0eb0a448fae9



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to