blob: 7305a201aeb088fdf818bd00d1583cd400888870 (
plain)
1
2
3
4
5
6
7
8
|
pkgs@{ lib, resholve, zsh, ghostscript_headless, ... }:
resholve.writeScriptBin "pdf2pdf" {
inputs = with pkgs; [ghostscript_headless];
interpreter = lib.getExe zsh;
} ''
exec gs -dPDFSETTINGS=/prepress -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dSAFER -dPreserveAnnots=false "-sOutputFile=''${2:-''${1:r}_pdf2pdf.pdf}" "''${1}"
''
|