Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Resolution parameters for PDF generation #1324

Copy link
Copy link
@adbumi

Description

@adbumi
Issue body actions

Summary

The Tableau REST API supports the resolution parameters vizHeight and vizWidth for PDF generation of views and workbooks, but the tableauserclient does not provide this capability.

Suggested implementation

The implementation in tableauserclient seems to be quite simple. It is just a matter of adding these additional parameters to the PDFRequestOptions class and extending the get_query_params() method for the parameters.

I have inherited a child class from PDFRequestOptions and added the functionality. However, I would appreciate it if this functionality could be added to the tsc module as updates to the base class could otherwise break it.

This is my workaround implementation:

`class PdfOptions(PDFRequestOptions):

    def __init__(self, page_type, orientation, viz_height, viz_width):
        super(PdfOptions, self).__init__(page_type, orientation)
        self.viz_height = viz_height
        self.viz_width = viz_width

   def get_query_params(self):
        params = super().get_query_params()

        if self.viz_height:
            params["vizHeight"] = self.viz_height
        if self.viz_width:
            params["vizWidth"] = self.viz_width

        self._append_view_filters(params)
        return params

`

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.