DEV Community

Cover image for Display a document in browser with Watermark
Atir Tahir
Atir Tahir

Posted on

Display a document in browser with Watermark

GroupDocs.Viewer is a back-end, UI-Agnostic API that could be integrated in any .NET application without any third-party tool or software dependency.
Implementation

  1. API renders the source file into PDF, HTML or an Image format
  2. Apply watermark and display the rendered file(s) in your application (web or Window Forms)
using (Viewer viewer = new Viewer("sample.docx"))
{
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.Watermark = new Watermark("This is a watermark");

    viewer.View(viewOptions);
}
Enter fullscreen mode Exit fullscreen mode

All you have to do is to download and add this DLL as a reference in your application. In case of any issue, post it on this free support forum.

Top comments (0)