Failed when converting Chinese characters to pdf


If we change “11111111111” as “口水画画测绘师111” with the following codes , there are two problems :
1,Some characters are lost.
2, The size of saved pdf file is from 3k to 100k:

// Create PdfFileStamp object
PdfFileStamp fileStamp = new PdfFileStamp();
Document pdfDocument1 = new Document();
// Insert a empty page in a PDF
// Open Document
// Create stamp
Aspose.Pdf.Facades.Stamp stamp = new Aspose.Pdf.Facades.Stamp();
stamp.BindLogo(new FormattedText(“11111111111”, System.Drawing.Color.Blue, System.Drawing.Color.Gray, Aspose.Pdf.Facades.FontStyle.Helvetica, EncodingType.Winansi, true, 14));
stamp.SetOrigin(200, 200);

        stamp.IsBackground = true;
        // Add stamp to PDF file
        // Save updated PDF file
        fileStamp.Save( "test.pdf");
        // Close fileStamp
        // ExEnd:AddTextStampAll

New thread:Failed when converting Chinese characters to pdf


Thanks for contacting support.

Would you kindly share the PDF document that you are using as input at your side. We will test the scenario in our environment and address it accordingly.


the pdf file is new ,no input



Sorry for the confusion.

We tested the scenario in our environment while using Aspose.PDF for .NET 19.9 and your code snippet. We were unable to notice any issue. For your kind reference, an output PDF is attached. Test.pdf (112.9 KB)

Would you please make sure that all Microsoft Essential fonts are present/installed in your system. In case issue still persists, please share your environment details i.e. OS Name and Version, Application Type, etc. We will again test the scenario in our environment and address it accordingly.