Free Support Forum - aspose.com

Adobe Acrobat error when applying text stamp (watermark)

(Using Aspose.PDF for .NET version 6.1.0.0)

After applying a watermark to an existing PDF file, I get an error when opening the file in Acrobat 9.4. Error message is "An error exists on this page. Acrobat may not display the file correctly. Please contact the person who created the PDF document to correct the problem."

Sample files attached and sample code is below... Thanks for your assistance.

Document pdfDoc = new Document(@"c:\temp\f1040.pdf");

Aspose.Pdf.Facades.FormattedText formattedText =

new Aspose.Pdf.Facades.FormattedText("Watermark", System.Drawing.Color.Blue, Aspose.Pdf.Facades.FontStyle.TimesBold, Aspose.Pdf.Facades.EncodingType.Winansi, false, 60);

TextStamp textStamp = new TextStamp(formattedText);

textStamp.Opacity = 0.5;

textStamp.RotateAngle = 45;

textStamp.HorizontalAlignment = HorizontalAlignment.Center;

textStamp.VerticalAlignment = VerticalAlignment.Center;

foreach (Page page in pdfDoc.Pages)

{

page.AddStamp(textStamp);

}

pdfDoc.Save(@"c:\temp\f1040_withwatermark.pdf");

Hello Ryan,

Thanks for using our products.

I have tested the scenario using Aspose.Pdf for .NET 6.1.0 and have tried viewing resultant PDF in Adobe Acrobat 9.0.0 and I am unable to notice any error message. Besides this, I have also tried viewing the resultant PDF in Adobe Reader 10.4.0 and 9.1.0 and I am unable to notice the error message that you have stated. Please observe that when using Adobe Reader 10.4.0 and 9.1.0, I am getting dialog as specified in image below. Nevertheless, I am trying to replicate the issue using Adobe Acrobat 9.4.0.

If possible, can you please share the details regarding your working environment. We apologize for your inconvenience.