6

Is it possible to create PDF documents (e.g. on a nightly schedule) with Tableau and have those documents exposed by a URL by the Tableau server?

This sort of approach is common in the Jasper Reports and BIRT world, so I was wondering if the same approach is possible with Tableau?

I couldn't see any documentation on the Tableau site for creating PDFs, other than print to PDF

Chris Snow
  • 20,818
  • 29
  • 115
  • 263

4 Answers4

5

With Tableau Server, you can access your published workbook in a pdf format with this URL: http://nameofyourtableauserver/views/NameOfYourWorkbook/NameOfYourView.pdf

Simply, the url is the url of your view + you add ".pdf".

The pdf file will be generated dynamically when accessing the URL.

Another option is to program your own script with tabcmd. You can have more info on tabcmd here: http://kb.tableausoftware.com/articles/knowledgebase/using-tabcmd

YABADABADOU
  • 1,078
  • 1
  • 13
  • 36
  • Thank you. Do you know if it is possible to create images (e.g. png or jpeg) of charts using the same approach? Also, is it possible to pass parameters to the workbook to provide different data filters? – Chris Snow Apr 24 '14 at 13:52
  • I believe that Ryan has answered this. – YABADABADOU Apr 24 '14 at 17:25
  • can i filter view appending filter name=value to URL like below ?http://nameofyourtableauserver/views/NameOfYourWorkbook/NameOfYourView.pdf?MY(Date)=201702 – Pritesh Mar 24 '17 at 12:51
5

The same technique also works for PNG. You can control filters using ?field_name=value. You can even select multiple values like this ?field_name=value1,value2.

Parameters can be set the same way.

Personally I've had the best luck with discrete dimensions instead of continuous ones.

Ryan
  • 444
  • 2
  • 2
2

I use the Windows Task Scheduler with batch files and Tabcmd.

Programs needed:

  • Tabcmd
  • Windows TaskScheduler (All Programs- Accessories - system tools)

http://onlinehelp.tableausoftware.com/v8.1/server/en-us/tabcmd_overview.htm (tabcmd, how it works?)

Batchfile (create a text file and then save with file extension .bat):

  • 1- Locate tabcmd and login
  • 2- use function tabcmd get "http:\..." and -f "C:...pdf" to save to file.
  • 3- concatenate the filters you want to use to the end of your URL as shown in other answers(all filters on the view must be included(filled out))
  • 4- Save Batch file

Windows Task Scheduler:

  • 1- create a task that will execute the batch file
  • 2- TEST
user3845582
  • 105
  • 1
  • 14
2

You can do this by typing

http://server/views/WorkbookName/SheetName.pdf?:format=pdf

Another option will be using javascript api like below..

function exportPDF() {
  viz.showExportPDFDialog();
}   
Karthik Venkatraman
  • 1,459
  • 2
  • 20
  • 41