Repository navigation
PDFCLOUD-6576 Add tagged-text options - #62
Draft
datalogics-tsmith wants to merge 3 commits into
Draft
datalogics-tsmith wants to merge 3 commits into
datalogics-tsmith wants to merge 3 commits into
Conversation
- Expose optional tagging and language settings on both client transports. - Validate service-compatible language tags and their tagging dependency. - Preserve existing request bodies when the new options are omitted. Assisted-by: Codex
- Assert exact sync and async serialization for provided and omitted options. - Cover language syntax, explicit nulls, and request-level dependencies. - Verify live outputs report tagged document content through both clients. Assisted-by: Codex
- Add a standalone typed example for tagged English text overlays. - List the workflow in the runnable example inventory. - Document tagging and natural-language metadata in the API guide. Assisted-by: Codex
datalogics-tsmith
temporarily deployed
to
ci-live
November 5, 2026 16:21 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
November 5, 2026 16:21 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
November 5, 2026 16:21 — with
GitHub Actions
Inactive
datalogics-tsmith
temporarily deployed
to
ci-live
November 5, 2026 16:21 — 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-6576
Why this change
The Python SDK's text-overlay helper does not expose pdfRest's documented tagging controls. Callers therefore cannot enable accessibility tagging for newly added text or identify its natural language without constructing raw requests.
What changed (high level)
The synchronous and asynchronous
add_text_to_pdfhelpers now accept optionaltag_enabledandtag_languagearguments. The existing payload model owns language syntax and dependency validation, preserving the thin-client design and leaving language-tag canonicalization to the service.Focused unit and live coverage exercise both transports, exact request serialization, compatibility when the options are omitted, invalid combinations, and server-observable tagged output. A standalone typed example and API guidance make the workflow discoverable.
Behavior changes
Callers can set
tag_enabled=Trueto tag newly added text and optionally provide a supported BCP 47 language form such asen-US. Supplying a language without explicitly enabling tagging fails locally before transport. ExplicitNonevalues and omitted options are excluded from the request, so existing callers retain their prior wire behavior.The SDK validates the service-supported lexical shape—two or three language letters with at most one script or region subtag—and preserves accepted input for server-side canonicalization. The change is additive and does not intentionally break existing callers.
Validation
The focused unit module passed 37 tests. The complete credential-independent suite passed with 3,415 tests and 10 expected skips. The Python 3.10-3.14 Nox matrix passed with the same results and 96% overall coverage on each interpreter, and the client class-function coverage gate passed at its 90% threshold.
Ruff formatting and linting, basedpyright, changed-file pre-commit hooks, strict MkDocs validation, and
git diff --checkpassed. Credentialed live tests and the standalone example were not completed locally becausePDFREST_API_KEYwas unavailable; main-repository CI provides the required live-service and example validation.Risks and follow-ups
This PR must remain draft until #57, #58, #60, and #61 merge. Afterward, update the branch and PR base to
main, resolve any stack conflicts, and rerun the full CI matrix before final review.Language canonicalization remains service-owned. The SDK intentionally validates the service-supported request shape without attempting to reproduce deployment-specific canonicalization locally.