Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Wed Jan 19, 2022 3:36 am
Hi
I have some multiline text that I'm wanting to set into a pdf PdfTextBoxField input control.
What do I need to use to add a line break into text to get it to split into multiple lines?
regards
Steve
-
Stevo123
-
- Posts: 10
- Joined: Fri Oct 22, 2021 4:03 am
Wed Jan 19, 2022 5:48 am
Hello,
Thanks for your inquiry!
If you want the text in the textboxfield into multi lines, please use "\n" to make line breaks when you input the value. Like the following code shows.
- Code: Select all
textBoxField.Text = "firstLine\nsecondLine";
lines.png
If you have any other question, just feel free to contact us.
Sincerely,
Marcia
E-iceblue support team
Login to view the files attached to this post.
-
Marcia.Zhou
-
- Posts: 858
- Joined: Wed Nov 04, 2020 2:29 am
Mon Jan 24, 2022 8:44 am
Hello,
Hope you are doing well!
Has the issue been solved now? Could you please give us some feedback at your convenience?
Thanks in advance.
Sincerely,
Marcia
E-iceblue support team
-
Marcia.Zhou
-
- Posts: 858
- Joined: Wed Nov 04, 2020 2:29 am
Fri Feb 04, 2022 2:24 am
I'm sorry Marcia, I thought I had replied to your question some time ago.
I've tested again and I'm still not seeing the text being broken into multiple lines.
I can see that if I save the file and then open it in adobe reader it works as you say, but I am returning a byte array to a browser, and doing it this way, it doesn't work.
Is there any chance we can also get this working in a browser (Edge or Chrome)?
regards
Steve
-
Stevo123
-
- Posts: 10
- Joined: Fri Oct 22, 2021 4:03 am
Fri Feb 04, 2022 9:05 am
Hi Steve,
Setting the Multiline property as true could make it work in browser. Any question, please feel free to write back.
- Code: Select all
textbox.Multiline = true;
Sincerely,
Nina
E-iceblue support team
-
Nina.Tang
-
- Posts: 1187
- Joined: Tue Sep 27, 2016 1:06 am
Sun Feb 06, 2022 10:43 pm
Perfect, thanks Nina
-
Stevo123
-
- Posts: 10
- Joined: Fri Oct 22, 2021 4:03 am
Mon Feb 07, 2022 1:36 am
Hi Steve,
I appreciate your confirmation.
If you need assistance in the future, please do not hesitate to contact me.
Wish you all the best!
Sincerely,
Nina
E-iceblue support team
-
Nina.Tang
-
- Posts: 1187
- Joined: Tue Sep 27, 2016 1:06 am