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

Extract watermark from RadDocument

1 Answer 70 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Mariusz Gorzoch
Top achievements
Rank 1
Mariusz Gorzoch asked on 23 Aug 2013, 09:19 AM
Hi,

I have document containing watermark. Now I would like to extract this watermark and insert it into new document (RadDocument). 

I saw watermark examples but they modify editor properties. How to get watermark from RadDocument object?

Regards,

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 26 Aug 2013, 04:46 PM
Hi Mariusz,

Watermarks are preserved in the header of each section, so you can obtain them in the following manner:
string watermarkText = this.radRichTextBox.Document.Sections.First.Headers.Default.WatermarkSettings.TextSettings.Text;

The obtained settings can be applied to another document as explained here. In case one of the document instances (either the one you want to copy from or the one you want to apply the watermark to) is not shown in RadRichTextBox, please refer to this article for information on how to use RadDocumentEditor.

I hope this is helpful!

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
RichTextBox
Asked by
Mariusz Gorzoch
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or