WP28: robust PDF validation
6 changed files +1 −1
added
results/figures/pdf_check/page_1-01.png
+0 −0
Binary file not shown.
added
results/figures/pdf_check/page_10-10.png
+0 −0
Binary file not shown.
added
results/figures/pdf_check/page_2-02.png
+0 −0
Binary file not shown.
added
results/figures/pdf_check/page_27-27.png
+0 −0
Binary file not shown.
added
results/figures/pdf_check/page_54-54.png
+0 −0
Binary file not shown.
modified
scripts/validate_pdf.sh
+1 −1
@@ -4,7 +4,7 @@ set -e | |||||
| 4 | cd "$(dirname "$0")/../paper" | 4 | cd "$(dirname "$0")/../paper" | ||
| 5 | test -s main.pdf || { echo "main.pdf missing/empty"; exit 1; } | 5 | test -s main.pdf || { echo "main.pdf missing/empty"; exit 1; } | ||
| 6 | pages=$(pdfinfo main.pdf | awk '/^Pages/ {print $2}'); echo "pages: $pages" | 6 | pages=$(pdfinfo main.pdf | awk '/^Pages/ {print $2}'); echo "pages: $pages" | ||
| 7 | −pdftotext -l 2 main.pdf - | grep -q "Working Paper No. 28" && echo "title page OK (Working Paper No. 28)" || { echo "title page check FAILED"; exit 1; } | 7 | +pdftotext -l 1 main.pdf - | tr -d " \n" | grep -qi "workingpaperno.28" && echo "title page OK (Working Paper No. 28)" || { echo "title page check FAILED"; exit 1; } | ||
| 8 | pdftotext main.pdf - | grep -c "Theorem" | xargs -I{} echo "occurrences of 'Theorem' in text: {}" | 8 | pdftotext main.pdf - | grep -c "Theorem" | xargs -I{} echo "occurrences of 'Theorem' in text: {}" | ||
| 9 | und=$(grep -c "undefined" main.log || true); echo "undefined references/citations warnings in main.log: $und" | 9 | und=$(grep -c "undefined" main.log || true); echo "undefined references/citations warnings in main.log: $und" | ||
| 10 | ovf=$(grep -c "Overfull" main.log || true); echo "overfull boxes: $ovf" | 10 | ovf=$(grep -c "Overfull" main.log || true); echo "overfull boxes: $ovf" | ||
| 11 | 11 | ||||