Very recently I had to convert a PDF (i.e. concatenate three PDFs into one file) and I was blocked for security reasons.
convert *pdf complete.pdf usually adds the files it finds in alphanumerical order to complete.pdf.
But not this time:
“convert: attempt to perform an operation not allowed by the security policy `PDF’ @ error/constitute.c/IsCoderAuthorized/408.”
Googling helped, as it often does, and I found this hint at [Imagemagick security policy ‘PDF’ blocking conversion – Stack Overflow] … :
“Well, I added
<policy domain=”coder” rights=”read | write” pattern=”PDF” />
I added just before in /etc/ImageMagick-7/policy.xml and that makes it work again, but not sure about the security implications of that.”
A comment says that was a Ghostscript vulnerability, but new gs-versions are fine. Let’s hope that’s true…:-)
Since the convert process resulted in bad quality (after I applied the changes above), I had to do some more homework and play with the values of this convert command:
convert -density 200 -trim [Input_PDF_Files]* -quality 50 output.pdf
In my setup, that ends up with decent quality but 2.5 MByte per page.
… : 21 Best Linux Command Cheat Sheets [Free Download] … :
… sort of the Meta-Cheat-Sheet page for Linux, I guess…
… : Linux Command Line Cheat Sheet by DaveChild … :
“Linux Command Line Cheat Sheet by DaveChild“
… : Sed Cheatsheet … :
“Sed Cheat Sheet www.thegeekstuff.com“
… : Nano text editor command cheatsheet | Codexpedia … :
“File Control in nano
nano index.php Open or create the file “index.php” with nano on command line.
Ctrl-o Y Enter Save changes.
Ctrl-r Alt-f Open a new file with a new buffer within nano.
Alt-> Switch to the next file buffer in nano.
Alt-< Switch to the previous file buffer in nano.
Ctrl-x Quit nano.“
… : Vim Cheat Sheet – English … :
:w – write (save) the file, but don’t exit
:w !sudo tee % – write out the current file using sudo
:wq or 😡 or ZZ – write (save) and quit
:q – quit (fails if there are unsaved changes)
:q! or ZQ – quit and throw away unsaved changes
:wqa – write (save) and quit on all tabs“
… : Absolute Beginner’s Guide to Emacs – Jessica Hamrick … :
“This tutorial is mainly for people who have primarily used GUI text editors and coding environments and are not used to a primarily text-based program, running commands in the editor itself, and/or using large amounts of keyboard shortcuts. For reference, here is the list of shortcuts I’ll be introducing in this tutorial:“