PDFSignTest.zip (253.8 KB)
I try to add a stamp to PDF file using Aspose.PDF for .NET(Aspose.Pdf.dll, v21.3.0.0 Downloads ---New-Releases-aspose.pdf-for-.net-21.3-(dlls-only) .).I set the stamp size is 100(both of width and heigt),but I got the real size is about 156.this is my code ,what’s wrong with me please tell me.
Aspose.Pdf.Document doc = new
Aspose.Pdf.Document(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testin.pdf"));
Aspose.Pdf.Facades.PdfFileStamp fileStamp = new Aspose.Pdf.Facades.PdfFileStamp(doc);
Aspose.Pdf.Facades.Stamp stamp = new Aspose.Pdf.Facades.Stamp();
stamp.SetOrigin(100, 100);
stamp.SetImageSize(100, 100);
stamp.PageNumber = 1;
stamp.Opacity = 1f;
stamp.IsBackground = true;
stamp.BindImage(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "stamp.png"));
fileStamp.AddStamp(stamp);
fileStamp.Save(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testout.pdf"));
fileStamp.Close();