Every now and then, you might run into a situation where your *nix installation won’t start due to a corrupted/damaged journal, be it due to power failure or disk failure.
GhostScript is incredibly powerful tool for manipulating many different document formats, among others also PDF.
Yet, its cryptic command format makes it sometimes hard to get something done; but most of the operations can be simply done by template.
Few days ago I needed this code, but surprisingly, most of the stuff you can find on the Net is “I don’t know how”, and very scarcely you can see a code that seems to work.
Yet, it’s trivial.
Though creating a https-enabled server with verified certificate is a pain (as it should be, otherwise all would do it), creating a self-signed certificate for https is a piece of cake.
This tutorial is for Linux, but other platforms have the steps very similar.