[ 
https://issues.apache.org/jira/browse/PDFBOX-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Hewson resolved PDFBOX-809.
--------------------------------

    Resolution: Won't Fix

Only PDDocument is thread safe. No other classes should be retained for longer 
than the lifetime of the PDDocument which they came from.

> 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: MH
>
> 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 was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to