How to View a Google Spreadsheet Doc as a PDF

1.6k views Asked by At

I would like to know if it's possible to view a Google Spreadsheet Doc as a PDF without first manually converting it as a PDF? I don't want to share a link directly to the spreadsheet, I want to share a link to a PDF version of it which ends up looking better (in Print View rather than Spreadsheet Document View)

I know I can Print > Save as PDF, then download to local machine, then upload and save somewhere on my server. But is there is a way to be able to view the spreadsheet as a PDF.

I have Google'd this and found nothing. The best I could come up with is the Google Document Viewer (https://docs.google.com/viewer) but that does not seem to give mt the option I am looking for. Further, I do not want to install any Chrome plugins, etc. because I want to be able to share a link to the PDF with people but not have to have them install a plugin to see the doc.

2

There are 2 answers

0
H. Ferrence On BEST ANSWER

Unfortunately, what you are trying to do and the way you are trying to do it is not a capability within Google Docs. Sorry.

2
Grzegorz Krauze On

I think the best way is to use Google Drive API to write own script that will do this job. I mean:

  • You have a web server
  • Write a simple method in any web technology, such as PHP, Python, Java, C#, whatever you like and your server is able to serve. This method is connected to the google drive through it's API to your account, knows which spreadsheet to take care of and how to understand the columns. This spread should be parsed to HTML and with some popular tool (proper for your programming language or server's operating system) you create the PDF. The method should create HTTP response with header type: application/pdf.
  • You provide interested people with the link under which your method is available.

I guess this reference should help you to use Google API:

How to download the resources: https://developers.google.com/drive/web/manage-downloads

How to convert (i.e. to PDF) and open the resources in your own application: https://developers.google.com/drive/web/integrate-open#open_and_convert_google_docs_in_your_app

I hope this helps.