Quick PDF conversion with convert blocked? [Solved]

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…:-)

Update: 

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. 

 

Nano Editor Cheat Sheet

… : 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.

GNU Emacs Cheat Sheet for Beginners

… : 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: