We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

WAtermark not visible on print document when the position bottom and right

when i put a watermark in position bottom and right, i dont see it when i print the document.

See the code and the file attach

Aspose.Words.Drawing.Shape watermark = new Aspose.Words.Drawing.Shape(doc, Aspose.Words.Drawing.ShapeType.TextPlainText);

// Set up the text of the watermark.
watermark.TextPath.Text = watermarkText;
watermark.TextPath.FontFamily = "Arial";
watermark.Width = watermarkText.Length * 3;
watermark.Height = 8 * watermarkText.Split(new string[]{"\n"},StringSplitOptions.RemoveEmptyEntries).Count();

watermark.Rotation = 0;
watermark.VerticalAlignment = Aspose.Words.Drawing.VerticalAlignment.Bottom;
watermark.HorizontalAlignment = Aspose.Words.Drawing.HorizontalAlignment.Right;
watermark.Fill.Color = System.Drawing.Color.Black;
watermark.StrokeColor = System.Drawing.Color.Black;

watermark.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
watermark.RelativeVerticalPosition = RelativeVerticalPosition.Page;
watermark.WrapType = WrapType.None;

// Create a new paragraph and append the watermark to this paragraph.
Aspose.Words.Paragraph watermarkPara = new Aspose.Words.Paragraph(doc);
watermarkPara.ParagraphBreakFont.Size = 1;

Aspose.Words.Section sect = doc.FirstSection;

// Insert the watermark into all headers of each document section.
//foreach (Aspose.Words.Section sect in doc.Sections)
// There could be up to three different headers in each section, since we want
// the watermark to appear on all pages, insert into all headers.
InsertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HeaderPrimary);
InsertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HeaderFirst);
InsertWatermarkIntoHeader(watermarkPara, sect, HeaderFooterType.HeaderEven);
// }

Can you help me??

Hi Laurent,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 17.3.0 and have not found the shared issue. Please use Aspose.Words for .NET 17.3.0.

Hi ,
Thank for your answer.

I try with the version 17.3.0 and the problem persist.

Did you test with the file attach??


Hi Laurent,

Thanks for your inquiry. We used the same input document (IC778.docx) to test this scenario. Please make sure that you are using the latest version of Aspose.Words for .NET 17.3.0 and same input document.

You may try calling Document.UpdatePageLayout method before printing the document. Hope this helps you.