Ghostscript is a tool for Linux (and on Windows via Chocolatey)
Creating a single blank/empty PDF page ∞
(convert
is from ImageMagick)
\convert xc:none -page Letter 'blank US letter size PDF.pdf'
- blank US letter sized PDF - (8.5" x 11")
-
blank A4 sized PDF - (210 × 297 mm)
Combining PDFs on Linux ∞
Repairing a PDF ∞
Repairing a PDF on Linux ∞
See also Improving e-reader speeds for Internet Archive books
Using Ghostscript:
gs \ -o output.pdf \ -sDEVICE=pdfwrite \ -dPDFSETTINGS=/prepress \ input.pdf
apt-get install poppler-utils pdftocairo -pdf corrupted.pdf repaired.pdf
sudo apt-get install mupdf-tools mutool clean input.pdf output.pdf
One guy said:
I had a corrupted pdf file, because the php file used to download it echoed some errors (in HTML) and NUL characters at the end.
The solution was to open the pdf with Notepad++ and remove all text after the line
%%EOF
Repairing a PDF on Windows ∞
Installed via Chocolatey and used on Babun (Cygwin). This process is untested.
"/cygdrive/c/Program Files/gs/gs9.23/bin/gswin64c.exe" ^ -o output.pdf ^ -sDEVICE=pdfwrite ^ -dPDFSETTINGS=/prepress ^ input.pdf
Use quit
to exit.
Rotating PDFs on Linux ∞
(convert
is from ImageMagick)
Something was drawn landscape but scanned portrait? Try:
\nice -n 20 \convert -density 400 -rotate 270 source.pdf target.pdf
or maybe if it was scanned portrait but upside-down, try:
\nice -n 20 \convert -density 400 -rotate 180 source.pdf target.pdf
- The
400
density is really high quality. If it takes too long, reduce that number. Try150
. -
Why nice it? Because your computer might lock up in the attempt. It's stupid, I know.
Converting a PDF to a JPG on Linux ∞
(convert
is from ImageMagick)
Someone sent a fax, which is delivered as a PDF but it's upside-down? Try:
\nice -n 20 \convert -density 150 source.pdf target.jpg
You can also rotate it at the same time, of course:
\nice -n 20 \convert -density 150 -rotate 180 source.pdf target.jpg
-
Why nice it? Because your computer might lock up in the attempt. It's stupid, I know.
Un-encrypting PDFs on Linux ∞
(convert
is from ImageMagick)
\convert name.pdf unencrypted.pdf
It will create a low-resolution PDF from an encrypted PDF.
-
2009-02-04 - There's also
pdfcrack
in the PCLinuxOS repository.
PDF creators ∞
(TODO - some are bookmarked)
-
https://www.pdfforge.org/ [ 1 ]
- Get the latest full installer at http://download.pdfforge.org/download/pdfcreator/PDFCreator-stable
- 2006-04-22 or earlier - version not recorded, at most 0.9.1 -- Seems to crash in some cases.. ugh.
Last updated 2022-07-27 at 17:13:33
Footnotes
- was PDFCreator - was PDFCreator [ ↩ ]
added
- blank PDF page
- merging PDFs