Insert Watermark

Technical support for Spire.Doc

Moderator: iceblue support

Insert Watermark

Postby Nicholas » Tue Jan 25, 2011 2:38 am

I have created a Word doucment with 10 pages. Now, I want to insert watermark in even pages, how should I do?
Posts: 9
Joined: Tue Dec 28, 2010 1:16 am

Re: Insert Watermark

Postby iceblue support » Thu Jan 27, 2011 1:12 am

The function can't be supported with Microsoft Word. So in Spire.Doc, we can't insert a watermark only in the odd pages. However, you may use header and footer method to realize it. You can first set different header or footer between odd and even pages. And then you may insert a picture in the odd pages, then set the picture behind text. If your picture is big enough, it will look like watermark in the word document. Following is the code:
section.PageSetup.DifferentOddAndEvenPagesHeaderFooter = true;
Paragraph efp = section.HeadersFooters.EvenHeader.AddParagraph();
//header picture layout - text wrapping
headerPicture.TextWrappingStyle = TextWrappingStyle.Behind;
//header picture layout - position
headerPicture.HorizontalOrigin = HorizontalOrigin.Page;
headerPicture.HorizontalAlignment = ShapeHorizontalAlignment.Left;
headerPicture.VerticalOrigin = VerticalOrigin.Page;
headerPicture.VerticalAlignment = ShapeVerticalAlignment.Top;
e-iceblue support
User avatar
iceblue support
Posts: 244
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests