We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error atempting to stamp a PDF

We are using Aspose.PDF to stamp PDFs uploaded to our site. Some PDFs error when attempting to apply the stamp. I have attached a copy of a PDF that produces the error and the C ode to stamp is:


Friend Sub TimeStamp(ByRef sInFile As String, ByVal sOutFile As String)
Dim license As Aspose.Pdf.License = New Aspose.Pdf.License
license.SetLicense(“Aspose.Total.Lic”)
Dim fileStamp As New PdfFileStamp(sInFile, sOutFile)
Dim stamp As New Aspose.Pdf.Facades.Stamp()
Dim sFiledText As FormattedText
Dim lcOptions As New cOptions

sFiledText = New FormattedText("RECEIVED, " & DateTime.Now.ToShortDateString & " " & DateTime.Now.ToShortTimeString & ", " & lcOptions.GetClerkName & ", " & lcOptions.GetCourtName, _
New FontColor(0, 0, 0), _
FontStyle.TimesRoman, _
EncodingType.Winansi, _
True, _
12)

stamp.BindLogo(sFiledText)
stamp.IsBackground = False
stamp.Pages = New Integer() {1}
stamp.SetOrigin(25, 234)
stamp.Rotation = 90
fileStamp.AddStamp(stamp)
fileStamp.Close()

End Sub

Thanks in advance for your assistance.
Russ

Hi Russ,


Thanks for using our API’s.

I have tested the scenario using latest release of Aspose.Pdf for .NET 11.4.0 and I am unable to notice any issue. As per my observations, the stamp is properly being added to PDF file. For your reference, I have attached the output generated over my end.

Can you please try using latest release and see if it resolve your problem.