I never saw that happening. It would help to see the individual pdf and the
merged one.
Paulo
-----Original Message-----
From: shivananda22 [mailto:sivananda.mylar...@mphasis.com]
Sent: Thursday, August 05, 2010 1:51 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] missing line space in Text field while merging
multiple PDF's using PDFCopy of IText
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
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
------------------------------------------------------------------------------
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/