|
Hi,
I search through the mailing-list threads to search
about a problem similar to mine but I didn't find anything.
I'm generating PDF documents simply adding a JPEG
image for each page. The document is created in a very fast way and it is
perfectly readable with Acrobat Reader 5 or 6. The problem is when I try to
print the document: the printing process is very slow: about a page per
minute.
Any of you had experience about this problem?
Your help would be very appreciate.
Thanks a lot.
The code I use to create PDF document
is:
com.lowagie.text.Document document =
null;
PdfWriter pdfWriter = null; try {
document = new com.lowagie.text.Document(); pdfWriter = PdfWriter.getInstance(document, new FileOutputStream(path + "document.pdf")); document.open(); } catch(Exception ex) { // Exception handling here... } if (document != null && pdfWriter != null)
{
boolean open = false; for (int t = 0; t < images.size(); t++) { // images is a Vector of byte[], each for every JPEG image to include in the document
com.lowagie.text.Image immagine =
com.lowagie.text.Image.getInstance((byte[])images.elementAt(t));
immagine.scaleToFit(formato.width() - 30, formato.height() - 30); if (!open) { document.open(); open = true; } immagine.setAbsolutePosition(3, 0); document.newPage(); document.add(immagine); }
document.close();
|
- RE: [iText-questions] slow printing of pdf document... dott. Giacomo Galletto
- RE: [iText-questions] slow printing of pdf doc... Paulo Soares
- Re: [iText-questions] slow printing of pdf... dott. Giacomo Galletto
