Hi,
Am 04.04.2012 09:03, schrieb Hamed Iravanchi:
Hi,
I managed to fix a few issues with PDF to Image convertion.
Andreas, please reply. Let me know what can I do to fix these in your code
too.
Please create an issue on JIRA [1] and attach the changes as diff to it. Add an
example pdf too. Maybe is is a good idea to subscribe the dev@ list too where
most of the tech discussions take place.
What I've done so far:
- Made all true type fonts use code points (instead of extracted text) to
render the image
- Mapped the code point to glyph code by reading the font's CMAP (because
what I've mentioned in
http://pdfbox-users.markmail.org/message/bxfiab2der5dphlh?page=1)
- Used glyph codes to draw text
Sounds, exactly like my plan. ;-)
This fixes ALL of my PDF files that contain true type fonts.
One of my sample PDF files that have a CIDFontType0 still renders garbage,
and I think it is because not creating a correct AWT font.
I've reported the issue along with the PDF file in issue PDFBOX-1278.
The embedded font will be substituted if it isn't readable and in many cases the
encoding doesn't work any more, so that one gets garbage.
Waiting for your reply,
-Hamed
BR
Andreas Lehmkühler
[1] https://issues.apache.org/jira/browse/PDFBOX