We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

watermark in DLS

Thread ID:

Created:

Updated:

Platform:

Replies:

47686 Aug 10,2006 03:22 AM Aug 14,2006 04:55 AM ASP.NET Web Forms (Classic) 4
loading
Tags: PDF
Administrator [Syncfusion]
Asked On August 10, 2006 03:22 AM

Hi..
How i can add a watermark in Flowmodel? i am converting an HTML string to PDF and i have to add a watermark image in all pdf files created. How i can do this?

Thanking,

Bhagya T [Syncfusion]
Replied On August 10, 2006 10:26 AM

Hi Skeeb,
Thank you for your interest in Essential PDF. A watermark image can be added to a PDF document using PDFTemplateArea. Use the following code:

//To create a stamp.
PDFTemplateArea stamp = document.Areas.Add( new SizeF( 300, 400 ) );

//Set properties to stamp.
stamp.Foreground = false;
Image img1 = Image.FromFile(@"..\..\Data\PDF.gif");

//Add a image object to stamp.
ImageShape img = stamp.Canvas.AddImage(img1);

Here is a sample for your reference:

WaterMark.zip


Please take a look and let me know if you have any other questions.

Thanks,
Bhagya.

Administrator [Syncfusion]
Replied On August 10, 2006 01:01 PM

Hi Bhagya,
thanks for your replay. But sadly that dosent serve my requirement. I have to show the image/text over the page content with some rotation. May be i am ignorant about some of the cool features of this product. can you help me please?


Bhagya T [Syncfusion]
Replied On August 11, 2006 01:47 AM

Hi Skeeb,
Yes, it is possible to show an text or image over the page content. Use the following code to set the rotation of the text:

//To create a stamp
Syncfusion.Pdf.DLS.PDFTemplateArea stamp = document.Areas.Add( new SizeF( 400, 400 ) );

//Set properties to stamp
stamp.Foreground = true;

//Add a text object to stamp
TextShape text = stamp.Canvas.AddText( "APPROVED" );
text.Transform.Rotate( -45 );

Here is a sample for your reference:

WaterMark.zip


Please take a look and let me know if you have any other concerns.

Thanks,
Bhagya.

Administrator [Syncfusion]
Replied On August 14, 2006 04:55 AM

Thanks Bhagya...
I think that will be helpful to me. Let me try your suggession.

Regards,

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;