PDFCLOUD-6243: Add PDF shape overlays - #45
Draft
datalogics-kam wants to merge 11 commits into
Draft
Conversation
datalogics-kam
force-pushed
the
pdfcloud-6243-pdf-with-added-shapes
branch
from
August 23, 2026 00:39
847f705 to
ed495f3
Compare
datalogics-kam
force-pushed
the
pdfcloud-6243-pdf-with-added-shapes
branch
from
August 23, 2026 13:39
ed495f3 to
c13e6a3
Compare
datalogics-kam
force-pushed
the
pdfcloud-6233-new-pdfrest-api-skill
branch
from
August 25, 2026 22:23
a8992a8 to
a800ecf
Compare
datalogics-kam
force-pushed
the
pdfcloud-6243-pdf-with-added-shapes
branch
from
August 25, 2026 22:51
1346bbf to
58d46c8
Compare
- Define PEP 723 metadata, layout, resource, and docstring conventions - Document local and matrix validation for live examples Assisted-by: Codex
- Require endpoint examples and explicit sample input discovery - Define script structure and local validation expectations Assisted-by: Codex
- Guide examples toward public keyword constructors and union aliases - Preserve dictionary literals for dynamic, invalid, and wire-format data Assisted-by: Codex
- Add sync and async shape helpers with typed line and rectangle inputs - Validate shape coordinates, colors, tagging, and PDF resources - Cover JSON serialization, live service behavior, and API guide discovery Assisted-by: Codex
- Resolve MkDocs cross-references for added shape object types - Restore strict documentation build validation Assisted-by: Codex
- Assert async timeout propagation and PDF MIME validation - Reject multiple input PDFs through both client transports - Cover shape geometry, opacity, and color range boundaries Assisted-by: Codex
- Accept one RGB or CMYK color field for each shape color - Route colors to pdfRest's RGB or CMYK wire fields by channel count - Update unit and live endpoint coverage Assisted-by: Codex
Assisted-by: Codex
- Describe line and rectangle shape fields for generated API reference - Mark the shape union as a type alias so its union renders correctly Assisted-by: Codex
- Prefer PDFREST_LIVE_BASE_URL before the standard endpoint candidates - Document live-test configuration and fallback behavior for contributors Assisted-by: Codex
- Demonstrate typed rectangle and line construction - Exercise tagging and report output metadata against a bundled PDF Assisted-by: Codex
datalogics-kam
force-pushed
the
pdfcloud-6243-pdf-with-added-shapes
branch
from
August 26, 2026 22:30
58d46c8 to
aad4964
Compare
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-6243
Why this change
The Python SDK did not expose the documented
/pdf-with-added-shapesoperation, forcing callers to build raw requests for line and rectangle overlays. This adds a typed, validated SDK workflow that matches the service contract.What changed (high level)
The clients now provide synchronous and asynchronous
add_shapes_to_pdfhelpers backed by Pydantic request models and public shape type contracts. The implementation keeps uploaded-file lifecycle handling consistent with existing helpers and serializes shape objects into the API JSON layout.Behavior changes
Callers can add one or more lines or rectangles to an uploaded PDF, including RGB or CMYK colors, opacity, stroke width, output naming, and optional accessibility tagging. Local validation rejects invalid coordinates, conflicting color modes, non-PDF inputs, empty shape lists, and tagging metadata without
tag_enabled=True.Validation
uv run pytest --ignore tests/live -n auto --maxschedchunk 2— 1,001 passed.PDFREST_LIVE_BASE_URL=http://sleipnir:3000/ uv run pytest tests/live/test_live_add_shapes_to_pdf.py -n auto --maxschedchunk 2— 4 passed.Risks and follow-ups
This is a stacked draft PR on #44: merge #44 first, then this PR. The PR base is
pdfcloud-6233-new-pdfrest-api-skill, so reviewers see only the endpoint-support layer. No breaking changes are intended.