We are currently processing PDFs that we receive from a 3rd party process
for a customer. These files are extremely large. We recently hit a file size
limit when trying to process a pdf that exceeded 2.2Gb in size. The error
was 

 

Exception in thread "main" java.lang.IllegalArgumentException: Size exceeds
Integer.MAX_VALUE
        at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:707)
        at com.lowagie.text.pdf.MappedRandomAccessFile.init(Unknown Source)
        at com.lowagie.text.pdf.MappedRandomAccessFile.<init>(Unknown
Source)
        at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown
Source)
        at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown
Source)



I took a look at this and found that the FileChannelImpl.map takes a MapMode
and 2 longs, but that MappedRandomAccessFile seems to be casting seeks,
reads and pointers to int. As an example:

 

  331       public void seek(long pos) throws IOException {

  332           seek((int)pos);

  333       }

 

Is there any chance that this will be (or maybe has been) changed in future
releases to allow for files in excess of 2Gb? Personally I think this is
bordering on the absurd, but customers want what customers want. Or am I
using this wrong and there is another way to process extremely large files?

 

Edward W. Rouse

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to