Hello all,
Today I changed the pdf_concat.java file from the Lowagie util package a bit,
so that it prints a disclaimer text (light grey, font size 45, 45 degrees,
around 20 textlines parallell) all over the concatenated pages.
The generated files are very small (11 kilobytes), but when i print it to a
printer it turns out that the traffic generated over the network line is
about 30 Megabytes per page! The strange thing is that when I use the print
to file option it only generates around 300 kb.
If I do not add the disclaimer text, than the file size over the network
lines stays small.
How does this happen and how to prevent this or to work around it?
Thanks!
Martin
----
source:
document.open();
cb = writer.getDirectContent();
}
// step 4: we add content
PdfImportedPage page;
for (int i = 0; i < n; )
{
++i;
page = writer.getImportedPage(reader, i);
document.newPage();
System.out.println("Processed page " + i);
BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
int fontHeight=45;
cb.beginText();
cb.setFontAndSize(bf, fontHeight);
cb.setColorFill(new java.awt.Color(230,230,230));
boolean evenRow=false;
for(int y = 0;y<height;y=y+(fontHeight*2))
{
System.out.println(y);
if(evenRow)
{
cb.showTextAlignedKerned(Element.ALIGN_CENTER,"alleen voor
intern gebruik alleen voor intern gebruik",width/2,y,45);
evenRow=!evenRow;
}
else
{
cb.showTextAlignedKerned(Element.ALIGN_CENTER,"for internal
use only for internal use only",width/2,y,45);
evenRow=!evenRow;
}
}
// cb.showText(WARNINGTEXT);
cb.endText();
cb.addTemplate(page,0,0);
}
f++;
}
// step 5: we close the document
document.close();
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions