Skip to content

Instantly share code, notes, and snippets.

@okathira
Created June 17, 2019 00:20
Show Gist options
  • Save okathira/dbed5b9f542cf661eb79622678335c82 to your computer and use it in GitHub Desktop.
Save okathira/dbed5b9f542cf661eb79622678335c82 to your computer and use it in GitHub Desktop.
Resize PDF (A6) with Ghostscript.
Param($pdfsrc)
$pdfout = (Get-Item $pdfsrc).DirectoryName + "\" + (Get-Item $pdfsrc).BaseName + "_resizedA6.pdf"
echo "$pdfsrc"
echo "$pdfout"
gswin64c.exe -sDEVICE=pdfwrite -sPAPERSIZE=a6 -dFIXEDMEDIA -dPDFFitPage -o $pdfout $pdfsrc
@okathira
Copy link
Author

okathira commented Jun 17, 2019

If you want to drag and drop PDF to this script, use a shortcut with some options or another wrapper script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment