You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2013/08/04 14:19:48 UTC
[jira] [Updated] (PDFBOX-919) Make custom fonts reusable / get font
reference from document.
[ https://issues.apache.org/jira/browse/PDFBOX-919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler updated PDFBOX-919:
--------------------------------------
Issue Type: Wish (was: Bug)
Changed from "Bug" to "Wish"
> Make custom fonts reusable / get font reference from document.
> --------------------------------------------------------------
>
> Key: PDFBOX-919
> URL: https://issues.apache.org/jira/browse/PDFBOX-919
> Project: PDFBox
> Issue Type: Wish
> Components: PDModel
> Affects Versions: 1.3.1
> Environment: Windows XP; 32 Bit; JDK 1.6.0_22.
> Reporter: MH
>
> When writing generic code to change PDF documents (concatenate PDFs, add custom text, etc.), some functions using a custom font can be called multiple times. As it is not possible to simply cash the PDFont instances (see bug 809 => COSVisitorException) as they are probably hard linked to a document instance, it should be possible to request the font from the document to re-use it.
> Example: 2 documents use both the same custom font. When I concatenate them and add additional text with my custom font, the result has 3 times this font embedded! Instead of creating new instances of the custom font on every (generic) call of an application method, it would be better to somehow "tell" PDFBox, that the custom font is already in the PDF that I want to change. So a method like
> PDFont f = myPDDocument.getFont()
> would be usefull to avoid multiple inclusions of the same font on a document.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira