The following code snippet shows how to apply the watermark to the output pages.
usingGroupDocs.Viewer;usingGroupDocs.Viewer.Options;// ...using(Viewerviewer=newViewer("sample.docx")){// Create an HTML file.HtmlViewOptionsviewOptions=HtmlViewOptions.ForEmbeddedResources();// Add watermarkviewOptions.Watermark=newWatermark("This is a watermark");viewer.View(viewOptions);}
ImportsGroupDocs.ViewerImportsGroupDocs.Viewer.Options' ...
ModuleProgramSubMain(argsAsString())UsingviewerAsViewer=NewViewer("sample.docx")' Create an HTML file.
DimviewOptionsAsHtmlViewOptions=HtmlViewOptions.ForEmbeddedResources()' Add watermark
viewOptions.Watermark=NewWatermark("This is a watermark")viewer.View(viewOptions)EndUsingEndSubEndModule
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.