PdfBox-Android icon indicating copy to clipboard operation
PdfBox-Android copied to clipboard

fix: drawGlyph2D error

Open Tlanglord opened this issue 1 year ago • 2 comments

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 avatar Feb 02 '24 08:02 Tlanglord

@Tlanglord Password for apple.pdf is '123456'

Tlanglord avatar Feb 02 '24 09:02 Tlanglord

  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.

THausherr avatar Dec 13 '24 13:12 THausherr