Free Support Forum - aspose.com

Aspose.PDF Replace text with Thai language

Hi i have problem when replace text with Thai language ex.“อว 67.1028 “,Will be empty
My License :Aspose.Total 20.4.0
My Code:
PdfFileMend mender = new PdfFileMend();
List Rectangle = new List();
Document builder = new Document(“D:\DocumentNumber.pdf”);
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber(”[DocumentNumber]”);
builder.Pages.Accept(textFragmentAbsorber);
TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;
foreach (TextFragment textFragment in textFragmentCollection)
{
textFragment.Text = "อว 67.1028 ";
textFragment.TextState.FontSize = 16;
textFragment.TextState.Font = font;
}
// Save output PDF
builder.Save(“D:\DocumentNumber.pdf”);

pdf source file :DocumentNumber.pdf (34.8 KB)

pdf result file: DocumentNumber.pdf (128.5 KB)

Thanks.

@sorawee

Would you kindly share which font you are using while replacing the text. We will test the scenario in our environment and address it accordingly.