Add Watermark via PHP
Add watermarks to PDF document programmatically using Aspose.PDF for PHP via Java
Add Watermark to PDF File Using PHP via Java Tool
In order to add Watermark to PDF file, we’ll use Aspose.PDF for PHP via Java API which is a feature-rich, powerful and easy-to-use document manipulation tool in php-java. Install Tomcat 9.0 version on any location, add Aspose.PDF.war, for more details check the GitHub page.
Add Watermark via PHP
To try the code in your environment, you need Aspose.PDF for PHP via Java.
- Load the PDF with an instance of Document.
- Create an instance of WatermarkArtifact.
- Set properties of WatermarkArtifact object.
- Add watermark using method Add of Aspose.Pdf.Page.Artifacts collection class.
- Save PDF file