[
https://issues.apache.org/jira/browse/PDFBOX-2908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653030#comment-14653030
]
V commented on PDFBOX-2908:
---------------------------
That's very sad to know..
I think currently most other projects are linking to 1.8.x versions.
I tried to move to tika, its 1.9 depends on pdfbox 1.8.9, and even its future
(1.11-SNAPSHOT) depends on 1.8.10 only. And apparently the API changes in
pdfbox 2 causes that I can't override the dependency to use 2.0.0-SNAPSHOT
directly via maven (i was thrown with a class not found).
And, yes, Tika's PDF parsing module is not any faster than when I use PDFBox
1.8 directly, if I didn't mention that.
On how to pass in the file, I tried both File and FileInputStream, which did
not differ too much.
Plus I also tried to run on my Xubuntu 14.04, with its stock Java 7, which
showed similar (slow) performance.
> PDFTextStripper.writeText is slow
> ---------------------------------
>
> Key: PDFBOX-2908
> URL: https://issues.apache.org/jira/browse/PDFBOX-2908
> Project: PDFBox
> Issue Type: Bug
> Components: Text extraction
> Affects Versions: 1.8.9, 1.8.10
> Environment: Mac OS X 10.10.4
> java version "1.8.0_31"
> Reporter: V
> Labels: pdfbox
> Fix For: 2.0.0
>
>
> I inserted raw time reporting functions before and after
> PDFTextStripper.writeText, it looks like it takes quite long to writeText to
> a StringWriter (84045ms for a ~1M pdf file).
> It looks like a 1.8.x issues (I can reproduce on 1.8.9 and 1.8.10, didn't
> test on other versions yet). When I switched to 2.0.0-SNAPSHOT, and the time
> improved dramatically to 532ms using the same code and for the same pdf file.
> What I changed in code was only one import to accommodate PDFTextStripper's
> package change in 2.0.0.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]