I have invoices being sent to our system as PDF files.From there I have a script that periodically checks directory for files and prints them to CUPS attached network printers (HP LJ 400) via ipp.Every invoice needs to have 4 copies, so the command used is:lpr -P invoiceprint -# 4 invoice.pdf(invoiceprint is a class consisting of 2 printers, btw)I can see that on each invoice CUPS is creating 4 print jobs, 1 for each copy.Question is how can I superimpose copy number on every copy?So that I would have each copy of the original file coming out with a number Copy 1, Copy 2 etc on it.Is there any way to send superimposed print information to the printer, or should I merge another PDF with the existing one? If so, which is the best tool to do it, and can I add this with CUPS filtering or do I have to create separate PDFs and send each of them to CUPS seperately?
Mark copy id on PDF printout
ubuntu;pdf;printing;cups
Actually there is a utility called pdfstamp, part of libtext-pdf-perl package, which does exactly that -- adds text to existing pdf (as a new layer, apparently).Found info thanks to this question, pdfstamp was mentioned in comments.The only issue is it doesn't seem to understand UTF8, even when using Unicode TTF fonts. 