feat: add vizWidth/vizHeight to PDF export for views and workbooks#1795
Open
jacalata wants to merge 2 commits into
Open
feat: add vizWidth/vizHeight to PDF export for views and workbooks#1795jacalata wants to merge 2 commits into
jacalata wants to merge 2 commits into
Conversation
Fixes #1102 - PDFRequestOptions already inherited viz_width/viz_height from _ImagePDFCommonExportOptions (shared with ImageRequestOptions), which serialises them as vizWidth/vizHeight query params - Added version guard in views.populate_pdf: raises UnsupportedAttributeError when viz_height or viz_width are used below API 3.26 - Added tests for the new version guard, the happy path (API 3.26+), unit- level query-param serialisation, and the existing XOR validation - Removed stray bare literal '44' from test_request_option.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The REST API docs claimed vizHeight/vizWidth required API 3.26 and were Cloud-only, but server-side code shows these params have been accepted unconditionally since at least 2021.4 with no platform distinction. Remove the 3.26 guard; the endpoint's own minimum version is sufficient. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
stephendeoca
approved these changes
Jun 19, 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.
Summary
PDFRequestOptionsalready hadviz_width/viz_heightfields but they were never sent in requests — this wires them up forviews.populate_pdfandworkbooks.populate_pdfXORvalidation: bothviz_widthandviz_heightmust be set together or not at allFixes #1102
Test plan
test_pdf_viz_dimensions— viz dims sent and response populatedtest_populate_pdf_vf_dims— viz dims work alongside view filterstest_pdf_errors— XOR validation raisesValueErrorwhen only one dim set🤖 Generated with Claude Code