proof-pdf 0.3.7__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/NOTICE +0 -2
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/PKG-INFO +141 -26
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/README.md +128 -12
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/pyproject.toml +32 -87
- proof_pdf-0.4.0/rust/.config/nextest.toml +6 -0
- proof_pdf-0.4.0/rust/CHECKS.md +301 -0
- proof_pdf-0.4.0/rust/Cargo.lock +2627 -0
- proof_pdf-0.4.0/rust/Cargo.toml +100 -0
- proof_pdf-0.4.0/rust/build.rs +333 -0
- proof_pdf-0.4.0/rust/checks.toml +2568 -0
- proof_pdf-0.4.0/rust/clauses/iso-15930-1.txt +70 -0
- proof_pdf-0.4.0/rust/clauses/iso-15930-3.txt +58 -0
- proof_pdf-0.4.0/rust/clauses/iso-15930-4.txt +58 -0
- proof_pdf-0.4.0/rust/clauses/iso-15930-6.txt +63 -0
- proof_pdf-0.4.0/rust/clauses/iso-15930-7.txt +91 -0
- proof_pdf-0.4.0/rust/clauses/iso-15930-8.txt +52 -0
- proof_pdf-0.4.0/rust/clauses/iso-32000-1.txt +824 -0
- proof_pdf-0.4.0/rust/clauses/iso-32000-2.txt +1030 -0
- proof_pdf-0.4.0/rust/clippy.toml +6 -0
- proof_pdf-0.4.0/rust/deny.toml +22 -0
- proof_pdf-0.4.0/rust/examples/verify.rs +41 -0
- proof_pdf-0.4.0/rust/rust-toolchain.toml +3 -0
- proof_pdf-0.4.0/rust/rustfmt.toml +2 -0
- proof_pdf-0.4.0/rust/src/bin/proof-pdf.rs +5 -0
- proof_pdf-0.4.0/rust/src/checks/annots.rs +442 -0
- proof_pdf-0.4.0/rust/src/checks/boxes.rs +230 -0
- proof_pdf-0.4.0/rust/src/checks/codecs.rs +173 -0
- proof_pdf-0.4.0/rust/src/checks/colour.rs +1072 -0
- proof_pdf-0.4.0/rust/src/checks/complete.rs +371 -0
- proof_pdf-0.4.0/rust/src/checks/contents.rs +469 -0
- proof_pdf-0.4.0/rust/src/checks/contrast.rs +393 -0
- proof_pdf-0.4.0/rust/src/checks/fonts.rs +576 -0
- proof_pdf-0.4.0/rust/src/checks/gray.rs +512 -0
- proof_pdf-0.4.0/rust/src/checks/info.rs +430 -0
- proof_pdf-0.4.0/rust/src/checks/ink.rs +298 -0
- proof_pdf-0.4.0/rust/src/checks/intent.rs +849 -0
- proof_pdf-0.4.0/rust/src/checks/inventory.rs +443 -0
- proof_pdf-0.4.0/rust/src/checks/jpx.rs +409 -0
- proof_pdf-0.4.0/rust/src/checks/keys.rs +627 -0
- proof_pdf-0.4.0/rust/src/checks/limits.rs +281 -0
- proof_pdf-0.4.0/rust/src/checks/metadata.rs +1011 -0
- proof_pdf-0.4.0/rust/src/checks/modes.rs +1105 -0
- proof_pdf-0.4.0/rust/src/checks/names.rs +186 -0
- proof_pdf-0.4.0/rust/src/checks/optional.rs +208 -0
- proof_pdf-0.4.0/rust/src/checks/page.rs +528 -0
- proof_pdf-0.4.0/rust/src/checks/painted.rs +542 -0
- proof_pdf-0.4.0/rust/src/checks/resolution.rs +274 -0
- proof_pdf-0.4.0/rust/src/checks/spots.rs +1033 -0
- proof_pdf-0.4.0/rust/src/checks/targets.rs +942 -0
- proof_pdf-0.4.0/rust/src/checks/text.rs +360 -0
- proof_pdf-0.4.0/rust/src/checks/transparency.rs +103 -0
- proof_pdf-0.4.0/rust/src/checks/walk.rs +154 -0
- proof_pdf-0.4.0/rust/src/checks/x13.rs +374 -0
- proof_pdf-0.4.0/rust/src/checks/x4.rs +280 -0
- proof_pdf-0.4.0/rust/src/checks/x4p.rs +1031 -0
- proof_pdf-0.4.0/rust/src/checks/x5g.rs +314 -0
- proof_pdf-0.4.0/rust/src/checks.rs +1018 -0
- proof_pdf-0.4.0/rust/src/cli/args.rs +276 -0
- proof_pdf-0.4.0/rust/src/cli/config.rs +501 -0
- proof_pdf-0.4.0/rust/src/cli/output.rs +270 -0
- proof_pdf-0.4.0/rust/src/cli/run.rs +467 -0
- proof_pdf-0.4.0/rust/src/cli/tools.rs +628 -0
- proof_pdf-0.4.0/rust/src/cli.rs +522 -0
- proof_pdf-0.4.0/rust/src/common/date.rs +315 -0
- proof_pdf-0.4.0/rust/src/common/encoding.rs +213 -0
- proof_pdf-0.4.0/rust/src/common/family.rs +272 -0
- proof_pdf-0.4.0/rust/src/common/font.rs +792 -0
- proof_pdf-0.4.0/rust/src/common/function.rs +948 -0
- proof_pdf-0.4.0/rust/src/common/glyphs.rs +637 -0
- proof_pdf-0.4.0/rust/src/common/icc.rs +409 -0
- proof_pdf-0.4.0/rust/src/common/jbig2.rs +229 -0
- proof_pdf-0.4.0/rust/src/common/jpeg.rs +197 -0
- proof_pdf-0.4.0/rust/src/common/jpx.rs +478 -0
- proof_pdf-0.4.0/rust/src/common/lab.rs +236 -0
- proof_pdf-0.4.0/rust/src/common/labels.rs +161 -0
- proof_pdf-0.4.0/rust/src/common/program.rs +43 -0
- proof_pdf-0.4.0/rust/src/common/pyfmt.rs +143 -0
- proof_pdf-0.4.0/rust/src/common/raster.rs +181 -0
- proof_pdf-0.4.0/rust/src/common/rect.rs +80 -0
- proof_pdf-0.4.0/rust/src/common/sfnt.rs +69 -0
- proof_pdf-0.4.0/rust/src/common/text.rs +75 -0
- proof_pdf-0.4.0/rust/src/common/url.rs +89 -0
- proof_pdf-0.4.0/rust/src/common/xmp.rs +520 -0
- proof_pdf-0.4.0/rust/src/common.rs +23 -0
- proof_pdf-0.4.0/rust/src/content.rs +573 -0
- proof_pdf-0.4.0/rust/src/document.rs +1077 -0
- proof_pdf-0.4.0/rust/src/extract/image.rs +896 -0
- proof_pdf-0.4.0/rust/src/extract/interactive.rs +807 -0
- proof_pdf-0.4.0/rust/src/extract/tagged.rs +436 -0
- proof_pdf-0.4.0/rust/src/extract/vector.rs +1042 -0
- proof_pdf-0.4.0/rust/src/extract.rs +1089 -0
- proof_pdf-0.4.0/rust/src/file.rs +1353 -0
- proof_pdf-0.4.0/rust/src/filters.rs +937 -0
- proof_pdf-0.4.0/rust/src/findings.rs +519 -0
- proof_pdf-0.4.0/rust/src/graphics.rs +2258 -0
- proof_pdf-0.4.0/rust/src/lib.rs +25 -0
- proof_pdf-0.4.0/rust/src/pipeline.rs +137 -0
- proof_pdf-0.4.0/rust/src/preview.rs +379 -0
- proof_pdf-0.4.0/rust/src/python.rs +301 -0
- proof_pdf-0.4.0/rust/src/snapshots/proof_pdf__findings__tests__the_json_schema_1.snap +63 -0
- proof_pdf-0.4.0/rust/src/syntax/lexer.rs +498 -0
- proof_pdf-0.4.0/rust/src/syntax/object.rs +455 -0
- proof_pdf-0.4.0/rust/src/syntax.rs +627 -0
- proof_pdf-0.4.0/rust/src/writer/crop.rs +342 -0
- proof_pdf-0.4.0/rust/src/writer.rs +365 -0
- proof_pdf-0.4.0/rust/tests/architecture.rs +133 -0
- proof_pdf-0.4.0/rust/tests/bdd.rs +212 -0
- proof_pdf-0.4.0/rust/tests/cli.rs +16 -0
- proof_pdf-0.4.0/rust/tests/completeness.rs +167 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x13-colour.feature +38 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x13-identification-trapping.feature +41 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x13-keys-boxes.feature +18 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x13-structure-filters.feature +24 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x13-transparency.feature +27 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.01.2-pre-separated.feature +8 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.04-output-intent.feature +27 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.04.3-colour.feature +18 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.04.3.4-spots.feature +28 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.05-fonts.feature +32 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.06-names.feature +21 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.07-6.26-keys.feature +32 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.08-filters.feature +22 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.09-trapping.feature +13 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.10-metadata.feature +49 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.11-identification.feature +15 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.12-boxes.feature +18 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.15-encryption.feature +13 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.17-annotations.feature +17 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.19-content.feature +39 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.24-optional-content.feature +15 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.25-limits.feature +21 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-6.27-jpeg2000.feature +26 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4-base.feature +14 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x4p-annex-a.feature +66 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x5g-clause-8.feature +56 -0
- proof_pdf-0.4.0/rust/tests/features/pdfx/x5n-clause-7.feature +41 -0
- proof_pdf-0.4.0/rust/tests/features/pipeline.feature +14 -0
- proof_pdf-0.4.0/rust/tests/features/print/ink.feature +24 -0
- proof_pdf-0.4.0/rust/tests/features/print/modes.feature +54 -0
- proof_pdf-0.4.0/rust/tests/features/print/page.feature +38 -0
- proof_pdf-0.4.0/rust/tests/features/print/painted.feature +20 -0
- proof_pdf-0.4.0/rust/tests/features/print/resolution.feature +23 -0
- proof_pdf-0.4.0/rust/tests/features/print/spots.feature +12 -0
- proof_pdf-0.4.0/rust/tests/features/print/text.feature +44 -0
- proof_pdf-0.4.0/rust/tests/features/structure/iso32000-7.3-objects.feature +34 -0
- proof_pdf-0.4.0/rust/tests/features/structure/iso32000-7.5-file-structure.feature +29 -0
- proof_pdf-0.4.0/rust/tests/features/structure/iso32000-7.7-document.feature +9 -0
- proof_pdf-0.4.0/rust/tests/mutation.rs +154 -0
- proof_pdf-0.4.0/rust/tests/pipeline.rs +27 -0
- proof_pdf-0.4.0/src/proof_pdf/_internal/_core.pyi +50 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/_internal/config.py +30 -7
- proof_pdf-0.4.0/src/proof_pdf/_internal/interactive.py +39 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/_internal/previews.py +54 -41
- proof_pdf-0.4.0/src/proof_pdf/_internal/tagged.py +84 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/_internal/vector.py +34 -289
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/cli.py +67 -280
- proof_pdf-0.4.0/src/proof_pdf/config.py +136 -0
- proof_pdf-0.4.0/src/proof_pdf/core.py +180 -0
- proof_pdf-0.4.0/src/proof_pdf/crop.py +39 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/extract.py +252 -264
- proof_pdf-0.4.0/src/proof_pdf/inventory.py +111 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/models.py +35 -7
- proof_pdf-0.4.0/src/proof_pdf/preview.py +48 -0
- proof_pdf-0.3.7/src/proof_pdf/_internal/colour.py +0 -539
- proof_pdf-0.3.7/src/proof_pdf/_internal/content.py +0 -178
- proof_pdf-0.3.7/src/proof_pdf/_internal/contrast.py +0 -203
- proof_pdf-0.3.7/src/proof_pdf/_internal/deltae.py +0 -69
- proof_pdf-0.3.7/src/proof_pdf/_internal/fonts.py +0 -214
- proof_pdf-0.3.7/src/proof_pdf/_internal/functions.py +0 -233
- proof_pdf-0.3.7/src/proof_pdf/_internal/interactive.py +0 -286
- proof_pdf-0.3.7/src/proof_pdf/_internal/paint.py +0 -644
- proof_pdf-0.3.7/src/proof_pdf/_internal/proc.py +0 -32
- proof_pdf-0.3.7/src/proof_pdf/_internal/resolution.py +0 -97
- proof_pdf-0.3.7/src/proof_pdf/_internal/spaces.py +0 -150
- proof_pdf-0.3.7/src/proof_pdf/_internal/spots.py +0 -55
- proof_pdf-0.3.7/src/proof_pdf/_internal/structure.py +0 -415
- proof_pdf-0.3.7/src/proof_pdf/_internal/tagged.py +0 -193
- proof_pdf-0.3.7/src/proof_pdf/_internal/text.py +0 -163
- proof_pdf-0.3.7/src/proof_pdf/_internal/verapdf.py +0 -127
- proof_pdf-0.3.7/src/proof_pdf/config.py +0 -79
- proof_pdf-0.3.7/src/proof_pdf/core.py +0 -223
- proof_pdf-0.3.7/src/proof_pdf/crop.py +0 -56
- proof_pdf-0.3.7/src/proof_pdf/inventory.py +0 -215
- proof_pdf-0.3.7/src/proof_pdf/preview.py +0 -173
- proof_pdf-0.3.7/tests/fixtures/build_pdfs.py +0 -405
- proof_pdf-0.3.7/tests/fixtures/pdfs/black-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/bleed-full.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/bleed-short.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-image-profile.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-pattern.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-profile-mismatch.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-shading.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-stroke-only.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/cmyk-vector.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/colortbl-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/colortbl-default-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/colortbl-rgb-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/corrupt.pdf +0 -38
- proof_pdf-0.3.7/tests/fixtures/pdfs/cyan-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/edge-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/embedded-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/figure-cmyk-pdf.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/figure-rgb-pdf.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/good.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/gray-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/hairline-stroke.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/hairline.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/heavy-ink.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/high-contrast.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/hyperref-colorlinks.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/hyperref-links.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/image-in-tikz.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/image-resolution-ok.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/ink-over-limit.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/ink-within-limit.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/inline-images.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/low-contrast.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/low-dpi-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/low-resolution-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/mask-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/mixed-rgb-profiles.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/no-bleed.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/no-output-intent.pdf +0 -74
- proof_pdf-0.3.7/tests/fixtures/pdfs/notdef-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pdfa-2b-rgb-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pdfa-2b-rgb.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pdfx-x4-cmyk-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pdfx-x4-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pdfx-x4-rgb-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pgfplots-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pgfplots-default-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/pgfplots-rgb-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/plain.pdf +0 -28
- proof_pdf-0.3.7/tests/fixtures/pdfs/registration-spot.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rgb-image-device.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rgb-image-profile.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rgb-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rgb-pattern.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rgb-vector.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rgba-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/rich-black-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/shading-pattern.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/small-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/spot-colour.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/spot-conflict.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/spot-image.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/spot-ink.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/stroke-ok.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tcolorbox-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tcolorbox-default-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tcolorbox-rgb-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/text-black-default.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/text-black-rgb.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/text-k-only-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/text-rich-black-small.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/three-pages.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-cmyk-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-default-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-opacity-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-opacity-group-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-opacity-group-wrong.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-pattern-cmyk-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-rgb-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/tikz-shading-cmyk-doc.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/transparent-matching.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/transparent-mismatch.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/transparent-undeclared.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/two-sizes.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/type3-text.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/white-overprint.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/wrong-size.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-cmyk-option.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-default.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-dvipsnames-rgb.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-dvipsnames.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-gray-option.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-mix-cmyk.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-mix-default.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-models.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-rgb-option.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/pdfs/xcolor-svgnames.pdf +0 -0
- proof_pdf-0.3.7/tests/fixtures/samples/README.md +0 -28
- proof_pdf-0.3.7/tests/fixtures/samples/SOURCES.json +0 -71
- proof_pdf-0.3.7/tests/fixtures/samples/bleed-full.tex +0 -12
- proof_pdf-0.3.7/tests/fixtures/samples/bleed-short.tex +0 -12
- proof_pdf-0.3.7/tests/fixtures/samples/build.py +0 -183
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-image-profile.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-image.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-pattern.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-profile-mismatch.tex +0 -12
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-shading.tex +0 -9
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-stroke-only.tex +0 -9
- proof_pdf-0.3.7/tests/fixtures/samples/cmyk-vector.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/colortbl-cmyk.tex +0 -13
- proof_pdf-0.3.7/tests/fixtures/samples/colortbl-default-doc.tex +0 -13
- proof_pdf-0.3.7/tests/fixtures/samples/colortbl-rgb-doc.tex +0 -13
- proof_pdf-0.3.7/tests/fixtures/samples/expected.toml +0 -355
- proof_pdf-0.3.7/tests/fixtures/samples/figure-cmyk-pdf.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/figure-rgb-pdf.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/gray-image.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/hairline-stroke.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/hyperref-colorlinks.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/hyperref-links.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/image-in-tikz.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/image-resolution-ok.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/ink-over-limit.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/ink-within-limit.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/inline-images.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/low-resolution-image.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/mask-image.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/mixed-rgb-profiles.tex +0 -11
- proof_pdf-0.3.7/tests/fixtures/samples/pdfa-2b-rgb-image.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/pdfa-2b-rgb-image.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/pdfa-2b-rgb.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/pdfa-2b-rgb.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/pdfraw.tex +0 -44
- proof_pdf-0.3.7/tests/fixtures/samples/pdfx-x4-cmyk-image.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/pdfx-x4-cmyk-image.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/pdfx-x4-cmyk.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/pdfx-x4-cmyk.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/pdfx-x4-rgb-image.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/pdfx-x4-rgb-image.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/pgfplots-cmyk.tex +0 -14
- proof_pdf-0.3.7/tests/fixtures/samples/pgfplots-default-doc.tex +0 -14
- proof_pdf-0.3.7/tests/fixtures/samples/pgfplots-rgb-doc.tex +0 -14
- proof_pdf-0.3.7/tests/fixtures/samples/rgb-image-device.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/rgb-image-profile.tex +0 -9
- proof_pdf-0.3.7/tests/fixtures/samples/rgb-pattern.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/rgb-vector.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/rgba-image.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/shading-pattern.tex +0 -11
- proof_pdf-0.3.7/tests/fixtures/samples/spot-colour.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/spot-conflict.tex +0 -9
- proof_pdf-0.3.7/tests/fixtures/samples/spot-image.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/stroke-ok.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/tcolorbox-cmyk.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/tcolorbox-default-doc.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/tcolorbox-rgb-doc.tex +0 -10
- proof_pdf-0.3.7/tests/fixtures/samples/text-black-default.tex +0 -6
- proof_pdf-0.3.7/tests/fixtures/samples/text-black-rgb.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/text-k-only-cmyk.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/text-rich-black-small.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-cmyk-doc.tex +0 -13
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-default-doc.tex +0 -13
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-opacity-cmyk.tex +0 -11
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-opacity-group-cmyk.tex +0 -15
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-opacity-group-cmyk.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-opacity-group-wrong.tex +0 -15
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-opacity-group-wrong.xmpdata +0 -4
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-pattern-cmyk-doc.tex +0 -12
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-rgb-doc.tex +0 -13
- proof_pdf-0.3.7/tests/fixtures/samples/tikz-shading-cmyk-doc.tex +0 -11
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-cmyk-option.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-default.tex +0 -8
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-dvipsnames-rgb.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-dvipsnames.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-gray-option.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-mix-cmyk.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-mix-default.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-models.tex +0 -15
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-rgb-option.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/samples/xcolor-svgnames.tex +0 -7
- proof_pdf-0.3.7/tests/fixtures/suites/README.md +0 -35
- proof_pdf-0.3.7/tests/fixtures/suites/expected.toml +0 -22
- proof_pdf-0.3.7/tests/test_proof_pdf/__init__.py +0 -1
- proof_pdf-0.3.7/tests/test_proof_pdf/_samples.py +0 -10
- proof_pdf-0.3.7/tests/test_proof_pdf/conftest.py +0 -206
- proof_pdf-0.3.7/tests/test_proof_pdf/test_bleed.py +0 -166
- proof_pdf-0.3.7/tests/test_proof_pdf/test_cli.py +0 -441
- proof_pdf-0.3.7/tests/test_proof_pdf/test_colour.py +0 -940
- proof_pdf-0.3.7/tests/test_proof_pdf/test_config.py +0 -153
- proof_pdf-0.3.7/tests/test_proof_pdf/test_content.py +0 -122
- proof_pdf-0.3.7/tests/test_proof_pdf/test_contrast.py +0 -181
- proof_pdf-0.3.7/tests/test_proof_pdf/test_core.py +0 -276
- proof_pdf-0.3.7/tests/test_proof_pdf/test_crop.py +0 -92
- proof_pdf-0.3.7/tests/test_proof_pdf/test_deltae.py +0 -47
- proof_pdf-0.3.7/tests/test_proof_pdf/test_extract.py +0 -631
- proof_pdf-0.3.7/tests/test_proof_pdf/test_fixtures_current.py +0 -25
- proof_pdf-0.3.7/tests/test_proof_pdf/test_integration.py +0 -464
- proof_pdf-0.3.7/tests/test_proof_pdf/test_inventory.py +0 -145
- proof_pdf-0.3.7/tests/test_proof_pdf/test_load_profile.py +0 -90
- proof_pdf-0.3.7/tests/test_proof_pdf/test_paint.py +0 -234
- proof_pdf-0.3.7/tests/test_proof_pdf/test_preview.py +0 -138
- proof_pdf-0.3.7/tests/test_proof_pdf/test_proc.py +0 -51
- proof_pdf-0.3.7/tests/test_proof_pdf/test_public_api.py +0 -14
- proof_pdf-0.3.7/tests/test_proof_pdf/test_resolution.py +0 -146
- proof_pdf-0.3.7/tests/test_proof_pdf/test_samples.py +0 -57
- proof_pdf-0.3.7/tests/test_proof_pdf/test_structure.py +0 -308
- proof_pdf-0.3.7/tests/test_proof_pdf/test_suites.py +0 -42
- proof_pdf-0.3.7/tests/test_proof_pdf/test_texlog.py +0 -129
- proof_pdf-0.3.7/tests/test_proof_pdf/test_text.py +0 -180
- proof_pdf-0.3.7/tests/test_proof_pdf/test_verapdf.py +0 -108
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/LICENSE +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/__init__.py +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/_internal/__init__.py +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/_internal/tables.py +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/_internal/xmp.py +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/layout.py +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/py.typed +0 -0
- {proof_pdf-0.3.7 → proof_pdf-0.4.0}/src/proof_pdf/texlog.py +0 -0
|
@@ -2,8 +2,6 @@ proof-pdf
|
|
|
2
2
|
Copyright 2026 Ilja Orlovs. Licensed under the Apache License, Version 2.0.
|
|
3
3
|
|
|
4
4
|
Python dependencies (installed by pip)
|
|
5
|
-
pikepdf MPL-2.0 (bundles qpdf, Apache-2.0)
|
|
6
|
-
Pillow MIT-CMU
|
|
7
5
|
Typer MIT
|
|
8
6
|
|
|
9
7
|
External programs, run as separate processes and never linked or bundled in the
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: proof-pdf
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Hold print PDFs to PDF/X-4 and PDF/A: veraPDF, page boxes, geometry, ink and image resolution.
|
|
5
|
-
Keywords: pdf,pdf/x-4,pdf/a,verapdf,prepress,print,preflight,ghostscript,lualatex
|
|
6
|
-
Author-Email: Ilja Orlovs <ilja@release.art>
|
|
7
|
-
License-Expression: Apache-2.0
|
|
8
|
-
License-File: LICENSE
|
|
9
|
-
License-File: NOTICE
|
|
3
|
+
Version: 0.4.0
|
|
10
4
|
Classifier: Development Status :: 3 - Alpha
|
|
11
5
|
Classifier: Environment :: Console
|
|
12
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -14,15 +8,19 @@ Classifier: Programming Language :: Python :: 3.15
|
|
|
14
8
|
Classifier: Topic :: Printing
|
|
15
9
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
16
10
|
Classifier: Typing :: Typed
|
|
11
|
+
Requires-Dist: typer>=0.27.3
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
License-File: NOTICE
|
|
14
|
+
Summary: Hold print PDFs to PDF/X-4 and PDF/A: veraPDF, page boxes, geometry, ink and image resolution.
|
|
15
|
+
Keywords: pdf,pdf/x-4,pdf/a,verapdf,prepress,print,preflight,ghostscript,lualatex
|
|
16
|
+
Author-email: Ilja Orlovs <ilja@release.art>
|
|
17
|
+
License-Expression: Apache-2.0
|
|
18
|
+
Requires-Python: >=3.15, <3.16
|
|
19
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
20
|
+
Project-URL: Changelog, https://github.com/release-art/proofpress/blob/main/CHANGELOG.md
|
|
17
21
|
Project-URL: Homepage, https://github.com/release-art/proofpress
|
|
18
|
-
Project-URL: Repository, https://github.com/release-art/proofpress
|
|
19
22
|
Project-URL: Issues, https://github.com/release-art/proofpress/issues
|
|
20
|
-
Project-URL:
|
|
21
|
-
Requires-Python: <3.16,>=3.15
|
|
22
|
-
Requires-Dist: pikepdf>=10.17.0
|
|
23
|
-
Requires-Dist: pillow>=12.3.0
|
|
24
|
-
Requires-Dist: typer>=0.27.3
|
|
25
|
-
Description-Content-Type: text/markdown
|
|
23
|
+
Project-URL: Repository, https://github.com/release-art/proofpress
|
|
26
24
|
|
|
27
25
|
# proofpress
|
|
28
26
|
|
|
@@ -34,7 +32,7 @@ Open-source pieces of a print-on-demand pipeline, extracted from production use.
|
|
|
34
32
|
|
|
35
33
|
| Piece | What it is |
|
|
36
34
|
|---|---|
|
|
37
|
-
| [`proof-pdf`](#proof-pdf) | CLI and library that hold a print PDF to PDF/X
|
|
35
|
+
| [`proof-pdf`](#proof-pdf) | CLI and library that hold a print PDF to PDF/X, print checks and, when asked, PDF/A. |
|
|
38
36
|
| [`releaseart/lualatex`](#docker-images) | TeX Live 2025 with LuaLaTeX. |
|
|
39
37
|
| [`releaseart/lualatex-python`](#docker-images) | Python, `lualatex`, Ghostscript and veraPDF: everything `proof-pdf` needs, without it. A base to `pip install` it on. |
|
|
40
38
|
| [`releaseart/full`](#docker-images) | `lualatex` plus Ghostscript, veraPDF and `proof-pdf`. |
|
|
@@ -43,25 +41,43 @@ Open-source pieces of a print-on-demand pipeline, extracted from production use.
|
|
|
43
41
|
|
|
44
42
|
`verify` runs four layers, each of which can be switched off:
|
|
45
43
|
|
|
46
|
-
- **PDF/A** with [veraPDF](https://verapdf.org) (`--flavour 2b` by default
|
|
47
|
-
- **PDF/X
|
|
44
|
+
- **PDF/A** with [veraPDF](https://verapdf.org), when asked (`--pdfa`; `--flavour 2b` by default).
|
|
45
|
+
- **PDF/X**: every requirement of ISO 15930-7 (PDF/X-4, X-4p) and ISO 15930-8 (PDF/X-5g, X-5pg, X-5n) that a file can be
|
|
46
|
+
judged on, from the output intent and metadata to fonts, colour, transparency and referenced files (`--pdfx x4` by
|
|
47
|
+
default, another level with `--pdfx x4p|x5g|x5pg|x5n`, `--no-pdfx` to skip). The counts are under [Checks](#checks).
|
|
48
|
+
PDF/X-1a:2001, X-3:2002, X-1a:2003 and X-3:2003 (ISO 15930-1, -3, -4, -6) are checked too (`--pdfx
|
|
49
|
+
x1a-2001|x3-2002|x1a-2003|x3-2003`); without `--pdfx`, a file whose Info claims one of them is verified at it.
|
|
48
50
|
- **Geometry**: trim and bleed against the finished size you expect. Runs only when `--trim-mm` is given (`--bleed-mm`, `--tolerance-mm`).
|
|
49
|
-
|
|
51
|
+
For a book interior, `--binding-bleed-mm 0` (with `--binding left|right`, the bound edge of page 1; it alternates page by page) expects no bleed on the binding edge,
|
|
52
|
+
so the sheet is wider by the outer bleed only; the centring check follows the asymmetry.
|
|
53
|
+
- **Colour**: total ink coverage, when asked (`--tac`; `--max-tac`, 300% default; opt-in `--warn-tac N`, below it, warns when the peak is between N and the limit; the peak is measured per pixel on Ghostscript's separations, one plate per ink, so each spot colour counts once at its tint), stray RGB (`--strict-cmyk`), effective image DPI (`--min-dpi`, 300 default; opt-in `--warn-dpi N` warns below N, `--max-dpi N` warns above N since it only grows the file, `--max-stretch-pct P` warns when an image's two axes differ by more than P percent, larger over smaller less one; none has a default, and `--warn-dpi` must exceed `--min-dpi`; each message gives the worst placement in mm from the page's bottom-left),
|
|
50
54
|
overprint and rich-black small text (`--no-colour`). Overprinting 100% K text is fine; overprint on anything else is flagged,
|
|
51
55
|
and **white that overprints is an error** (it adds no ink, so it vanishes on press). A page that uses transparency must blend
|
|
52
56
|
in the output intent's colour space (a mismatch is an error, an undeclared space a warning).
|
|
53
57
|
- **Spot inks and ICC profiles**: one ink defined two ways in the same space is an error (`spot-definition`); an invalid ICC profile, or a
|
|
54
|
-
profile that disagrees with its colour space, is an error, and so is a mix of RGB profiles in an RGB job (`icc-profile`); a CMYK
|
|
55
|
-
|
|
58
|
+
profile that disagrees with its colour space, is an error, and so is a mix of RGB profiles in an RGB job (`icc-profile`); in a CMYK
|
|
59
|
+
job a CMYK `ICCBased` space using the output intent's own profile is an error, as PDF/X-4 forbids it (ISO 15930-7, 6.4.3.3).
|
|
56
60
|
- **RGB proofing** (opt-in, `--colour-mode rgb`): for a screen job, CMYK images, fills, strokes, shadings and patterns and a CMYK output intent are errors, spot colours a warning;
|
|
57
61
|
total ink, overprint and rich-black checks are skipped. Save it as a profile: `[profiles.web.verify]` with `colour-mode = "rgb"` and `pdfx = false`, chosen with `proof-pdf --profile web verify`.
|
|
62
|
+
- **Marks and hidden content** (`--no-marks`, opt-in): anything painted beyond the bleed region is an error (`outside-bleed`): crop and registration marks, slug text.
|
|
63
|
+
The region is the BleedBox, else the TrimBox grown by `--bleed-mm` when `--trim-mm` is given, else the TrimBox (a note says which). Judged on the visible extent after
|
|
64
|
+
clipping, so artwork in the bleed zone is correct; pages without a TrimBox are skipped and rotated pages reported as not checked. A text run's extent is its font box.
|
|
65
|
+
Always on, regardless of the flag: an object painted entirely beyond the MediaBox is a warning (`outside-media`, hidden content that ships in the file),
|
|
66
|
+
and a `Do` naming an image or form that is not there is an error (`xobject-missing`): nothing prints where it was placed.
|
|
67
|
+
- **Gray proofing** (opt-in, `--colour-mode gray`): for a black-and-white interior, anything painted outside the gray family (DeviceGray, CalGray, ICC gray) is an
|
|
68
|
+
error (`gray-only`): RGB, CMYK and Lab, by fill, stroke, image, inline image, stencil mask (judged by its fill), shading, pattern and form content; spot colours a warning;
|
|
69
|
+
an RGB or CMYK output intent is an error; more than one gray ICC profile is an error (`icc-profile`). The ink checks are skipped, so total ink is not measured (K alone cannot exceed 100%).
|
|
70
|
+
Strict by default. `--allow-k-only` also accepts DeviceCMYK that uses the K plate alone (C, M and Y all zero) and a CMYK output intent: CMYK images are then decoded to
|
|
71
|
+
check their pixels, once per image, which costs time on large images. A DeviceCMYK image that cannot be decoded, inline CMYK images, CMYK shadings and patterns, and
|
|
72
|
+
ICC-based or indexed CMYK are never accepted as K-only. `--allow-k-only` does nothing in the other modes.
|
|
58
73
|
- **K-only text** (opt-in, `--k-only-text`): text painted with any ink but K (a four-colour build, RGB, a spot or a pattern) is an error.
|
|
59
74
|
- **Proofing** (the text and lines a page paints, measured in page points; see below).
|
|
60
75
|
|
|
61
76
|
`inspect` reports what is in a PDF without judging it, and `texlog` lints a LaTeX build log. `preview` rasterises each page and draws the trim, bleed and safe guides from the PDF's own boxes, so a geometry finding can be seen.
|
|
62
77
|
|
|
63
78
|
```zsh
|
|
64
|
-
pip install proof-pdf # Python 3.15;
|
|
79
|
+
pip install proof-pdf # Python 3.15; verapdf (--pdfa) and gs (--tac) on PATH when asked for. Wheels for macOS arm64, Linux
|
|
80
|
+
# x86-64 and arm64, Windows x64; elsewhere pip builds the Rust core, which needs rustup
|
|
65
81
|
|
|
66
82
|
proof-pdf verify job/ --trim-mm 105x148 --bleed-mm 3 --exclude '*_preview.pdf'
|
|
67
83
|
proof-pdf verify job/ --exempt 'manual.pdf=internal docs, never printed' # listed with the reason, never fails
|
|
@@ -71,6 +87,21 @@ proof-pdf preview card.pdf --dpi 150
|
|
|
71
87
|
proof-pdf --version # version, plus the commit when built from an image
|
|
72
88
|
```
|
|
73
89
|
|
|
90
|
+
Without Python, the Rust `proof-pdf` runs `verify` on its own (`inspect`, `preview`, `extract`, `crop`, `layout` and
|
|
91
|
+
`texlog` need the Python package):
|
|
92
|
+
|
|
93
|
+
```zsh
|
|
94
|
+
brew install release-art/tap/proof-pdf # macOS, Linux
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```powershell
|
|
98
|
+
scoop bucket add release-art https://github.com/release-art/scoop-bucket
|
|
99
|
+
scoop install release-art/proof-pdf # Windows
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
or download `proof-pdf-<version>-<target>` from a [GitHub release](https://github.com/release-art/proofpress/releases)
|
|
103
|
+
(macOS arm64, Linux x86-64 and arm64, Windows x64), each with its Sigstore bundle.
|
|
104
|
+
|
|
74
105
|
- Arguments are files or directories; a directory expands to every PDF beneath it, minus `--exclude` globs (relative to that directory).
|
|
75
106
|
- `--exempt GLOB=reason` declares a file out of scope. It is still listed, with the reason, and never fails; the glob matches at any
|
|
76
107
|
directory level (`res/**`, `*_preview.pdf`). Unlike `--exclude`, which drops files silently, an exemption stays visible in CI output.
|
|
@@ -88,7 +119,89 @@ A job's config file works from Python too. `proof_pdf.load_profile(path=None, *,
|
|
|
88
119
|
`proof-pdf.toml`, `PROOF_PDF_CONFIG`, `PROOF_PDF_PROFILE`) and returns a `LoadedConfig`: the `Profile`, the `exclude` globs, the `exempt`
|
|
89
120
|
map, and `jobs`, `timeout` and the tool names. A file the CLI would reject raises `proof_pdf.ConfigError`. Pass those to
|
|
90
121
|
`core.expand_targets` and `core.verify_files`, so the CLI and your code share one definition. `core.missing_tools(profile)` names the
|
|
91
|
-
tools the profile needs (veraPDF for PDF/A, Ghostscript for
|
|
122
|
+
tools the profile needs (veraPDF for PDF/A, Ghostscript for total ink) that are not on `PATH`, so a caller can fail early with one message.
|
|
123
|
+
|
|
124
|
+
### Checks
|
|
125
|
+
|
|
126
|
+
<!-- checks -->
|
|
127
|
+
Generated from `rust/checks.toml`; every check, with its clauses, is in [rust/CHECKS.md](rust/CHECKS.md).
|
|
128
|
+
|
|
129
|
+
| Level | Implemented | Not yet | Not checkable (skip) |
|
|
130
|
+
|---|---|---|---|
|
|
131
|
+
| PDF/X-4 | 145 | 0 | 5 |
|
|
132
|
+
| PDF/X-4p | 155 | 0 | 5 |
|
|
133
|
+
| PDF/X-5g | 159 | 0 | 25 |
|
|
134
|
+
| PDF/X-5pg | 169 | 0 | 25 |
|
|
135
|
+
| PDF/X-5n | 159 | 0 | 24 |
|
|
136
|
+
| PDF/X-1a:2001 | 81 | 0 | 3 |
|
|
137
|
+
| PDF/X-3:2002 | 83 | 0 | 3 |
|
|
138
|
+
| PDF/X-1a:2003 | 91 | 0 | 3 |
|
|
139
|
+
| PDF/X-3:2003 | 92 | 0 | 3 |
|
|
140
|
+
| Print checks | 54 | 0 | 4 |
|
|
141
|
+
|
|
142
|
+
The print checks:
|
|
143
|
+
|
|
144
|
+
| Id | What it checks | Severity |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| `tac` | Peak total ink stays under the limit (by Ghostscript) | error |
|
|
147
|
+
| `overprint` | Overprint is used on purpose | warning |
|
|
148
|
+
| `white-overprint` | White is never set to overprint | error |
|
|
149
|
+
| `colour-space` | Colour spaces suit the job's colour mode | error |
|
|
150
|
+
| `rgb-only` | An RGB job paints only RGB | error |
|
|
151
|
+
| `gray-only` | A gray job paints only gray | error |
|
|
152
|
+
| `k-only-text` | Text is 100% black only | error |
|
|
153
|
+
| `rich-black` | Small text is not in rich black | warning |
|
|
154
|
+
| `spot-ink` | Spot inks are on the allowed list | error |
|
|
155
|
+
| `spot-definition` | A spot ink has one definition | error |
|
|
156
|
+
| `icc-profile` | Embedded ICC profiles are sound and suit the job | error |
|
|
157
|
+
| `blend-space` | Transparency declares its blend space | error |
|
|
158
|
+
| `image-dpi` | Images meet the resolution floor | error |
|
|
159
|
+
| `image-dpi-max` | Images do not exceed the resolution ceiling | warning |
|
|
160
|
+
| `image-stretch` | Images are not stretched unevenly | warning |
|
|
161
|
+
| `text-size` | Text meets the size floor | error |
|
|
162
|
+
| `hairline` | Strokes meet the width floor | error |
|
|
163
|
+
| `contrast` | Text contrasts with its background | error |
|
|
164
|
+
| `safe-area` | Text stays inside the safe area | error |
|
|
165
|
+
| `missing-glyph` | Text shows no missing glyphs | error |
|
|
166
|
+
| `font-embedded` | Fonts are embedded | error |
|
|
167
|
+
| `font-type3` | Type 3 fonts are reported | warning |
|
|
168
|
+
| `geometry` | Pages are the expected trim size | error |
|
|
169
|
+
| `bleed` | Pages carry the expected bleed | error |
|
|
170
|
+
| `centring` | The trim is centred in the bleed | error |
|
|
171
|
+
| `artwork-bleed` | Artwork reaches into the bleed | error |
|
|
172
|
+
| `outside-bleed` | Nothing is painted beyond the bleed | error |
|
|
173
|
+
| `outside-media` | Nothing is painted wholly off the page | warning |
|
|
174
|
+
| `xobject-missing` | Painted XObjects exist | error |
|
|
175
|
+
| `bleedbox` | Pages with a trim have a BleedBox (not checked: Replaced by the x4.boxes rows (a BleedBox inside the MediaBox) and the geometry checks' bleed) | error |
|
|
176
|
+
| `boxes` | Each page has a MediaBox (not checked: Replaced by page.media-box and the x4.boxes rows) | error |
|
|
177
|
+
| `page-size` | Pages share one size | error |
|
|
178
|
+
| `page-count` | The page count fits the rule | error |
|
|
179
|
+
| `page-rotate` | Pages are not rotated | warning |
|
|
180
|
+
| `output-condition` | The output intent names the expected condition | error |
|
|
181
|
+
| `pdfa` | veraPDF passes the PDF/A flavour (by veraPDF) | error |
|
|
182
|
+
| `structure` | The file can be read (not checked: Not a check: whether the file could be read is the report's own structure and verdict) | error |
|
|
183
|
+
| `internal` | The engine itself failed on this file (not checked: Raised when a check panics, which is always a bug in proof-pdf: no file is meant to trigger it, so it has no fixtures; unit tests cover it) | error |
|
|
184
|
+
| `file.header` | The file starts with a %PDF- header in its first 1024 bytes | error |
|
|
185
|
+
| `file.header-offset` | The header is at the very start of the file | warning |
|
|
186
|
+
| `file.startxref` | The file ends with startxref and the offset of its cross-reference | error |
|
|
187
|
+
| `file.xref` | Every cross-reference section can be read | error |
|
|
188
|
+
| `file.trailer` | The trailer names the document catalog | error |
|
|
189
|
+
| `file.encrypted` | The file is not encrypted | error |
|
|
190
|
+
| `file.eof` | The file ends with %%EOF and nothing after it | warning |
|
|
191
|
+
| `file.limit` | The file stays within proof-pdf's safety limits | error |
|
|
192
|
+
| `syntax.hex-digits` | Hex strings have an even number of digits | warning |
|
|
193
|
+
| `syntax.octal-escape` | Octal escapes in strings stay within one byte | warning |
|
|
194
|
+
| `syntax.name-escape` | Escapes in names are two hex digits, never 00 | error |
|
|
195
|
+
| `syntax.duplicate-key` | No dictionary gives a key twice | warning |
|
|
196
|
+
| `stream.eol` | Stream data is followed by an end of line before endstream | warning |
|
|
197
|
+
| `stream.filter` | Every stream names filters ISO 32000 defines | error |
|
|
198
|
+
| `content.damaged` | Every content stream can be read to its end | error |
|
|
199
|
+
| `content.operator` | Undefined operators appear only inside BX and EX | error |
|
|
200
|
+
| `content.compatibility` | BX and EX pair up | error |
|
|
201
|
+
| `page.media-box` | Every page has a MediaBox, its own or inherited | error |
|
|
202
|
+
| `object.damaged` | Every object reachable from the trailer can be read | error |
|
|
203
|
+
| `object.dangling-reference` | References point at objects that exist | warning |
|
|
204
|
+
<!-- /checks -->
|
|
92
205
|
|
|
93
206
|
### Proofing
|
|
94
207
|
|
|
@@ -213,13 +326,13 @@ The box is `X0,Y0,X1,Y1` in points from the page's bottom-left, the numbers `doc
|
|
|
213
326
|
The piece also holds the rest of the page's content outside the window, which a viewer does not show; rasterise it when
|
|
214
327
|
that matters.
|
|
215
328
|
|
|
216
|
-
`--previews` renders `previews/index.html
|
|
329
|
+
`--previews` renders `previews/index.html`: each page with every recovered asset boxed on it and
|
|
217
330
|
linked to its thumbnail below, so a whole archive job can be reviewed by eye. Text in fonts without a `/ToUnicode` map
|
|
218
331
|
cannot be read from the PDF; `document.json` says so in `notes` and keeps the font codes. Mind who owns the artwork you
|
|
219
332
|
recover.
|
|
220
333
|
|
|
221
|
-
The library offers the same as data: `proof_pdf.inventory.inspect_pdf(path)` returns plain dataclasses, `proof_pdf.extract.extract_pdf(path, out_dir)` writes the assets and returns what it found, and
|
|
222
|
-
|
|
334
|
+
The library offers the same as data: `proof_pdf.inventory.inspect_pdf(path)` returns plain dataclasses, `proof_pdf.extract.extract_pdf(path, out_dir)` writes the assets and returns what it found, and
|
|
335
|
+
`await proof_pdf.core.verify_file(path, profile)` runs the checks and returns a report.
|
|
223
336
|
|
|
224
337
|
## Docker images
|
|
225
338
|
|
|
@@ -252,8 +365,10 @@ bin/docker/test.sh # the whole suite inside the full image, i
|
|
|
252
365
|
|
|
253
366
|
See [CONTRIBUTING.md](CONTRIBUTING.md). To release, add the version to [CHANGELOG.md](CHANGELOG.md) and push a tag:
|
|
254
367
|
`git tag v1.2.3 && git push origin v1.2.3`. The tag is the version; it publishes to PyPI (TestPyPI first), creates a GitHub
|
|
255
|
-
Release and
|
|
368
|
+
Release with the standalone downloads, points the Homebrew tap and the Scoop bucket at it (stable releases only) and
|
|
369
|
+
pushes the images.
|
|
256
370
|
|
|
257
371
|
## Licence
|
|
258
372
|
|
|
259
373
|
Apache-2.0. Third-party terms, including Ghostscript (AGPL-3.0) and veraPDF, are in [NOTICE](NOTICE).
|
|
374
|
+
|
|
@@ -8,7 +8,7 @@ Open-source pieces of a print-on-demand pipeline, extracted from production use.
|
|
|
8
8
|
|
|
9
9
|
| Piece | What it is |
|
|
10
10
|
|---|---|
|
|
11
|
-
| [`proof-pdf`](#proof-pdf) | CLI and library that hold a print PDF to PDF/X
|
|
11
|
+
| [`proof-pdf`](#proof-pdf) | CLI and library that hold a print PDF to PDF/X, print checks and, when asked, PDF/A. |
|
|
12
12
|
| [`releaseart/lualatex`](#docker-images) | TeX Live 2025 with LuaLaTeX. |
|
|
13
13
|
| [`releaseart/lualatex-python`](#docker-images) | Python, `lualatex`, Ghostscript and veraPDF: everything `proof-pdf` needs, without it. A base to `pip install` it on. |
|
|
14
14
|
| [`releaseart/full`](#docker-images) | `lualatex` plus Ghostscript, veraPDF and `proof-pdf`. |
|
|
@@ -17,25 +17,43 @@ Open-source pieces of a print-on-demand pipeline, extracted from production use.
|
|
|
17
17
|
|
|
18
18
|
`verify` runs four layers, each of which can be switched off:
|
|
19
19
|
|
|
20
|
-
- **PDF/A** with [veraPDF](https://verapdf.org) (`--flavour 2b` by default
|
|
21
|
-
- **PDF/X
|
|
20
|
+
- **PDF/A** with [veraPDF](https://verapdf.org), when asked (`--pdfa`; `--flavour 2b` by default).
|
|
21
|
+
- **PDF/X**: every requirement of ISO 15930-7 (PDF/X-4, X-4p) and ISO 15930-8 (PDF/X-5g, X-5pg, X-5n) that a file can be
|
|
22
|
+
judged on, from the output intent and metadata to fonts, colour, transparency and referenced files (`--pdfx x4` by
|
|
23
|
+
default, another level with `--pdfx x4p|x5g|x5pg|x5n`, `--no-pdfx` to skip). The counts are under [Checks](#checks).
|
|
24
|
+
PDF/X-1a:2001, X-3:2002, X-1a:2003 and X-3:2003 (ISO 15930-1, -3, -4, -6) are checked too (`--pdfx
|
|
25
|
+
x1a-2001|x3-2002|x1a-2003|x3-2003`); without `--pdfx`, a file whose Info claims one of them is verified at it.
|
|
22
26
|
- **Geometry**: trim and bleed against the finished size you expect. Runs only when `--trim-mm` is given (`--bleed-mm`, `--tolerance-mm`).
|
|
23
|
-
|
|
27
|
+
For a book interior, `--binding-bleed-mm 0` (with `--binding left|right`, the bound edge of page 1; it alternates page by page) expects no bleed on the binding edge,
|
|
28
|
+
so the sheet is wider by the outer bleed only; the centring check follows the asymmetry.
|
|
29
|
+
- **Colour**: total ink coverage, when asked (`--tac`; `--max-tac`, 300% default; opt-in `--warn-tac N`, below it, warns when the peak is between N and the limit; the peak is measured per pixel on Ghostscript's separations, one plate per ink, so each spot colour counts once at its tint), stray RGB (`--strict-cmyk`), effective image DPI (`--min-dpi`, 300 default; opt-in `--warn-dpi N` warns below N, `--max-dpi N` warns above N since it only grows the file, `--max-stretch-pct P` warns when an image's two axes differ by more than P percent, larger over smaller less one; none has a default, and `--warn-dpi` must exceed `--min-dpi`; each message gives the worst placement in mm from the page's bottom-left),
|
|
24
30
|
overprint and rich-black small text (`--no-colour`). Overprinting 100% K text is fine; overprint on anything else is flagged,
|
|
25
31
|
and **white that overprints is an error** (it adds no ink, so it vanishes on press). A page that uses transparency must blend
|
|
26
32
|
in the output intent's colour space (a mismatch is an error, an undeclared space a warning).
|
|
27
33
|
- **Spot inks and ICC profiles**: one ink defined two ways in the same space is an error (`spot-definition`); an invalid ICC profile, or a
|
|
28
|
-
profile that disagrees with its colour space, is an error, and so is a mix of RGB profiles in an RGB job (`icc-profile`); a CMYK
|
|
29
|
-
|
|
34
|
+
profile that disagrees with its colour space, is an error, and so is a mix of RGB profiles in an RGB job (`icc-profile`); in a CMYK
|
|
35
|
+
job a CMYK `ICCBased` space using the output intent's own profile is an error, as PDF/X-4 forbids it (ISO 15930-7, 6.4.3.3).
|
|
30
36
|
- **RGB proofing** (opt-in, `--colour-mode rgb`): for a screen job, CMYK images, fills, strokes, shadings and patterns and a CMYK output intent are errors, spot colours a warning;
|
|
31
37
|
total ink, overprint and rich-black checks are skipped. Save it as a profile: `[profiles.web.verify]` with `colour-mode = "rgb"` and `pdfx = false`, chosen with `proof-pdf --profile web verify`.
|
|
38
|
+
- **Marks and hidden content** (`--no-marks`, opt-in): anything painted beyond the bleed region is an error (`outside-bleed`): crop and registration marks, slug text.
|
|
39
|
+
The region is the BleedBox, else the TrimBox grown by `--bleed-mm` when `--trim-mm` is given, else the TrimBox (a note says which). Judged on the visible extent after
|
|
40
|
+
clipping, so artwork in the bleed zone is correct; pages without a TrimBox are skipped and rotated pages reported as not checked. A text run's extent is its font box.
|
|
41
|
+
Always on, regardless of the flag: an object painted entirely beyond the MediaBox is a warning (`outside-media`, hidden content that ships in the file),
|
|
42
|
+
and a `Do` naming an image or form that is not there is an error (`xobject-missing`): nothing prints where it was placed.
|
|
43
|
+
- **Gray proofing** (opt-in, `--colour-mode gray`): for a black-and-white interior, anything painted outside the gray family (DeviceGray, CalGray, ICC gray) is an
|
|
44
|
+
error (`gray-only`): RGB, CMYK and Lab, by fill, stroke, image, inline image, stencil mask (judged by its fill), shading, pattern and form content; spot colours a warning;
|
|
45
|
+
an RGB or CMYK output intent is an error; more than one gray ICC profile is an error (`icc-profile`). The ink checks are skipped, so total ink is not measured (K alone cannot exceed 100%).
|
|
46
|
+
Strict by default. `--allow-k-only` also accepts DeviceCMYK that uses the K plate alone (C, M and Y all zero) and a CMYK output intent: CMYK images are then decoded to
|
|
47
|
+
check their pixels, once per image, which costs time on large images. A DeviceCMYK image that cannot be decoded, inline CMYK images, CMYK shadings and patterns, and
|
|
48
|
+
ICC-based or indexed CMYK are never accepted as K-only. `--allow-k-only` does nothing in the other modes.
|
|
32
49
|
- **K-only text** (opt-in, `--k-only-text`): text painted with any ink but K (a four-colour build, RGB, a spot or a pattern) is an error.
|
|
33
50
|
- **Proofing** (the text and lines a page paints, measured in page points; see below).
|
|
34
51
|
|
|
35
52
|
`inspect` reports what is in a PDF without judging it, and `texlog` lints a LaTeX build log. `preview` rasterises each page and draws the trim, bleed and safe guides from the PDF's own boxes, so a geometry finding can be seen.
|
|
36
53
|
|
|
37
54
|
```zsh
|
|
38
|
-
pip install proof-pdf # Python 3.15;
|
|
55
|
+
pip install proof-pdf # Python 3.15; verapdf (--pdfa) and gs (--tac) on PATH when asked for. Wheels for macOS arm64, Linux
|
|
56
|
+
# x86-64 and arm64, Windows x64; elsewhere pip builds the Rust core, which needs rustup
|
|
39
57
|
|
|
40
58
|
proof-pdf verify job/ --trim-mm 105x148 --bleed-mm 3 --exclude '*_preview.pdf'
|
|
41
59
|
proof-pdf verify job/ --exempt 'manual.pdf=internal docs, never printed' # listed with the reason, never fails
|
|
@@ -45,6 +63,21 @@ proof-pdf preview card.pdf --dpi 150
|
|
|
45
63
|
proof-pdf --version # version, plus the commit when built from an image
|
|
46
64
|
```
|
|
47
65
|
|
|
66
|
+
Without Python, the Rust `proof-pdf` runs `verify` on its own (`inspect`, `preview`, `extract`, `crop`, `layout` and
|
|
67
|
+
`texlog` need the Python package):
|
|
68
|
+
|
|
69
|
+
```zsh
|
|
70
|
+
brew install release-art/tap/proof-pdf # macOS, Linux
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
scoop bucket add release-art https://github.com/release-art/scoop-bucket
|
|
75
|
+
scoop install release-art/proof-pdf # Windows
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
or download `proof-pdf-<version>-<target>` from a [GitHub release](https://github.com/release-art/proofpress/releases)
|
|
79
|
+
(macOS arm64, Linux x86-64 and arm64, Windows x64), each with its Sigstore bundle.
|
|
80
|
+
|
|
48
81
|
- Arguments are files or directories; a directory expands to every PDF beneath it, minus `--exclude` globs (relative to that directory).
|
|
49
82
|
- `--exempt GLOB=reason` declares a file out of scope. It is still listed, with the reason, and never fails; the glob matches at any
|
|
50
83
|
directory level (`res/**`, `*_preview.pdf`). Unlike `--exclude`, which drops files silently, an exemption stays visible in CI output.
|
|
@@ -62,7 +95,89 @@ A job's config file works from Python too. `proof_pdf.load_profile(path=None, *,
|
|
|
62
95
|
`proof-pdf.toml`, `PROOF_PDF_CONFIG`, `PROOF_PDF_PROFILE`) and returns a `LoadedConfig`: the `Profile`, the `exclude` globs, the `exempt`
|
|
63
96
|
map, and `jobs`, `timeout` and the tool names. A file the CLI would reject raises `proof_pdf.ConfigError`. Pass those to
|
|
64
97
|
`core.expand_targets` and `core.verify_files`, so the CLI and your code share one definition. `core.missing_tools(profile)` names the
|
|
65
|
-
tools the profile needs (veraPDF for PDF/A, Ghostscript for
|
|
98
|
+
tools the profile needs (veraPDF for PDF/A, Ghostscript for total ink) that are not on `PATH`, so a caller can fail early with one message.
|
|
99
|
+
|
|
100
|
+
### Checks
|
|
101
|
+
|
|
102
|
+
<!-- checks -->
|
|
103
|
+
Generated from `rust/checks.toml`; every check, with its clauses, is in [rust/CHECKS.md](rust/CHECKS.md).
|
|
104
|
+
|
|
105
|
+
| Level | Implemented | Not yet | Not checkable (skip) |
|
|
106
|
+
|---|---|---|---|
|
|
107
|
+
| PDF/X-4 | 145 | 0 | 5 |
|
|
108
|
+
| PDF/X-4p | 155 | 0 | 5 |
|
|
109
|
+
| PDF/X-5g | 159 | 0 | 25 |
|
|
110
|
+
| PDF/X-5pg | 169 | 0 | 25 |
|
|
111
|
+
| PDF/X-5n | 159 | 0 | 24 |
|
|
112
|
+
| PDF/X-1a:2001 | 81 | 0 | 3 |
|
|
113
|
+
| PDF/X-3:2002 | 83 | 0 | 3 |
|
|
114
|
+
| PDF/X-1a:2003 | 91 | 0 | 3 |
|
|
115
|
+
| PDF/X-3:2003 | 92 | 0 | 3 |
|
|
116
|
+
| Print checks | 54 | 0 | 4 |
|
|
117
|
+
|
|
118
|
+
The print checks:
|
|
119
|
+
|
|
120
|
+
| Id | What it checks | Severity |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `tac` | Peak total ink stays under the limit (by Ghostscript) | error |
|
|
123
|
+
| `overprint` | Overprint is used on purpose | warning |
|
|
124
|
+
| `white-overprint` | White is never set to overprint | error |
|
|
125
|
+
| `colour-space` | Colour spaces suit the job's colour mode | error |
|
|
126
|
+
| `rgb-only` | An RGB job paints only RGB | error |
|
|
127
|
+
| `gray-only` | A gray job paints only gray | error |
|
|
128
|
+
| `k-only-text` | Text is 100% black only | error |
|
|
129
|
+
| `rich-black` | Small text is not in rich black | warning |
|
|
130
|
+
| `spot-ink` | Spot inks are on the allowed list | error |
|
|
131
|
+
| `spot-definition` | A spot ink has one definition | error |
|
|
132
|
+
| `icc-profile` | Embedded ICC profiles are sound and suit the job | error |
|
|
133
|
+
| `blend-space` | Transparency declares its blend space | error |
|
|
134
|
+
| `image-dpi` | Images meet the resolution floor | error |
|
|
135
|
+
| `image-dpi-max` | Images do not exceed the resolution ceiling | warning |
|
|
136
|
+
| `image-stretch` | Images are not stretched unevenly | warning |
|
|
137
|
+
| `text-size` | Text meets the size floor | error |
|
|
138
|
+
| `hairline` | Strokes meet the width floor | error |
|
|
139
|
+
| `contrast` | Text contrasts with its background | error |
|
|
140
|
+
| `safe-area` | Text stays inside the safe area | error |
|
|
141
|
+
| `missing-glyph` | Text shows no missing glyphs | error |
|
|
142
|
+
| `font-embedded` | Fonts are embedded | error |
|
|
143
|
+
| `font-type3` | Type 3 fonts are reported | warning |
|
|
144
|
+
| `geometry` | Pages are the expected trim size | error |
|
|
145
|
+
| `bleed` | Pages carry the expected bleed | error |
|
|
146
|
+
| `centring` | The trim is centred in the bleed | error |
|
|
147
|
+
| `artwork-bleed` | Artwork reaches into the bleed | error |
|
|
148
|
+
| `outside-bleed` | Nothing is painted beyond the bleed | error |
|
|
149
|
+
| `outside-media` | Nothing is painted wholly off the page | warning |
|
|
150
|
+
| `xobject-missing` | Painted XObjects exist | error |
|
|
151
|
+
| `bleedbox` | Pages with a trim have a BleedBox (not checked: Replaced by the x4.boxes rows (a BleedBox inside the MediaBox) and the geometry checks' bleed) | error |
|
|
152
|
+
| `boxes` | Each page has a MediaBox (not checked: Replaced by page.media-box and the x4.boxes rows) | error |
|
|
153
|
+
| `page-size` | Pages share one size | error |
|
|
154
|
+
| `page-count` | The page count fits the rule | error |
|
|
155
|
+
| `page-rotate` | Pages are not rotated | warning |
|
|
156
|
+
| `output-condition` | The output intent names the expected condition | error |
|
|
157
|
+
| `pdfa` | veraPDF passes the PDF/A flavour (by veraPDF) | error |
|
|
158
|
+
| `structure` | The file can be read (not checked: Not a check: whether the file could be read is the report's own structure and verdict) | error |
|
|
159
|
+
| `internal` | The engine itself failed on this file (not checked: Raised when a check panics, which is always a bug in proof-pdf: no file is meant to trigger it, so it has no fixtures; unit tests cover it) | error |
|
|
160
|
+
| `file.header` | The file starts with a %PDF- header in its first 1024 bytes | error |
|
|
161
|
+
| `file.header-offset` | The header is at the very start of the file | warning |
|
|
162
|
+
| `file.startxref` | The file ends with startxref and the offset of its cross-reference | error |
|
|
163
|
+
| `file.xref` | Every cross-reference section can be read | error |
|
|
164
|
+
| `file.trailer` | The trailer names the document catalog | error |
|
|
165
|
+
| `file.encrypted` | The file is not encrypted | error |
|
|
166
|
+
| `file.eof` | The file ends with %%EOF and nothing after it | warning |
|
|
167
|
+
| `file.limit` | The file stays within proof-pdf's safety limits | error |
|
|
168
|
+
| `syntax.hex-digits` | Hex strings have an even number of digits | warning |
|
|
169
|
+
| `syntax.octal-escape` | Octal escapes in strings stay within one byte | warning |
|
|
170
|
+
| `syntax.name-escape` | Escapes in names are two hex digits, never 00 | error |
|
|
171
|
+
| `syntax.duplicate-key` | No dictionary gives a key twice | warning |
|
|
172
|
+
| `stream.eol` | Stream data is followed by an end of line before endstream | warning |
|
|
173
|
+
| `stream.filter` | Every stream names filters ISO 32000 defines | error |
|
|
174
|
+
| `content.damaged` | Every content stream can be read to its end | error |
|
|
175
|
+
| `content.operator` | Undefined operators appear only inside BX and EX | error |
|
|
176
|
+
| `content.compatibility` | BX and EX pair up | error |
|
|
177
|
+
| `page.media-box` | Every page has a MediaBox, its own or inherited | error |
|
|
178
|
+
| `object.damaged` | Every object reachable from the trailer can be read | error |
|
|
179
|
+
| `object.dangling-reference` | References point at objects that exist | warning |
|
|
180
|
+
<!-- /checks -->
|
|
66
181
|
|
|
67
182
|
### Proofing
|
|
68
183
|
|
|
@@ -187,13 +302,13 @@ The box is `X0,Y0,X1,Y1` in points from the page's bottom-left, the numbers `doc
|
|
|
187
302
|
The piece also holds the rest of the page's content outside the window, which a viewer does not show; rasterise it when
|
|
188
303
|
that matters.
|
|
189
304
|
|
|
190
|
-
`--previews` renders `previews/index.html
|
|
305
|
+
`--previews` renders `previews/index.html`: each page with every recovered asset boxed on it and
|
|
191
306
|
linked to its thumbnail below, so a whole archive job can be reviewed by eye. Text in fonts without a `/ToUnicode` map
|
|
192
307
|
cannot be read from the PDF; `document.json` says so in `notes` and keeps the font codes. Mind who owns the artwork you
|
|
193
308
|
recover.
|
|
194
309
|
|
|
195
|
-
The library offers the same as data: `proof_pdf.inventory.inspect_pdf(path)` returns plain dataclasses, `proof_pdf.extract.extract_pdf(path, out_dir)` writes the assets and returns what it found, and
|
|
196
|
-
|
|
310
|
+
The library offers the same as data: `proof_pdf.inventory.inspect_pdf(path)` returns plain dataclasses, `proof_pdf.extract.extract_pdf(path, out_dir)` writes the assets and returns what it found, and
|
|
311
|
+
`await proof_pdf.core.verify_file(path, profile)` runs the checks and returns a report.
|
|
197
312
|
|
|
198
313
|
## Docker images
|
|
199
314
|
|
|
@@ -226,7 +341,8 @@ bin/docker/test.sh # the whole suite inside the full image, i
|
|
|
226
341
|
|
|
227
342
|
See [CONTRIBUTING.md](CONTRIBUTING.md). To release, add the version to [CHANGELOG.md](CHANGELOG.md) and push a tag:
|
|
228
343
|
`git tag v1.2.3 && git push origin v1.2.3`. The tag is the version; it publishes to PyPI (TestPyPI first), creates a GitHub
|
|
229
|
-
Release and
|
|
344
|
+
Release with the standalone downloads, points the Homebrew tap and the Scoop bucket at it (stable releases only) and
|
|
345
|
+
pushes the images.
|
|
230
346
|
|
|
231
347
|
## Licence
|
|
232
348
|
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "proof-pdf"
|
|
3
|
-
dynamic = []
|
|
3
|
+
dynamic = ["version"]
|
|
4
4
|
description = "Hold print PDFs to PDF/X-4 and PDF/A: veraPDF, page boxes, geometry, ink and image resolution."
|
|
5
|
-
authors = [
|
|
6
|
-
{ name = "Ilja Orlovs", email = "ilja@release.art" },
|
|
7
|
-
]
|
|
5
|
+
authors = [{name = "Ilja Orlovs", email = "ilja@release.art"}]
|
|
8
6
|
license = "Apache-2.0"
|
|
9
|
-
license-files = [
|
|
10
|
-
"LICENSE",
|
|
11
|
-
"NOTICE",
|
|
12
|
-
]
|
|
7
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
13
8
|
readme = "README.md"
|
|
14
|
-
keywords = [
|
|
15
|
-
"pdf",
|
|
16
|
-
"pdf/x-4",
|
|
17
|
-
"pdf/a",
|
|
18
|
-
"verapdf",
|
|
19
|
-
"prepress",
|
|
20
|
-
"print",
|
|
21
|
-
"preflight",
|
|
22
|
-
"ghostscript",
|
|
23
|
-
"lualatex",
|
|
24
|
-
]
|
|
9
|
+
keywords = ["pdf", "pdf/x-4", "pdf/a", "verapdf", "prepress", "print", "preflight", "ghostscript", "lualatex"]
|
|
25
10
|
classifiers = [
|
|
26
11
|
"Development Status :: 3 - Alpha",
|
|
27
12
|
"Environment :: Console",
|
|
@@ -33,11 +18,8 @@ classifiers = [
|
|
|
33
18
|
]
|
|
34
19
|
requires-python = ">=3.15,<3.16"
|
|
35
20
|
dependencies = [
|
|
36
|
-
"pikepdf>=10.17.0",
|
|
37
|
-
"pillow>=12.3.0",
|
|
38
21
|
"typer>=0.27.3",
|
|
39
22
|
]
|
|
40
|
-
version = "0.3.7"
|
|
41
23
|
|
|
42
24
|
[project.urls]
|
|
43
25
|
Homepage = "https://github.com/release-art/proofpress"
|
|
@@ -50,98 +32,57 @@ proof-pdf = "proof_pdf.cli:pdf_app"
|
|
|
50
32
|
|
|
51
33
|
[tool.ruff]
|
|
52
34
|
target-version = "py315"
|
|
35
|
+
lint.select = ["A", "B", "C", "E", "F", "I", "W", "N", "C4", "T20", "PTH"]
|
|
36
|
+
lint.ignore = ["N802"]
|
|
53
37
|
line-length = 120
|
|
54
38
|
|
|
55
|
-
[tool.ruff.
|
|
56
|
-
|
|
57
|
-
"A",
|
|
58
|
-
"B",
|
|
59
|
-
"C",
|
|
60
|
-
"E",
|
|
61
|
-
"F",
|
|
62
|
-
"I",
|
|
63
|
-
"W",
|
|
64
|
-
"N",
|
|
65
|
-
"C4",
|
|
66
|
-
"T20",
|
|
67
|
-
"PTH",
|
|
68
|
-
]
|
|
69
|
-
ignore = [
|
|
70
|
-
"N802",
|
|
71
|
-
]
|
|
39
|
+
[tool.ruff.format]
|
|
40
|
+
line-ending = "lf"
|
|
72
41
|
|
|
73
42
|
[tool.ruff.lint.per-file-ignores]
|
|
74
|
-
"__init__.py" = [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
]
|
|
78
|
-
"
|
|
79
|
-
"B008",
|
|
80
|
-
]
|
|
81
|
-
"deltae.py" = [
|
|
82
|
-
"N803",
|
|
83
|
-
"N806",
|
|
84
|
-
]
|
|
85
|
-
"tests/fixtures/*.py" = [
|
|
86
|
-
"T201",
|
|
87
|
-
]
|
|
43
|
+
"__init__.py" = ["F401", "E402"]
|
|
44
|
+
"cli.py" = ["B008"] # typer.Option() as default arg
|
|
45
|
+
"deltae.py" = ["N803", "N806"] # the formula's published symbols (kL, dLp, T, ...)
|
|
46
|
+
"tests/fixtures/*.py" = ["T201"] # the fixture builder is a script
|
|
47
|
+
"bin/**/*.py" = ["T201"] # command-line scripts report by printing
|
|
88
48
|
|
|
89
49
|
[tool.ruff.lint.isort]
|
|
90
50
|
order-by-type = true
|
|
91
51
|
combine-as-imports = true
|
|
92
52
|
force-wrap-aliases = true
|
|
93
|
-
known-first-party = [
|
|
94
|
-
|
|
95
|
-
]
|
|
96
|
-
forced-separate = [
|
|
97
|
-
"tests",
|
|
98
|
-
]
|
|
99
|
-
|
|
100
|
-
[tool.ruff.format]
|
|
101
|
-
line-ending = "lf"
|
|
53
|
+
known-first-party = ["proof_pdf"]
|
|
54
|
+
forced-separate = ["tests"]
|
|
102
55
|
|
|
103
56
|
[tool.pyright]
|
|
104
|
-
include = [
|
|
105
|
-
"src",
|
|
106
|
-
"tests",
|
|
107
|
-
]
|
|
57
|
+
include = ["src", "tests"]
|
|
108
58
|
pythonVersion = "3.15"
|
|
109
59
|
|
|
110
60
|
[tool.pdm]
|
|
111
61
|
distribution = true
|
|
112
62
|
|
|
113
|
-
[
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
fallback_version = "0.0.0"
|
|
63
|
+
[build-system]
|
|
64
|
+
requires = ["maturin>=1.9.4,<2"]
|
|
65
|
+
build-backend = "maturin"
|
|
117
66
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
]
|
|
67
|
+
# The Rust core is the extension module proof_pdf._internal._core, built from rust/ with its python feature. The version is
|
|
68
|
+
# rust/Cargo.toml's: 0.0.0 in the tree, set from the tag (v1.2.3) by bin/rust/set-version.sh when releasing.
|
|
69
|
+
[tool.maturin]
|
|
70
|
+
manifest-path = "rust/Cargo.toml"
|
|
71
|
+
features = ["python"]
|
|
72
|
+
module-name = "proof_pdf._internal._core"
|
|
73
|
+
python-source = "src"
|
|
123
74
|
|
|
124
75
|
[tool.pytest.ini_options]
|
|
125
76
|
addopts = "-v -l --color=yes --cov=proof_pdf --cov-report term-missing --no-cov-on-fail"
|
|
126
|
-
pythonpath = [
|
|
127
|
-
"src",
|
|
128
|
-
]
|
|
77
|
+
pythonpath = ["src"]
|
|
129
78
|
asyncio_mode = "auto"
|
|
130
79
|
asyncio_default_fixture_loop_scope = "function"
|
|
131
|
-
testpaths = [
|
|
132
|
-
"tests",
|
|
133
|
-
]
|
|
80
|
+
testpaths = ["tests"]
|
|
134
81
|
timeout = 15
|
|
135
82
|
markers = [
|
|
136
83
|
"container: needs real veraPDF and Ghostscript (skipped without them, run in the image)",
|
|
137
84
|
]
|
|
138
85
|
|
|
139
|
-
[build-system]
|
|
140
|
-
requires = [
|
|
141
|
-
"pdm-backend",
|
|
142
|
-
]
|
|
143
|
-
build-backend = "pdm.backend"
|
|
144
|
-
|
|
145
86
|
[dependency-groups]
|
|
146
87
|
dev = [
|
|
147
88
|
"pytest>=9.1.1",
|
|
@@ -151,4 +92,8 @@ dev = [
|
|
|
151
92
|
"ruff>=0.17.1",
|
|
152
93
|
"pyright>=1.1.414",
|
|
153
94
|
"pytest-asyncio>=1.4.0",
|
|
95
|
+
"fonttools>=4.68.0",
|
|
96
|
+
# The tests build PDFs and read images with these; the package itself does not use them.
|
|
97
|
+
"pikepdf>=10.17.0",
|
|
98
|
+
"pillow>=12.3.0",
|
|
154
99
|
]
|