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

Sergey Beryozkin edited comment on PDFBOX-4548 at 5/22/19 1:21 PM:
-------------------------------------------------------------------

As I've mentioned earlier, I have a workaround where GraalVM is asked to delay 
the initialization of PDType1Font until runtime. I haven't been able to find 
out yet if it causes some side-effects or not.
The other thing I should mention is that this issue is only exposed if the Tika 
PDFParser is used ({{org.apache.tika.parser.pdf.PDFParser.handleXFAOnly}}), one 
of the colleagues was able to run PDFParser in the native mode independently of 
Tika without any issues though I guess as soon as PDType1Font is accessed it 
would be a problem, with or without Tika.


was (Author: sergey_beryozkin):
As I've mentioned earlier, I have a workaround where GraalVM is asked to delay 
the initialization of PDType1Font until runtime. I haven't been able to find 
out yet if it causes some side-effects or not.
The other thing I should mention is that this issue is only exposed if the Tika 
PDFParser is used ({{org.apache.tika.parser.pdf.PDFParser.handleXFAOnly}}), one 
of the colleagues was able to run PDFParser in the native mode independently of 
Tika without any issues.

> Update PDType1Font to make PDFBox GraalVM native mode ready 
> ------------------------------------------------------------
>
>                 Key: PDFBOX-4548
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4548
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 2.0.16
>            Reporter: Sergey Beryozkin
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>
> {{org.apache.pdfbox.pdmodel.font.PDType1Font}} has statically initialized 
> PDType1Font instances with the private constructor having a code path to 
> {{org.apache.fontbox.ttf.RAFDataStream}} which opens a File.
> This prevents [GraalVM|https://github.com/oracle/graal] from building a 
> native image of PDFBox or libraries which depend on it.
> Please see [TIKA-2862|https://issues.apache.org/jira/browse/TIKA-2862] for 
> more information. 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to