facebooktwittermenuarrow-up

GemBox Support Forum

Adding multible lines to a text box leads extra to lines with garbage char

Hello,

i am failing to add multible lines to a textbox. I thought the proper pdf new line char is LF, but that isn’t working the the Sample_Short.pdf.

So i tested adding lines separated with CR,LF and CFLF to a multiline text box this leads to additional lines containing the square character (~ U+25A1) in all cases.
Viewed the pdf with PDFX-Change Editor and Microsoft Edge and both are showing the squares.

As far as i know this should not be the case for LF.

This might releated to the PDF encoding since i got that working with a brand new PDF from your samples. But with the Sample_Short.pdf (which is part of an official formular from some government bureaucracy) it does not work.

Any tip would be appreciated.

Full source code is at https://github.com/Kyubu-77/FillMultiLineTextBox/blob/master/FillMultilineTextBox/
The Sample_Short_Filled.pdf (yellow textbox) shows the resulting garbage chars.

p.s. Changing the textbox content in an WYSIWYG editor or MS Edge removes the square chars, also when rereading the pfd with gembox the squares are not there.

thanks and kind regards,
Sven

Hi Sven,

Please try again with this latest bugfix:

GBA15v1125.zip

Or this latest NuGet package:

Install-Package GemBox.Pdf -Version 15.0.1125-hotfix

Does this solve your issue?

Regards,
Mario

Hello Mario,

yes thanks. This solves the issue.

thanks and kind regards,
Sven