Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: drawGlyph2D error #561

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tlanglord
Copy link

apple.pdf

When I PageDrawer call drawGlyph2D, Glyph2D is CIDType0Glyph2D, if getPathForCharacterCode returns the Path that was Cache, it will result in the character not being drawn.
In the apple.pdf I uploaded, the character "Hello world",only the first 'l' will be drawn.
I used 'Path oldPath = glyph2D.getPathForCharacterCode(code);
Path path = new Path(oldPath);' solved the problem, although 'new Path' is expensive, but I didn't find any other solution

@Tlanglord
Copy link
Author

@Tlanglord Password for apple.pdf is '123456'

@THausherr
Copy link

  1. Your file is a bunch of hex codes and not a PDF
    2550 4446 2d31 2e36 0a25 c4e5 f2e5 eba7
    f3a0 d0c4 c60a 3320 3020 6f62 6a0a 3c3c
    202f 4669 6c74 6572 202f 466c 6174 6544

  2. You should compare with the desktop PDFBox 2.0.* version, that one doesn't have such a change, so I wonder if that one can display the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants