Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

ImageStamp has stopped working properly since upgrade

$
0
0
We've recently upgraded from Aspose.Pdf 7.7 to 8.8 and all is going well except that the ImageStamp functionality seems to have changed. We use ImageStamp to watermark the pdf document with a logo on the top left. The functionality was working prior to the upgrade.

Platform: ASP .NET 4.0
Version: Aspose.Pdf 8.8
Problem: ImageStamp is no longer present in generated PDF document after upgrade.

See the code below:

Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(OriginalFilename);
                ImageStamp imageStamp = new ImageStamp(imageFileName);
                imageStamp.Height = 37;
                imageStamp.Width = 256;
                imageStamp.TopMargin = 10;
                imageStamp.LeftMargin = 10;
                imageStamp.Background = true;
                imageStamp.Opacity = 0.3;
                imageStamp.HorizontalAlignment = HorizontalAlignment.Left;
                imageStamp.VerticalAlignment = VerticalAlignment.Top;

                foreach (Page pdfPage in pdfDocument.Pages)
                  {
                    pdfPage.AddStamp(imageStamp);
                  }

                pdfDocument.Save(attachment);

I've tried looking through the upgrade documentation but I found no information regarding changes to the ImageStamp class. Thank you for your time.

Viewing all articles
Browse latest Browse all 3131

Trending Articles