" it's written in golang"
The Problem with PHP-Watermark
Most of the issues in PHP-Watermark library were coming from one single point – file size and quality issue when watermarking PDF files. Actually, when using the imagemagick + ghostscript for extraction and joining pdf pages, it has a few drawbacks including file-size issue. And this is how this PHP library works internally with PDFs. Many developers were asking for a solution about the file size and PDF quality since releasing of this library.
The Solution – a new CLI tool
So, I’ve created a command line tool for PDF watermarking that will work without converting pages into images. As a result, you’ll get better PDF quality and dramatically smaller file size.
Here is this tool: markpdf. See the readme for usages, options and examples.
BTW, it's written in golang. But you don't need to install golang because you can just download the compiled, independent binary from release page and use it instantly.
You're welcome to download, test and give your valuable feedback!
This post is also published on my personal blog with minor modifications.
Originally published at ajaxray.com