On 20/04/2011 12:08, Cristina Moura wrote:
Hi! The field is multiline and I'm doing this:
pdfFormFields.SetField("DESCRIPTION1", "blablablabla Chr(10) blablablabla")
I don't know much of Microsoft languages but it seems logical that
Chr(10) is printed in your PDF
Shouldn't it be someting like:
pdfFormFields.SetField("DESCRIPTION1", "blablablabla"+ Chr(10)+" blablablabla")
But in the created pdf the Chr(10) appears in the text and no line break is
made.
Regards.
Cristina Moura
-----Mensagem original-----
De: Paulo Soares [mailto:[email protected]]
Enviada: quarta-feira, 20 de Abril de 2011 10:48
Para: Post all your questions about iText here
Assunto: Re: [iText-questions] pdf form: how to send a line break
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
------------------------------------------------------------------------------
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
--
Kind Regards
Balder
------------------------------------------------------------------------
learn to walk before to run
redlab-log <http://www.redlab.be/blog/>
@redlabbe <http://twitter.com/redlabbe>
------------------------------------------------------------------------------
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