pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip Helger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-3151) getStringWidth is terribly slow (and resulting document is invalid)
Date Wed, 02 Dec 2015 17:39:11 GMT

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

Philip Helger commented on PDFBOX-3151:

Can't give you exact number, but a test case using font PDType1Font.HELVETICA had the following
1.8.11: 0,9 sec
2.0.0-RC2: 36,1 sec

So quite obvious. If you want to profile yourself (as I don't have one installed on this machine):
Test file:

> getStringWidth is terribly slow (and resulting document is invalid)
> -------------------------------------------------------------------
>                 Key: PDFBOX-3151
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3151
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.0
>         Environment: 2.0.0-RC2
>            Reporter: Philip Helger
>            Assignee: John Hewson
>             Fix For: 2.1.0
>         Attachments: HelloWorldType0.java
> I'm maintaining a PDF layout engine that makes heavy use of "getStringWidth". With PDFBox
2.0.0 this got much slower. So please find attached an example which you can use for profiling
purposes. I used "OpenSans" TTF as the basis (grab it at https://github.com/google/fonts/tree/master/apache/opensans).
> Beside it being slow, the created PDF cannot be opened (but this may have something to
do with PDFBOX-2945 in RC2???)

This message was sent by Atlassian JIRA

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

View raw message