[ 
https://issues.apache.org/jira/browse/PDFBOX-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr closed PDFBOX-1300.
-----------------------------------

    Resolution: Cannot Reproduce

Closing because of lack of sample file.
What you could do is to decompress the file with qpdf or a similar tool, then 
edit it with NOTEPAD++ to remove anything personal.

> COSNumber cannot convert numbers to long 
> -----------------------------------------
>
>                 Key: PDFBOX-1300
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1300
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>            Reporter: tatsiana mays
>
> in COSNumber.java if number passed is greater then long 
> 9,223,372,036,854,775,807. This is what i have 
> 2514740409086472832680141218906112. The method below cannot hadle 
> Need to do some extra  else if loop 
>  public static COSNumber get( String number ) throws IOException
>     {
>         if (number.length() == 1) {
>             char digit = number.charAt(0);
>             if ('0' <= digit && digit <= '9') {
>                 return COSInteger.get(digit - '0');
>             } else if (digit == '-' || digit == '.') {
>                 // See https://issues.apache.org/jira/browse/PDFBOX-592
>                 return COSInteger.ZERO;
>             } else {
>                 throw new IOException("Not a number: " + number);
>             }
>         } else if (number.indexOf('.') == -1 && number.length() < 19)  {
>             try
>             {
>                 return COSInteger.get( Long.parseLong( number ) );
>             }
>             catch( NumberFormatException e )
>             {
>                 throw new IOException( "Value is not an integer: " + number );
>             }
>         } else {
>             return new COSFloat(number);
>         }
>     }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to