PDFCLOUD-5553 Add client methods to convert to .pdf#18
Merged
datalogics-kam merged 10 commits intopdfrest:mainfrom Feb 18, 2026
Merged
PDFCLOUD-5553 Add client methods to convert to .pdf#18datalogics-kam merged 10 commits intopdfrest:mainfrom
.pdf#18datalogics-kam merged 10 commits intopdfrest:mainfrom
Conversation
.pdf
f8edd25 to
cc41bd8
Compare
cc41bd8 to
7bc4489
Compare
Contributor
Author
|
@datalogics-kam As in Watermark PDF, I've tried to split up the client methods here; I can squash them into the old commits once everything looks good. |
7bc4489 to
f445a41
Compare
9896a06 to
f70d2f2
Compare
Contributor
|
I think this is looking good but needs a rebase. |
- Add methods for conversion from file and conversion from url - Do argument validation based on input file format Assisted-by: Codex
Assisted-by: Codex
- Split by input format "families" - eml - HTML - image - Office - PostScript - Leave URL input separate, as it was Assisted-by: Codex
Assisted-by: Codex
- Updated method name to reflect singular URL input, improving clarity. - Adjusted parameter from `urls: UrlInput` to `url: UrlValue` to align with single URL support. - Revised docstrings to clarify behavior for single URL input. - Renamed `ConvertUrlsToPdfPayload` → `ConvertUrlToPdfPayload`. - Ensured updates in related tests, including test names and payload expectations. Assisted-by: Codex
- Set default values for `compression`, `downsample`, `tagged_pdf`, `page_size`, `page_margin`, `page_orientation`, and `web_layout` in client methods. - Aligned test cases with updated defaults to ensure consistent behavior. Assisted-by: Codex
…rsion
- Updated test file names:
`test_convert_urls_to_pdf.py -> test_convert_url_to_pdf.py`
`test_live_convert_urls_to_pdf.py -> test_live_convert_url_to_pdf.py`
- Renamed test functions to reflect singular URL input:
- `test_convert_urls_to_pdf_success` → `test_convert_url_to_pdf_success`
- `test_convert_urls_to_pdf_validation_errors` → `test_convert_url_to_pdf_validation_errors`
- `test_async_convert_urls_to_pdf_request_customization` →
`test_async_convert_url_to_pdf_request_customization`
- `test_live_convert_urls_to_pdf_success` →
`test_live_convert_url_to_pdf_success`
- `test_live_async_convert_urls_to_pdf_invalid_page_size` →
`test_live_async_convert_url_to_pdf_invalid_page_size`
Assisted-by: Codex
- Implemented `_serialize_as_first_url` to extract the first URL from a list. - Updated `url` in `ConvertToPdfPayload` to accept a list of `HttpUrl` with enforced length of 1. - Applied `PlainSerializer` to ensure only the first URL is serialized. Assisted-by: Codex
…ions - Added tests for invalid page size handling across various conversion methods: `convert_html_to_pdf`, `convert_url_to_pdf`, `convert_email_to_pdf`, `convert_image_to_pdf`, `convert_office_to_pdf`, and `convert_postscript_to_pdf`. - Introduced request customization tests, including validations for custom query parameters, headers, body, and timeout behavior. - Ensured comprehensive validation of async and sync client operations. Assisted-by: Codex
Assisted-by: Codex
f70d2f2 to
17b02ac
Compare
✅ Deploy Preview for pdfrest-python ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
datalogics-kam
approved these changes
Feb 18, 2026
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.
Adds “Convert to PDF” client support, including conversions from uploaded files and URL sources.
Introduces payload models and public type exports to validate inputs based on source format.
Adds comprehensive unit + live test coverage and a new HTML fixture for conversion cases.