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.

Mon Dec 20, 2021 12:05 am

Hi

Is there a way to set text that includes line breaks into a pdf textbox?

I've tried using Environment.NewLine and html <br/>, but neither of these options work.

cheers

Steve

MLLpdfUser
 
Posts: 3
Joined: Thu Dec 16, 2021 11:53 pm

Mon Dec 20, 2021 2:33 am

Hello,

Thanks for your inquiry!

If you are filling the PdfTextBoxField with code, please use "\n" to break the content line, such as "textbox.Text = "aaaaaaaa\nbbbbbb\nccccccc\nddddddd";".

If you want to fill the content in lines after open the generated PDF file, please use "textbox.Multiline = true;" to make the text box in multi lines.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Jan 04, 2022 6:03 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
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF