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
pdfDocument1.Pages.Add();
// Open Document
fileStamp.BindPdf(pdfDocument1);
// 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
fileStamp.AddStamp(stamp);
// Save updated PDF file
fileStamp.Save( "test.pdf");
// Close fileStamp
fileStamp.Close();
// ExEnd:AddTextStampAll
pdfDocument1.Dispose();