summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/utils/pdf2pdf.nix
blob: 9f4cbc3eda03a046c7bab9fb6d947c93e2013cf8 (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}"
''