![]() ![]() There is even an Adobe Reader version for Linux! Careful though, the Acrobat Adobe Reader for Linux hasn’t been updated since 2013, and given the security nightmare of the Windows and macOS versions I wouldn’t touch and old and unmaintained Adobe Reader, even if it does exist. Note that this feature is experimental and the stamp will not be visible in other PDF viewers! Right-click the stamp and choose Properties where you can choose the custom stamp we designed earlier. Okular is another popular option, it even has a stamp feature! Open the PDF file, choose ‘Tools’ → ‘Review’ and ‘Stamp’ from the newly opened toolbar. Make sure to check the result as there is the odd case where Draw can’t fully render the PDF. Don’t use the PDF version of the stamp as LibreOffice Draw does add a white background to the backgroundless PDF, defeating the whole purpose. LibreOffice Draw comes pre-installed with most Linux distros and can edit PDFs. What if you prefer a graphical user interface? Invoking $ pay invoice.pdf will now add a visual stamp and ‘paid’ keyword to the PDF. This is all wrapped in a little shell function for convenience. The ‘-=’ removes the keyword if it already exists, the ‘+=’ appends the keyword, this to prevent duplicated keywords. $ exiftool -keywords- =paid -keywords+ =paid -overwrite_original invoice.pdf I use ExifTool to add a ‘paid’ keyword to the PDF to easily filter (un)paid invoices. The custom image is a great visual aid but doesn’t help the computer to know if the invoice has been paid. ![]() Hence why the QPDF solution is slightly cleaner. This can be solved by creating a PDF with the stamp on the first page followed by a lot of blank pages. ![]() Meaning each page would have the same overlayed image. We need the ‘ multistamp’ and not the ‘stamp’ command here as the later will overlay each page of the input PDF with the first page of the stamp PDF. $ pdftk invoice.pdf multistamp stamp.pdf output outvoice.pdf Also available from the Ubuntu archives and you might already have it installed for some other PDF magic. ![]() We could also use PDFtk to achieve the same result. It even works for PDFs with editable fields but, the editable fields will be on top of the image (in the PDF viewers I tested). Quick and easy enough? Download the resulting PDF with an example invoice. What is the quickest way to stamp an A4 invoice with a digital rubber stamp in the same location? The command-line! Install QPDF (available from the Ubuntu 20.04 archives) and stamp the invoice with your newly created digital rubber stamp! $ qpdf invoice.pdf -overlay stamp.pdf - outvoice.pdf Overlaying a PDF with a transparent image in the CLI The same technique can be used to create a whole collection of stamp templates: a ‘draft’ stamp, a ‘sign here’ stamp, a ‘top secret’ stamp, etc. Why A4? By making the canvas of the image the same size as the source document I can choose the size and position of the stamp on the page. Don’t ask, the world of PDF parsing is deep and dark. Be aware that most PDF viewers will show the PDF with a white background, even if the background isn’t there. The stamp needs to be a transparent PDF as both CLI tools below can only overlay PDFs with other PDFs. I “designed” my custom stamp template in Inkscape and saved it as an A4 PDF file. I looked but it’s surprisingly hard to find a great Preview alternative for Ubuntu/Linux.Ī digital rubber stamp? A picture of my signature? What I need is a way to overlay a PDF with a transparent image! PDF overlayed with a transparent image Designing a custom PDF stamp It’s a simple image, not a digital cryptographically secure signature, but I still need to meet someone who asks for a digital signature instead of a picture of my signature. Very convenient to quickly sign a document and send it back. The Preview application on macOS lets you fill out and sign PDFs. I needed a digital rubber stamp to stamp PDF invoices! I miss my rubber stamp in my paperless PDF office. It helps to quickly see what invoices are paid so I don’t pay twice and… it’s weirdly satisfying. I stamp my paid paper invoices with one of those self-inking rubber stamps. Quickly add a transparent image to a PDF file from the command-line on Linux using qpdf or PDFtk. Add a Transparent Stamp or Signature to a PDF - SuffixĪdd a Transparent Stamp or Signature to a PDF 18 September 2020 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |