Hi 

I am creating a multiline form field using object PdfAcroForm. 

I am setting the value for the text field as "This is the first line \n this
is the second line ".
After opening a PDF it looks ok , but when I click on the PDF (other than
area of the text field) the above value changes to like this "This is the
first line  this is the second line " i.e. all the new line formatting is
removed and all the text wrap in a single line . 

The code is here :-
                - - - - 
                String pdfText = "This is the first line \n this is the
second line ; 

            PdfAcroForm acroForm = writer.getAcroForm();
            BaseFont helv = BaseFont.createFont(BaseFont.HELVETICA,
BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
            float fontSize = 10;

            acroForm.addMultiLineTextField("fld_1", pdfText , helv,
fontSize, 35,50,575,698);
            acroForm.addHtmlPostButton("btn_1", "SUBMIT", "noValue",
"yahoo.com" , helv, fontSize, 300, 15, 250, 30);
                - - - - 


Is I am doing any mistake ? 

Note - PDF file is attached for u r ref. 

Thx 
Manohar

 <<BarCodeTest1.pdf>> 


Attachment: BarCodeTest1.pdf
Description: Binary data

Reply via email to