thotwielder
thotwielder

Reputation: 1707

Generate multiple sheets in one pdf file

I am trying to generate a pdf from a Tableau workbook which has two sheets using the url method: E.g: https://TableauServer/views/workbook/sheet1?:format=pdf&parameter=value

I am doing this in a program which will issue the url request to the url. The url works fine for one sheet. But the problem is how to generate one pdf file with both sheets in it?

Upvotes: 0

Views: 785

Answers (2)

Sam M
Sam M

Reputation: 4166

We know it's possible because within the Tableau pages itself if you download a PDF it gives you several formatting options, including the option to put all the worksheets in a workbook into a single PDF.

I couldn't find any documentation on it though. What I ended up doing was looking at the network console in the browser (usually F12) when I downloaded the PDF from the browser by clicking the Download button. That showed me the URL end point and the JSON body the server expected in the request payload.

The endpoint URL wasn't too cryptic and ended with "commands/tabsrv/pdf-export-server". The challenge was to take the JSON in the request payload and find the right settings to get it into a single PDF.

This method is a more technical approach and requires very little coding skills; any language that has functions for http calls will work (I use python for it).

If you don't mind doing it outside a browser, tabcmd has lots of functionality to control PDF generation at the command line.

Upvotes: 0

Pete Ludlow
Pete Ludlow

Reputation: 121

If you first put your two sheets into a single dashboard and then use the URL for the published dashboard (still using the format=pdf parameter), this should work just fine.

Upvotes: 1

Related Questions