Hi,
We have the requierment, that a delivery note report has to have a copy with a watermark. The same report twice in a single pdf document. If possible the second iteration with a watermark.
To duplicate the report I use a simple script with pdf-utils:
const jsreport = require('jsreport-proxy')
async function afterRender(req, res) {
res.content = await jsreport.pdfUtils.append(res.content, res.content);
}
Can I add a watermark within this script?
Maybe:
- use pdfUtils.parse to manipulate content of the second iteration directly
- or use pdfUtils with merge with another watermark template
What would be te best way to solve such a task?
Reto E.