Skip to content

Instantly share code, notes, and snippets.

@mperlet
Created December 12, 2014 10:01
Show Gist options
  • Select an option

  • Save mperlet/34de0bb08c08e6e6371d to your computer and use it in GitHub Desktop.

Select an option

Save mperlet/34de0bb08c08e6e6371d to your computer and use it in GitHub Desktop.
PDF Site info (number of pages + color pages)
function pdfsites() {
echo "Seitenanzahl: " $(pdfinfo $1 | grep Pages: | cut -d":" -f2 | awk '{$1=$1}{ print }')
echo "Farbseiten: " $(ghostscript -o - -sDEVICE=inkcov $1 | grep -v "^ 0.00000 0.00000 0.00000" | grep "^ " | wc -l)
}
@mperlet

mperlet commented Dec 12, 2014

Copy link
Copy Markdown
Author

pdfsites My.pdf

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