27

I think there used to be a way to link to the PDF version of a Google Docs, but now I can only make a link that downloads the PDF instead of viewing it in the browser. Does anybody know if the old technique is still supported? I found several discussions in the Google support forum, but nothing definitive. The Google Docs API only lists the download method, so I suspect I'm out of luck.

Just to be clear, I want to link to a PDF file that gets automatically updated whenever the Google Docs changes.

1

7 Answers 7

17

Replace the beginning of the url with the Google Docs viewer.

This is what you need:

https://docs.google.com/viewer?url=https://docs.google.com/x/yyyy/document/z/nvjsinmsdfjnlsnlkkn-hslknl1_V7sc/export?format=pdf
1
  • 3
    worked like magic, thanks!
    – Jared
    Jan 8, 2019 at 17:34
20

You can do it by using the Export as PDF tool like this:

Your document link (example):

https://docs.google.com/x/yyyy/document/z/nvjsinmsdfjnlsnlkkn-hslknl1_V7sc/edit

Change the end of link from /edit to /export?format=pdf

https://docs.google.com/x/yyyy/document/z/nvjsinmsdfjnlsnlkkn-hslknl1_V7sc/export?format=pdf

However this needs Sharing setting to be modified Anyone who has the link can view

It works with:

/export?format=docx
/export?format=odt
/export?format=rtf
/export?format=pdf
/export?format=txt
/export?format=html
3
  • 4
    There are several options for exporting a PDF. Here are arguments that download a letter-size PDF fit-to-page, landscape orientation, with title, row headers on each page, no gridlines, no sheet name, no page numbers: export?format=pdf&size=0&fzr=true&portrait=false&fitw=true&gid=0&gridlines=true&printtitle=true&sheetnames=false&pagenum=UNDEFINED&attachment=true Sep 26, 2015 at 0:08
  • This will download the PDF... Will not open a view in the browser
    – Riccardo
    May 11, 2018 at 12:15
  • @QuinnComendant Great comment! Is there any parameters to set margin at each side? Mar 4, 2020 at 14:29
4

To preview in PDF-like format, add /preview at the end, e.g.

https://docs.google.com/document/d/DOCS_ID/preview

To export as PDF, use the following URL structure:

https://docs.google.com/document/export?format=pdf&id=DOCS_ID

Example wget command:

wget --content-disposition "https://docs.google.com/document/export?format=pdf&id=1QtgW1rdyqaGVP3cqDSagTacewsND41t22hD3hdS7b-w"
1
  • 1
    this is almost perfect for me, but printing from the link is awkward
    – Corey
    Jul 12, 2018 at 0:05
3

It took me a lot of struggle and the very helpful comment by @Quinn Comendant to figure this one out.

The url needs to end with: /export?format=pdf&attachment=false

example: https://docs.google.com/document/d/1PjO5dM4KQLWBFU2IzBE5gINwFU13ub9uvVRywk2Hx_s/export?format=pdf&attachment=false

2
  • 1
    Your link doesn't work. It's just a blank page with no content. Same for my link when I set attachment=false
    – Pacerier
    May 20, 2017 at 10:09
  • This is the perfect answer. Thank You!
    – Royi
    Dec 21, 2020 at 20:20
2

Publishing a Google Document as a PDF is not supported yet :(

(Though it IS supported for Spreadsheets...)

1
  • When wil it be supported? It's like 5 years...
    – Pacerier
    May 20, 2017 at 10:35
1

After you click on the PDF, you will notice a Share link on the top-left corner. Select Sharing Settings option from the menu & change the settings to "Public on the web" or "Anyone with the link" instead of the default which is Private.

When you share that link, others can view it within the browser without having to download the PDF

1
  • That lets me link to the HTML version of the doc, but the PDF version still requires a sign in and then just downloads instead of displaying in the browser. Did I misunderstand something?
    – Don Kirkby
    Oct 13, 2010 at 19:19
0
  1. Click 'Print' or the icon for the printer in the Google Drive.
  2. At the 'Destination' field, click the 'Change' button and choose "Save to Google Drive" as your destination. If "Save to Google Drive" does not display as an option among your printers,

    2a. Select 'Show All' at the bottom of your list and it should display. Or, type 'google drive' in the 'Search Destinations' field.

  3. Click 'Save'

  4. Go to your Google Drive homepage and select 'Recent' to display your new .pdf file
  5. Rename or organize at will.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.