You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/05/24 20:47:04 UTC

[jira] [Comment Edited] (PDFBOX-3806) Nullpointer exception in getLeftSideBearing

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

Tilman Hausherr edited comment on PDFBOX-3806 at 5/24/17 8:46 PM:
------------------------------------------------------------------

Could you extract the extract the font from the PDF file with PDFDebugger and attach it here, also post the complete stack trace? And why is the code you posted not the source code, did you modify something? I'm wondering what's going on.


was (Author: tilman):
Could you extract the extract the font from the PDF file, also post the complete stack trace? And why is the code you posted not the source code, did you modify something? I'm wondering what's going on.

> Nullpointer exception in getLeftSideBearing
> -------------------------------------------
>
>                 Key: PDFBOX-3806
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3806
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Daniel Persson
>            Priority: Minor
>
> While processing todays batch of data we got a Nullpointer exception in getLeftSideBearing. Sadly I can't give you the PDF.
> ```
>     public int getLeftSideBearing(int gid) {
>         return gid < this.numHMetrics?this.leftSideBearing[gid]:this.nonHorizontalLeftSideBearing[gid - this.numHMetrics];
>     }
> ```
> In this function there could be a case where nonHorizontalLeftSideBearing is null and you still ask for a GID in larger or equal to numHMetrics.
> First time I see this issue and so far only 4 characters in one PDF has this issue so not critical.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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