You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Alfred (Jira)" <ji...@apache.org> on 2020/06/10 06:40:35 UTC
[jira] [Created] (PDFBOX-4875) Lazy load standard 14 fonts, only if
needed
Alfred created PDFBOX-4875:
------------------------------
Summary: Lazy load standard 14 fonts, only if needed
Key: PDFBOX-4875
URL: https://issues.apache.org/jira/browse/PDFBOX-4875
Project: PDFBox
Issue Type: Improvement
Components: Parsing, Text extraction
Affects Versions: 2.0.20, 3.0.0 PDFBox
Reporter: Alfred
Fix For: 2.0.21, 3.0.0 PDFBox
I am testing text extraction from PDF and profiling the execution.
I found that the second biggest time consumer is the static code in Standard14Fonts that loads fonts from the pdf box jar.
The culprit seems to be the direct use of the stream returned getResurceAsStream.
That would be a ZipInputStream when using PDFBox as a jar.
Using a buffered stream around it reduces the load time a lot.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org