OCR
nix shell nixpkgs#ocrmypdf --command ocrmypdf --language deu --force-ocr input.pdf output.pdf
OCRs the German text in the scanned document and overlays the OCRed text onto it.
Deskew
nix shell nixpkgs#ocrmypdf --command ocrmypdf --deskew input.pdf output.pdf
Deskews crooked pages.
Fake duplex
nix shell nixpkgs#pdfcpu --command pdfcpu merge -mode zip output.pdf front.pdf back.pdf
Produces a 2-sided document by interleaving the given odd- and even-numbered pages (scanned by a non-duplex scanner).
Extract images
nix shell nixpkgs#poppler_utils --command pdfimages -j -png input.pdf sample
Extracts the JPEGs from the given document as PNGs.