If the field is multiline just put a Chr(10) to break the line. Paulo
-----Original Message----- From: Cristina Moura [mailto:[email protected]] Sent: Wednesday, April 20, 2011 10:39 AM To: [email protected] Subject: [iText-questions] pdf form: how to send a line break Importance: High Hi! I have a PDF form that I need to fill. Some of the text-fields are large, so I need to send a line break with my text. How can I do that? This is the code I’m using: ----------------------------------------------------------------------- Dim pdfTemplate As String = Server.MapPath("TEMPLATE.pdf") Dim newFile As String = Server.MapPath("Certificado.PDF") 'password Dim password() As Byte Dim Upassword() As Byte password = System.Text.Encoding.ASCII.GetBytes("teste") Upassword = System.Text.Encoding.ASCII.GetBytes("") 'Dim pdfwriter As PdfWriter Dim pdfReader As New PdfReader(pdfTemplate, password) Dim pdfStamper As New PdfStamper(pdfReader, New FileStream(newFile, FileMode.Create)) pdfStamper.SetEncryption(Upassword, password, PdfWriter.AllowPrinting, PdfWriter.STANDARD_ENCRYPTION_128) Dim pdfFormFields As AcroFields = pdfStamper.AcroFields pdfFormFields.SetField("DESCRIPTION1", "blablablablablalalabalalala <need line break here> balblblablbalabl") pdfStamper.FormFlattening = True pdfStamper.Close() ----------------------------------------------------------------------- Thanks in advance Regards, Cristina ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php 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. ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
