mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

commit f0b130d03b60f9c07f7699071e3a01ee87d99984
parent c97b5e456996ef654b5e3bf03b6f4af2c459bcb5
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri,  1 May 2015 09:51:06 +0200

checkpdf

Diffstat:
checkpdf | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/checkpdf b/checkpdf @@ -0,0 +1,23 @@ +#!/bin/bash + +# check common problems with PDFs before submitting a camera-ready + +FILE="$1" +TMP="`mktemp`.pdf" + +echo "CHECK number of pages" +identify -verbose "$FILE" | grep "Print size" | wc -l +echo "CHECK paper size" +identify -verbose "$FILE" | grep "Print size" +pdfcrop "$FILE" "$TMP" +echo "CHECK print area size" +identify -verbose "$TMP" | grep "Print size" +echo "CHECK metainfo" +exiftool "$FILE" | grep -E "^Title|^Author" +echo "CHECK metainfo bugs" +exiftool "$FILE" | grep "^Warning" +echo "CHECK font embedding" +pdffonts "$FILE" | sed '1,2d' | grep ' no' +echo "CHECK font type" +pdffonts "$FILE" | sed '1,2d' | grep -v 'Type 1' +