From 7fe6ca2ca6d0bff32f0ab47606ac0511465f73d3 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sun, 10 May 2020 22:54:11 +0200 Subject: [PATCH] PDF/A additions --- README.md | 17 ++++++++++++++++- pdfa.sh | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cac4172..4b8606c 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,22 @@ See the [pre-built version](build/thesis.pdf) for details 4. Write the thesis. 5. Submit and defend the thesis. -PDF-A validation can be checked using the validator: https://github.com/mff-cuni-cz/cuni-thesis-validator +## PDF/A + +With a bit of luck, you should get PDF/A right out of LaTeX. + +A working PDF/A validator that can point out exact problems is here: https://github.com/mff-cuni-cz/cuni-thesis-validator + +Common PDF/A problems include: + +- imported PDF pictures that are not PDF/A. +- the used font does not support PDF/A (including the fonts in imported pictures). See https://martin.hoppenheit.info/blog/2018/pdfa-validation-and-inconsistent-glyph-width-information/ for a very ugly case. + +Solutions: + +- use `pdfa.sh` to convert PDFs to PDF/A-compatible form the "hard way" (although this does _not_ retain the PDF/A metadata mark, see comments in the script). +- read the commentary by Martin Mareš (that describes most of the common problems) here: https://mj.ucw.cz/vyuka/bc/pdfaq.html +- use `pdfa.sh` as a last resort for `thesis.pdf` if everything other fails ## Ideas/improvements/more examples? diff --git a/pdfa.sh b/pdfa.sh index 1fa5934..dce617a 100755 --- a/pdfa.sh +++ b/pdfa.sh @@ -13,3 +13,7 @@ gs -dPDFA=1 \ -dPDFACompatibilityPolicy=3 \ -sOutputFile="pdfa-$1" \ "$1" + +# note: PDFACompatibilityPolicy=3 actually doesn't exist. A bug in ghostscript +# interprets is as something between 1 and 2, without unnecessary failing on +# various dumb errors.