Hi,

I am using  IText to fill the values in Designer created PDF using IText
AcroFields along with this I am using PDFCopy of Itext to merge the same pdf
file for 3 times with different data. The issue is I am having text field in
the pdf where it will accept multiple lines and I had given 8 inches as the
line spacing between the lines. When i create a single pdf( i.e. filling
values in the form and creating a new file) the line spacing is the same as
what  I had given but when I try to merge the three files the line spacing
in the Text Field is getting increased and my data is over flowing. I am
merging the files using PDFCopy.

My code will looks like the following



FileOutputStream os = new FileOutputStream("template.pdf");
                Document document = new Document();
                PdfCopy copy = new PdfCopy(document, os);
                document.open();
                
                for (int i =0;i<3;i++) {
                        // create the reader by passing the AWB PDF template
                        PdfReader reader = new PdfReader("template.pdf");
                        FileOutputStream baos = new 
FileOutputStream("result.pdf");
                        // create the stamper
                        PdfStamper pdfStamper = new PdfStamper(reader, baos);
                        pdfStamper.setFormFlattening(true);
                        pdfStamper.setFreeTextFlattening(true);
                        pdfStamper.setFullCompression();
                        // retrieve the form fields
                        AcroFields pdfForm = pdfStamper.getAcroFields();
                        // fill the form with the appropriate values
                        
                        // This method will fill up the form values
                        setFormValues(pdfForm);

                        pdfStamper.setFormFlattening(true);
                        pdfStamper.close();
                        reader = new PdfReader("result.pdf");
                        // add the first page of the reader to the copy
                        copy.addPage(copy.getImportedPage(reader, 1));
                        reader.close();
                        baos.close();
                }
                copy.flush();
                document.close();
                copy.close();





Could any one please tell me what is the reason for increasing line space
between the lines in Text fields


Thanks
Shiv
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/missing-line-space-in-Text-field-while-merging-multiple-PDF-s-using-PDFCopy-of-IText-tp2314814p2314814.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to