Reusing PDFonts causing COSVisitorException.
--------------------------------------------
Key: PDFBOX-809
URL: https://issues.apache.org/jira/browse/PDFBOX-809
Project: PDFBox
Issue Type: Bug
Affects Versions: 1.2.1
Environment: JDK 1.6.0_21, WIndows XP 32 Bit.
Reporter: Martin Hilpert
I try to reuse custom fonts and cache the PDFont objects in a
ConcurrentHashMap. But when I try to reuse those fonts, I get a
org.apache.pdfbox.exceptions.COSVisitorException: Das Handle ist ungültig
PDTrueTypeFont.loadTTF() has a PDDocument as the first parameter. So I guess,
the font is somehow linked with the font and reusing such a font for another
PDDocument causing this exception (?).
When processing multiple documents with the very same fonts, those TTF fonts
get loaded over and over again from the system. Why is the font linked with the
document? Would it be possible to make PDFont independent from PDDocument (why
not)?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.