pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4400) jlink loading police.afm files
Date Wed, 12 Dec 2018 11:56:00 GMT

    [ https://issues.apache.org/jira/browse/PDFBOX-4400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16718876#comment-16718876
] 

Tilman Hausherr commented on PDFBOX-4400:
-----------------------------------------

PDFBox 3.0 is expected to work with jdk7. What could be done would be to add "jrt:" if needed.

How come that Thomas had the same problem but that it works for him now?

Can you tell what steps are to be done to reproduce the effect? Please include everything.

> jlink loading police.afm files
> ------------------------------
>
>                 Key: PDFBOX-4400
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4400
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.13
>         Environment: java11 jlink windows moditect
>            Reporter: kevin guerin
>            Assignee: Tilman Hausherr
>            Priority: Major
>              Labels: jdk9
>             Fix For: 2.0.14, 3.0.0 PDFBox
>
>
> hello everybody,
>  
> I've got a problem with this trace on jlink on java11 (it works without jlink)
>  
> {code:java}
> // Exception in thread "JavaFX Application Thread" java.lang.ExceptionInInitializerError
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.PDFont.<init>(PDFont.java:112)
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:176)
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:83)
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:146)
>         at pdfbox@2.0.13/org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
>         at pdfbox@2.0.13/org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:848)
>         at pdfbox@2.0.13/org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:503)
>         at pdfbox@2.0.13/org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:477)
>         at pdfbox@2.0.13/org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
>         at pdfbox@2.0.13/org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:254)
>         at pdfbox@2.0.13/org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:245)
>         at pdfbox@2.0.13/org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:179)
>       
> Caused by: java.lang.RuntimeException: java.io.IOException: org/apache/pdfbox/resources/afm/Courier-Bold.afm
not found
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.Standard14Fonts.<clinit>(Standard14Fonts.java:97)
>         ... 36 more
> Caused by: java.io.IOException: org/apache/pdfbox/resources/afm/Courier-Bold.afm not
found
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.Standard14Fonts.addAFM(Standard14Fonts.java:134)
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.Standard14Fonts.addAFM(Standard14Fonts.java:103)
>         at pdfbox@2.0.13/org.apache.pdfbox.pdmodel.font.Standard14Fonts.<clinit>(Standard14Fonts.java:50)
>         ... 36 more
> {code}
>  
> I think the problem comes from the fact that while using jlink the classpath does not
exist and it need to be loaded by an another way that the classpath one.
>  
> the path should look like something like :
> {code:java}
> // Path path = Paths.get(URI.create("jrt:/pdfbox/org/apache/resources/afm/police.afm"));
> {code}
> modules here is managed by moditect (maven plugin to help creating module-info descriptor)
and contain all dependancies of the project



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message