Hi 

In our application we have some PDF templates with Acro fields. And its size 
is around 600 kb. With the help of "PdfStamper" we are filling the fields of 
the template dynamically and sending it through email. I would like to know 
whether we can reduce the size of the pdf file before sending? I am giving the 
some codes of our application............

                               

PdfReader pdfReader = null;
File pdfTemplateFile = new File
("E://ExadelWorkspace//work1//Framework//configdir//PDFTEMPLATE.pdf");
...// Get byte Array of the contents of the template file
pdfReader = new PdfReader(pdrReaderByteArray);
PdfStamper pdfStamper = null;
AcroFields acrofieldsPDF = null;
pdfByteArrayOutputStream = new ByteArrayOutputStream();
pdfStamper = new PdfStamper(pdfReader, pdfByteArrayOutputStream);
acrofieldsPDF = pdfStamper.getAcroFields();

// setting the values of acro fields...............

pdfStamper.setFormFlattening(true);
pdfStamper.close();

And We are sending the "pdfByteArrayOutputStream " by mail as 
attachment.........


Thanks 
Tinu



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to