You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/08/24 14:31:18 UTC
[jira] Resolved: (PDFBOX-592) please accommodate '-' where a number
is expected
[ https://issues.apache.org/jira/browse/PDFBOX-592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved PDFBOX-592.
----------------------------------
Assignee: Jukka Zitting
Fix Version/s: 1.3.0
Resolution: Fixed
Fixed as suggested in revision 988506. Thanks!
> please accommodate '-' where a number is expected
> -------------------------------------------------
>
> Key: PDFBOX-592
> URL: https://issues.apache.org/jira/browse/PDFBOX-592
> Project: PDFBox
> Issue Type: Improvement
> Components: Parsing
> Affects Versions: 0.8.0-incubator
> Reporter: Godmar Back
> Assignee: Jukka Zitting
> Fix For: 1.3.0
>
>
> PDF's created by ScanSoft's PDF driver have '-' where a number is needed, as in 1 0 0 1 - 783 Tm. See http://markmail.org/message/r63jfd5wybejzbkr for details.
> Proposal: interpret - as 0. Patch:
> --- /tmp/x/pdfbox-0.8.0-incubating/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java 2009-09-14 19:39:44.000000000 -0400
> +++ src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java 2010-01-07 00:14:45.000000000 -0500
> @@ -252,7 +252,12 @@
> dotNotRead = false;
> }
> }
> - retval = COSNumber.get( buf.toString() );
> + String number = buf.toString();
> + /* accommodate PDF files (such as ScanSoft-created ones that output '-'
> + * where a number is expected. Substitute a 0 */
> + if ("-".equals(number))
> + number = "0";
> + retval = COSNumber.get( number );
> break;
> }
> case 'B':
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.