[
https://issues.apache.org/jira/browse/PDFBOX-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137721#comment-14137721
]
John Hewson edited comment on PDFBOX-2358 at 9/17/14 6:41 PM:
--------------------------------------------------------------
The use of FontBox's ResourceLoader in ExternalFonts is an IDE autocomplete
accident. PDFBox has its own ResourceLoader class which should have been used.
The way that CMapParser uses the FontBox ResourceLoader is more troubling. As
you say, passing resource paths from PDFBox to FontBox is not OSGI friendly.
The solution would seem to be to move the cmap resource files from PDFBox to
FontBox, because they are not PDF-specific, they are more properly part of
Adobe's CIDFont system.
was (Author: jahewson):
The use of FontBox's ResourceLoader in ExternalFonts is an IDE autocomplete
accident. PDFBox has its own ResourceLoader class which should have been used.
The way that CMapParser uses the FontBox ResourceLoader is more troubling. As
you say, passing resource paths from PDFBox to FontBox is not OSGI friendly.
The solution would seem to be to move the cmap resource files from PDFBox to
FontBox, because they are not PDF-specific.
> ExternalFonts uses classloader of class in font-box
> ---------------------------------------------------
>
> Key: PDFBOX-2358
> URL: https://issues.apache.org/jira/browse/PDFBOX-2358
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.0
> Reporter: Cornelis Hoeflake
> Assignee: John Hewson
>
> ExternalFonts loads some default fonts via the
> org.apache.fontbox.util.ResourceLoader. That resourceloader uses it's own
> classloader (ResourceLoader.class.getClassLoader()) for loading the given
> resource.
> The problem is that the resource is in the PDFBox project and the
> ResourceLoader in the FontBox. In an OSGI environment this is a problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)