Free Support Forum - aspose.com

About watermark and background's appearance

Hi:

Can I set the watermark or background's "opacity" when using your pdf develop kit ?

I find that the parametre of FormattedText including "text,textColor,textFont,textEncoding,embeded,textSize",how can add the "opacity" as a parametre to my stamping job ?

Attached jpg file is a snap show of adobe acrobat pdf professional 's watermark dialog,this include the choose of appearance.

Thanks.

Hi,

Thank you for considering Aspose.

Yes, the stamp's "opacity" can be set throught Aspose.Pdf.Kit, as the sample codes below does. we treat the "opacity" as a property of watermark or background.

stamp = new Stamp();

//stamp.BindImage(imageFile); // for image

stamp.BindLogo(new FormattedText(...)); // for text
stamp.Opacity = 0.5f; // set opacity
stamp.IsBackground = false;
stamp.SetOrigin(75, 10);
PdfFileStamp filestamp = new PdfFileStamp(In_Pdf, Out_Pdf);
filestamp.AddStamp(stamp);
filestamp.Close();

Thanks,