Next time, post the stack trace!

For everyone's reference, here is the stack trace:

 java.lang.RuntimeException: - is not a valid number -
java.lang.NumberFormatException: For input string: "-"
        at com.itextpdf.text.pdf.PdfNumber.<init>(PdfNumber.java:83)
        at
com.itextpdf.text.pdf.PdfContentParser.readPRObject(PdfContentParser.java:180)
        at 
com.itextpdf.text.pdf.PdfContentParser.parse(PdfContentParser.java:89)
        at
com.itextpdf.text.pdf.parser.PdfContentStreamProcessor.processContent(PdfContentStreamProcessor.java:358)
        at
com.itextpdf.text.pdf.parser.PdfReaderContentParser.processContent(PdfReaderContentParser.java:79)
        at
com.itextpdf.text.pdf.parser.PdfTextExtractor.getTextFromPage(PdfTextExtractor.java:73)
        at
com.itextpdf.text.pdf.parser.PdfContentReaderTool.listContentStreamForPage(PdfContentReaderTool.java:181)
        at
com.itextpdf.text.pdf.parser.PdfContentReaderTool.listContentStream(PdfContentReaderTool.java:204)
        at
com.itextpdf.text.pdf.parser.PdfContentReaderTool.main(PdfContentReaderTool.java:248)


A little more digging, and I isolate the problem to this chunk of content:

10 w
1 J
0.0 G
7820 --240 m
7857 --233 l
S
Q


That sure doesn't look like valid PDF to me.  So who created this PDF, and
why did they include two negative signs?

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/PDFTextExtractor-returns-an-exception-Input-string-was-not-in-a-correct-format-when-parsing-this-file-tp4357472p4358032.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to