iText - Out of Memory Issues

J

John Smith

Has anyone used the iText library in a Java application concatenate multiple
PDFs and experienced 'out-of-memory' exceptions?

I am attempted to concatenate up to 25 PDFs with the size varying from 10K
to 250K. It appears that iText is taking a tremendous amount of memory to
concatenate these documents.

Any help would be appreciated.

Thanks!
 
J

jan V

Has anyone used the iText library in a Java application concatenate
multiple
PDFs and experienced 'out-of-memory' exceptions?

Not me.
I am attempted to concatenate up to 25 PDFs with the size varying from 10K
to 250K.

I can't see why anyone would want to do that. Single PDFs are normally
designed to be very much stand alone.. in which case just squeezing a load
of them together wouldn't give a very aesthetic result.

Other thought: do you absolutely need to combine them in a PDF "harnass"?
Why not simply bundle them in a ZIP? Can the recipient not deal with a ZIP
containing your individual PDFs ?
 
J

Jeff Schwab

John said:
Has anyone used the iText library in a Java application concatenate multiple
PDFs and experienced 'out-of-memory' exceptions?

I am attempted to concatenate up to 25 PDFs with the size varying from 10K
to 250K. It appears that iText is taking a tremendous amount of memory to
concatenate these documents.

If you're just concatenating the PDFs, you might prefer converting them
to postscript files, which do not require special tools to be
concatenated, and then converting back to pdf (with distill or ps2pdf).
E.g., at my cygwin prompt:

cat a.ps b.ps |ps2pdf - ab.pdf
acroread ab.pdf
 
S

steve

Has anyone used the iText library in a Java application concatenate multiple
PDFs and experienced 'out-of-memory' exceptions?

I am attempted to concatenate up to 25 PDFs with the size varying from 10K
to 250K. It appears that iText is taking a tremendous amount of memory to
concatenate these documents.

Any help would be appreciated.

Thanks!

sub optimal, but try concat 5:1 then another 5:1 don't try to do 25 at once.

steve
 
R

Roedy Green

sub optimal, but try concat 5:1 then another 5:1 don't try to do 25 at once.

If your goal were to eat a goldfish bowl of M&Ms as fast as possible,
the optimum strategy is not to try to cram them all in your mouth at
once.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top