You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/09/17 20:40:34 UTC

[jira] [Comment Edited] (PDFBOX-2358) ExternalFonts uses classloader of class in font-box

    [ 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:40 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 to FontBox, because they are not PDF-specific.


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, passing resource paths from PDFBox to FontBox is not OSGI friendly. The solution would seem to be to move the cmap resource files 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)