Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to add a watermark with a text or image to the document

$
0
0

This example illustrates how you can add a watermark to the document. The main idea is to add a corresponding Floating Object (TextBox or Picture) to the header section (see SubDocument essentials - simple examples). Take special note of the TextRenderer.MeasureText Method, which is used to calculate the correct size of a textual watermark.

See Also:
SubDocument.InsertPicture Method
SubDocument.InsertTextBox Method

Question Comments

Added By: TRAINEAU SOIZIC at: 10/24/2012 3:42:24 AM    

Don't work for me with the last build :
the text on the page (the real one : not the watermark text) disapears from left to right when zooming ... try to set the zoom at 200 %

Added By: TRAINEAU SOIZIC at: 10/24/2012 3:45:14 AM    

in fact it seems that it is a horizontal scrollbar problem ... try to zoom and play with Hscrolling

Added By: Anders Wang at: 9/4/2014 11:57:01 PM    

But, After you save as it to word, You can see the layout is corrupted by the watermark. So how to deal with it?

Added By: Elliot (DevExpress Support) at: 9/5/2014 6:32:17 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T147935: Corrupted document layout. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>