This is a migrated thread and some comments may be shown as answers.

Images and watermarks

1 Answer 184 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 15 Sep 2017, 06:22 PM

I noticed with 2017 R2, you just added Form Fields handling, thats great!

I reviewed another posting about iterating through images in a PDF.   Can those images be extracted and replaced with another image?

Does the PDFProcessing library allow adding a watermark to existing PDF?

 

Thanks

 

Peter

 

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 19 Sep 2017, 03:28 PM
Hello Peter,

Thank you for the feedback about the form fields, we are happy to hear that you like the functionality.

To change an image in a document, you can use the ImageSource property of the Image class and set the source to point to the new image. More information on how you can work with the source is available in the ImageSource topic.

As to the watermark, in the PDF document format, there is no a concept for watermark but the flexible manner of drawing the objects allows you to draw it on a page. I am attaching a sample project showing how you can use the API to add a text watermark. The method containing the implementation is called AddWaterMarkText().

When working with already generated documents, another option is to use the PdfStreamWriter API. Here is an example of how to add a watermark to a PDF document using this approach.

Hope you will find this helpful.

Regards,
Tanya
Progress Telerik

Tags
PdfProcessing
Asked by
Peter
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or