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

Free Support Forum - aspose.com

PDF.Net StampAnnotation.Opacity Property has NO Effect

Hi, I tryied to use StampAnnotation to put an image as a semi transparent stamp on the PDF. Below is what happened

  1. The stamp is on the PDF. But it’s solid. No transparency.
  2. Right click the stamp to view the property. the Opacity is 50%. It seems the Opacity value is set correctly.
  3. If I open the PDF in Forxit Reader 8.2.0, then drag the stamp to another position. The stamp become semi transparent automatically. It seems the opacity take effect after I move the stamp.
  4. If I open the PDF in Acrobat Reader or Professional. The stamp is still solid even if I move it. I need to change the opacity property of the stamp and save it to make it semi transparent.

Is it a bug in the library? Stamping is a very common and basic feature in PDF and I cannot believe Aspose.PDF still cannot do it correctly.

Aspose.PDF version 17.7
.Net version 4.0

Below is the code:

Aspose.Pdf.Document document = new Aspose.Pdf.Document(“test.pdf”);
StampAnnotation stamp1 = new StampAnnotation(document);
stamp1.Rect = new Rectangle(100, 100, 200, 200);
stamp1.Image = new FileStream(@“Approval.png”, FileMode.Open);
stamp1.Opacity = 0.5;
stamp1.ZIndex = -1;
document.Pages[1].Annotations.Add(stamp1, true);

We managed to replicate the said behavior in our environment. It has been logged under the ticket ID PDFNET-43140 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

We recommend you kindly share your source PDF and image files because it would help us to test the actual scenario in our environment. Your response is awaited.

Best Regards,
Imran Rafique

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan