Add Watermark
A general definition of a Watermark is, a design (image) embossed into a piece of paper during its production and used for identification of the paper and papermaker. Many desktop publishing sofwares like Microsoft Winword and Adobe Acrobat Writer etc. provide this feature to their end users to add watermark in the pages.
Watermark is embedded as an image inside the pages of a PDF document. Using Aspose.Pdf.Kit, developers can add watermark image to all the pages to a PDF document by just giving a call to the AddWatermark method of PdfFileStamp class.
The watermark in the form of image (Jpg, Gif and Png) can be added on each page of Pdf file at any specified location.
To add a watermark in C#, Java and VB, just follow these steps:
- Create an object of Stamp class, bind an image and set the IsBackgrounda equal to false.
- Create an object of PdfFileStamp class by passing the input and output PDF files as file names or streams.
- Call AddStamp method, then pass the Stamp object.
- Close the PdfFileStamp object.
To add a watermark in Java, just follow these steps (since Aspose.Pdf.Kit for Java v1.4):
- Create an object of Stamp class, bind an image and set the isBackground equal to false.
- Create an object of PdfFileStamp class by passing the input and output PDF files as file names or streams.
- Call addStamp method, then pass the Stamp object.
- Close the PdfFileStamp object.
A general definition of a Watermark is, a design (image) embossed into a piece of paper during its production and used for identification of the paper and papermaker. Many desktop publishing sofwares like Microsoft Winword and Adobe Acrobat Writer etc. provide this feature to their end users to add watermark in the pages.
Watermark is embedded as an image inside the pages of a PDF document. Using Aspose.Pdf.Kit, developers can add watermark image to all the pages to a PDF document by just giving a call to the AddWatermark method of PdfFileStamp class.
The watermark in the form of image (Jpg, Gif and Png) can be added on each page of Pdf file at any specified location.
To add a watermark in C#, Java and VB, just follow these steps:
- Create an object of Stamp class, bind an image and set the IsBackgrounda equal to false.
- Create an object of PdfFileStamp class by passing the input and output PDF files as file names or streams.
- Call AddStamp method, then pass the Stamp object.
- Close the PdfFileStamp object.
To add a watermark in Java, just follow these steps (since Aspose.Pdf.Kit for Java v1.4):
- Create an object of Stamp class, bind an image and set the isBackground equal to false.
- Create an object of PdfFileStamp class by passing the input and output PDF files as file names or streams.
- Call addStamp method, then pass the Stamp object.
- Close the PdfFileStamp object.
fileStamp = new PdfFileStamp(inFile, outFile); Stamp watermarkStamp = new Stamp(); watermarkStamp.bindImage(path + "imgLogoPDFKit.gif"); watermarkStamp.setOrigin(100, 50); watermarkStamp.setRotation(15); fileStamp.addStamp(watermarkStamp); fileStamp.close();
