Repository navigation
PDFCLOUD-6571 Add ZUGFeRD PDF creation - #57
Open
datalogics-tsmith wants to merge 4 commits into
Open
datalogics-tsmith wants to merge 4 commits into
datalogics-tsmith wants to merge 4 commits into
Conversation
datalogics-tsmith
temporarily deployed
to
ci-live
October 21, 2026 20:12 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 21, 2026 20:12 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 21, 2026 20:12 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 21, 2026 20:12 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 21, 2026 20:12 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 21, 2026 20:12 — with
GitHub Actions
Inactive
✅ Deploy Preview for pdfrest-python ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add typed rendering options for invoice appearance and localization. - Validate uploaded resources, color channels, fonts, and regeneration. - Serialize the public input shape into the pdfRest wire contract. Assisted-by: Codex
- Add synchronous and asynchronous helpers for uploaded invoice XML. - Support optional PDFs, logos, rendering controls, and request options. - Cover serialization, validation, response mapping, and both transports. Assisted-by: Codex
- Exercise every closed rendering option through both client transports. - Verify regenerated PDFs, response metadata, and server-side rejection. - Add a deterministic minimum-profile invoice fixture. Assisted-by: Codex
- Add a standalone typed example with a deterministic invoice fixture. - Verify the generated PDF and print useful response metadata. - Link the helper from the API guide and example inventories. Assisted-by: Codex
datalogics-tsmith
force-pushed
the
pdfcloud-6571-add-zugferd-pdf-creation
branch
from
October 22, 2026 16:03
10508bb to
7d951b6
Compare
datalogics-tsmith
temporarily deployed
to
ci-live
October 22, 2026 16:03 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 22, 2026 16:03 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 22, 2026 16:03 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 22, 2026 16:03 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 22, 2026 16:03 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
October 22, 2026 16:03 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PDFCLOUD-6571
Why this change
The Python SDK does not expose pdfRest's ZUGFeRD PDF operation, so callers cannot use the typed clients to turn CII invoice XML into a validated ZUGFeRD or Factur-X PDF/A-3 invoice. This adds that workflow to both supported client transports.
What changed (high level)
New synchronous and asynchronous
create_zugferd_pdfhelpers accept uploaded invoice XML plus optional PDF and logo resources. A dedicated Pydantic payload model owns resource validation and wire serialization, while public render-option types make appearance, localization, colors, fonts, and numeric constraints discoverable to callers.The change also adds focused unit and live coverage, a deterministic minimum-profile invoice fixture, public API documentation, and a standalone runnable example.
Behavior changes
Callers can create a new visual invoice from CII XML, preserve a supplied PDF when it matches the invoice, or permit regeneration when the supplied PDF cannot be confirmed. Rendering supports logo placement, installed text-capable fonts, RGB or CMYK colors, footer text, locale and label-language selection, currency display, date formatting, decimal precision, and an output prefix.
Invalid MIME types, multiple resources where only one is allowed, unsupported option values, malformed colors, unsafe output prefixes, and inconsistent regeneration inputs fail locally before transport. The API is additive and does not change existing helpers.
Validation
On the final stacked branch, all 308 focused PDF-to-PostScript and ZUGFeRD unit tests passed. The complete non-live suite passed with 3,231 tests and 10 expected skips, and the full pre-commit suite passed, including Ruff formatting/linting and basedpyright.
The ZUGFeRD route was also exercised through 12 live sync and async cases covering all closed render-option literals, mismatched-PDF regeneration, response metadata, and server-side invalid-option rejection. The Python 3.10-3.14 Nox test matrix passed before the final dependency sync; the sync only incorporated the current #55 review-fix commit.
Risks and follow-ups
Merge #55 first, then update this branch against
mainbefore merging so the final diff contains only the ZUGFeRD work. Font availability remains deployment-specific; the published font names are discoverable suggestions while the public type continues to accept other installed text-capable fonts. CI on the main repository provides the final clean-environment and interpreter-matrix verification.