(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");