Repository navigation
PDFCLOUD-6570 Add PDF-to-PostScript conversion - #54
Closed
datalogics-tsmith wants to merge 5 commits into
Closed
datalogics-tsmith wants to merge 5 commits into
datalogics-tsmith wants to merge 5 commits into
Conversation
- Export the supported PostScript language levels for client callers. - Validate uploaded PDFs, page ranges, scale values, and output names. - Serialize the payload into the fields expected by the service. Assisted-by: Codex
- Expose sync and async helpers with typed conversion options. - Cover request serialization, validation, responses, and timeouts. - Bump the feature release version to 1.4.0. Assisted-by: Codex
- Exercise both language levels through sync and async clients. - Assert output metadata, page count, and language-level markers. - Confirm the service rejects invalid levels, ranges, and scales. Assisted-by: Codex
- Add runnable sync and async examples for PostScript levels 3 and 2. - Verify generated headers, language levels, page counts, and metadata. - Link the route and examples from the public documentation indexes. Assisted-by: Codex
- Verify default output serialization through both client transports. - Isolate live options and assert observable PostScript markers. - Derive live scale boundary cases from the payload schema. Assisted-by: Codex
datalogics-tsmith
had a problem deploying
to
ci-live
October 19, 2026 20:37 — with
GitHub Actions
Failure
datalogics-tsmith
had a problem deploying
to
ci-live
October 19, 2026 20:37 — with
GitHub Actions
Failure
datalogics-tsmith
had a problem deploying
to
ci-live
October 19, 2026 20:37 — with
GitHub Actions
Failure
datalogics-tsmith
had a problem deploying
to
ci-live
October 19, 2026 20:37 — with
GitHub Actions
Failure
datalogics-tsmith
had a problem deploying
to
ci-live
October 19, 2026 20:37 — with
GitHub Actions
Failure
datalogics-tsmith
had a problem deploying
to
ci-live
October 19, 2026 20:37 — with
GitHub Actions
Failure
✅ Deploy Preview for pdfrest-python ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
Superseded by #55, which uses the upstream-owned branch so the full CI and live-test credentials are available. |
This branch was successfully 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-6570
Why this change
The Python SDK did not expose pdfRest's PDF-to-PostScript operation, requiring callers to assemble requests outside the typed client. This adds a supported sync and async workflow for converting uploaded PDFs into print-oriented PostScript.
What changed (high level)
The new
convert_pdf_to_postscripthelpers accept uploadedPdfRestFileresources and delegate request validation and serialization to a dedicated Pydantic payload model. A publicPostScriptLeveltype makes the supported language levels discoverable, while the existing file-operation machinery resolves the generated resource into a typed response.Documentation and runnable sync and async examples demonstrate the upload, conversion, download, and verification flow. The package version moves to 1.4.0 for the additive public API.
Behavior changes
Callers can now select PostScript level 2 or 3, page ranges, binary or text-safe output, scaling, rotation, shrink-to-fit behavior, printable annotations, and an optional output prefix. Omitting the output prefix leaves server-generated naming intact.
Invalid MIME types, multiple input resources, unsupported language levels, malformed page ranges, non-positive or non-finite scales, and invalid output prefixes fail locally before transport. There are no breaking changes to existing APIs.
Validation
Focused validation passed with 46 unit tests and 24 live sync/async tests against the local pdfRest service. The live suite isolates each route option and verifies concrete PostScript markers for text-safe output, language level, page selection, and the legal scale boundary.
The Python 3.10–3.14 non-live Nox matrix passed with 2,969 tests and 10 expected skips per interpreter at 95% overall coverage. The class-function coverage gate checked 165 functions and passed its 90% threshold. Ruff, configured basedpyright, strict MkDocs, package build, and diff checks also passed. The final rebase was patch-identical by
git range-diff, followed by another focused unit and live run.The pre-commit file checks passed except that its basedpyright subprocess could not discover installed dependencies in the sandbox; an equivalent full configured basedpyright run completed with zero errors or warnings.
Risks and follow-ups
The public API is additive and uses the existing request and response infrastructure, so migration risk is low. Live assertions use deterministic checked-in PDFs; rotation, shrink-to-fit, and annotation toggles are isolated and exercised through both transports, while binary-output and scale effects have direct output assertions. CI should provide the final clean-environment verification of the pre-commit hook and interpreter matrix.