Hi, I tryied to use StampAnnotation to put an image as a semi transparent stamp on the PDF. Below is what happened
- The stamp is on the PDF. But it’s solid. No transparency.
- Right click the stamp to view the property. the Opacity is 50%. It seems the Opacity value is set correctly.
- 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.
- 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);
document.Save(“test.pdf.pdf”);