Free Support Forum - aspose.com

\r\n fails in form.fillfield()

Our merge rules require a "NewLine" if we programatically append "Environment.NewLine" It creates a new line. However, if we try to include \r\n to create the same effect in a string it does not work. For example:

form.FillField(TextField1, "line1\r\nline2") reads

line1\r\nline2

intead of

lin1

line2

Can you let me know what the appropriate string escape clause and new line format should be?

Sincerely,

Hi,

Please use "\n" only.

Thanks.

I tempted that and it did not work with form.fillfield(“MultilineTextField1”, “blah \n blah”)

Dear Byne,

Sorry for bringing you the trouble.

I should remind you that "\n" is only supported in multiple-lined text field, please check it and modify this attribute when needed. If problem still remains, please upload your PDF template as well as the code.

Thanks & Best regards.

I am only attempting it on multiline text fields. Please see FLD930 of the attached LACIV109. This technique did not appear to work in this case.

Sincerely,

bnye

Dear bnye,

I am sorry that i cannot reproduce the problem. Please check my output file in attachment. Would you please show me your code and output if DO NOT violating your privacy? This is my code:

Form form = new Form(path + "LACIV109_unlocked.pdf", path + "LACIV109_unlocked.out.pdf");
form.FillField("FLD930", "line1\r\nline2");
form.Save();

Thanks & Best regards.