Add Watermark via CLI

Add watermarks to PDF document programmatically using Aspose.PDF for Aspose.PDF CLI

Add Watermark to PDF File Using Aspose.PDF CLI Tool

In order to add Watermark to PDF file, we’ll use Aspose.PDF CLI API. The tool is powered by the Aspose.PDF for C++ library and is available for different operating systems including macOS, Linux, and Windows. You can download its versions directly from Aspose.PDF CLI App. Working with command lines is simple and clear. Just use the command line to execute specific commands related to PDF processing. Choose from a range of available functionalities (e.g., text extraction, encryption, adding watermarks, etc) to perform on the PDF.

Add Watermark via CLI


You need Aspose.PDF CLI to try the code in your environment.

  1. Load the PDF with an instance of Document.
  2. Create an instance of WatermarkArtifact.
  3. Set properties of WatermarkArtifact object.
  4. Add watermark using method Add of Aspose.Pdf.Page.Artifacts collection class.
  5. Save PDF file

Add Watermark to PDF - CLI


    asposepdftool addstamp [options] <PDF-file> <image-file> [<result-file>]