13 Replies Latest reply on Mar 1, 2016 7:06 AM by Mark Fraser

    Tabcmd get pdf errors

    Allen Gapara

      I have been using the following code in Powershell to get pdf

       

      tabcmd get "http://address/views/CompanyEaster/CompanyEaster" -f "C:\AutoTemp\eCompany.pdf"

       

      For some unknown reason it now generating a pdf which Adobe Reader cannot open. At first Powershell was generating an error until I amended the statement to

       

      tabcmd get "http://address/#/views/CompanyEaster/CompanyEaster" -f "C:\AutoTemp\eCompany.pdf"

       

      It is now going past PowerShell and creating a pdf which is 2KB instead of 150KB. Please help

      I am using, since I upgraded Tableau 9.1 last month. That did not make an difference as I was generating the pdf file every day.

        • 1. Re: Tabcmd get pdf errors
          Mark Fraser

          Hi Allen

           

          I don't know if would make a difference but I use export rather than get.

          Here is a working example... I also add more properties to control the output, and I add today's date on the end.

           

          @ECHO OFF

          ECHO Processing.....

           

          cd /D C:\

          cd C:\tabcmd\Command Line Utility

          tabcmd logout

          tabcmd login -s http://www.ourserver.com -u mark --password-file pwd.txt

          tabcmd export "ReleaseList/ReleaseList" --pdf --pagesize a4 --pagelayout landscape --width 1800 --height 1200 -f "C:\markf\Folder\Release List_%date:~-4,4%%date:~-7,2%%date:~-10,2%.pdf" --timeout 60

           

          tabcmd logout

           

          ECHO ON

           

          Hope it helps!

           

          Cheers

          Mark

          2 of 2 people found this helpful
          • 2. Re: Tabcmd get pdf errors
            Tharashasank Davuluru

            Hi

            use export option and full pdf in tabcmd it will help you to get the complete pdf.

            • 3. Re: Tabcmd get pdf errors
              Mark Fraser

              Hi Allen

               

              Alongside what I said previously... It just occurred to me...

              I believe you can only export at View level to PDF, i.e. a single tab.

              Which maybe why your not returning 'everything' i.e. all tabs.

               

              You can add multiple export lines to your batch to export the various views, but only 1 at a time.

              I then use PDFill Editor to add page numbering, add all sheets to 1 PDF etc. PDFill PDF Editor with FREE PDF Writer and FREE PDF Tools

              (there is other similar software available - i chose this because it supports command line functions)

               

              Cheers

              Mark

              • 4. Re: Tabcmd get pdf errors
                Toby Erkson

                Two things:

                1. Make sure the version of tabcmd is the same version as your Tableau Server.  This check is only necessary if you're running tabcmd from a computer that is not your Tableau Server i.e. from a personal desktop or laptop.
                2. Download the workbook and re-save it with the version of Desktop that is the same version of your Server.  So if the report was built prior to version 9.1, and you upgraded your Server now to 9.1, you would need to download the workbook from the Server and into Desktop 9.1, and then re-publish the updated workbook back to the Server (over-write it).

                 

                Personal experience:  tabcmd export fails with '***406 Not Acceptable' error

                4 of 4 people found this helpful
                • 5. Re: Tabcmd get pdf errors
                  Allen Gapara

                  My desktop is version 9.1.4 and Server is 9.1.2

                  Which one is less of a hassle to upgrade or downgrade. Last time we had to involve Interworks to sort the upgrade problems from 8.2 to 9.1

                  • 6. Re: Tabcmd get pdf errors
                    Toby Erkson

                    Well right there you have a potential issue.  Your Desktop should be the same version or less as your Server.  Tableau says it's only the minor version that matters but I think that hasn't always been true.  Any way, downgrading Desktop would be MUCH easier and faster than upgrading Server...however!...if you are willing to perform an upgrade then why not just upgrade to version 9.2.4?

                    2 of 2 people found this helpful
                    • 7. Re: Tabcmd get pdf errors
                      Mark Fraser

                      Allen

                       

                      You're in very good hands with Toby

                      For when you need it > Alternate Downloads Site | Tableau Software

                       

                      Cheers

                      Mark

                      • 8. Re: Tabcmd get pdf errors
                        Allen Gapara

                        How do I downgrade Tableau desktop from 9.1.4 to 9.1.2

                        Upgrading to 9.2.4 requires going through IT department, they will review the case for months and do some tests. By the time the finish, it will be time to upgrade to 11.5.1. For now, I just want an easier way for my reports to work.

                        • 9. Re: Tabcmd get pdf errors
                          Mark Fraser

                          I believe you can install both side by side, the last installed becomes the default although you can change that behaviour

                          It would require you have local admin rights on your machine...

                           

                          It is available via the link above...

                          • 10. Re: Tabcmd get pdf errors
                            Toby Erkson

                            Very easy:  Go to the download site Mark provided, download the executable for 9.1.2, and then install it.  It's okay to have different versions of Desktop on your computer.  Personally, in your situation, I would recommend uninstalling 9.1.4 so only 9.1.2 is used.  Alternately, if you keep both versions then make sure you title them fully so you can see exactly which one you are using because by default only the major.minor version numbers are shown.

                            4 of 4 people found this helpful
                            • 11. Re: Tabcmd get pdf errors
                              Allen Gapara

                              Thank you all for your help. I actual do not have to uninstall / install anything for now.

                              I had to amend the statement to:

                              tabcmd get "views/CompanyEaster/CompanyEaster" -f "C:\AutoTemp\eCompany.pdf"

                               

                              I had to leave out server name, port and #.  It was running before with server name and port number.

                              3 of 3 people found this helpful
                              • 12. Re: Tabcmd get pdf errors
                                Toby Erkson

                                Allen,

                                I unmarked mine as Correct because it really isn't and I don't want the credit.  Your answer is the correct one because it addresses the original question.  Also, details are important and the original example shown was missing the port number info which could have been helpful to know.

                                 

                                Glad you got it working   Command line scripts can be aggravating at times.

                                2 of 2 people found this helpful
                                • 13. Re: Tabcmd get pdf errors
                                  Mark Fraser

                                  Selfless

                                   

                                  Toby, in all seriousness - thank you.

                                  I reviewed the thread and came to the same conclusion as you but I didn't action.

                                  Really nice example of excellent forum practice.

                                  1 of 1 people found this helpful