Answers:
将网址开头替换为Google文档查看器。
这是您需要的:
https://docs.google.com/viewer?url=https://docs.google.com/x/yyyy/document/z/nvjsinmsdfjnlsnlkkn-hslknl1_V7sc
/ export?format = pdf
您可以通过使用“ 导出为PDF”工具来做到这一点:
您的文档链接(示例):
https://docs.google.com/x/yyyy/document/z/nvjsinmsdfjnlsnlkkn-hslknl1_V7sc
/编辑
将链接的结尾从更改/edit
为/export?format=pdf
https://docs.google.com/x/yyyy/document/z/nvjsinmsdfjnlsnlkkn-hslknl1_V7sc
/ export?format = pdf
但是,这需要修改共享设置,任何知道链接的人都可以查看
它适用于:
/export?format=docx
/export?format=odt
/export?format=rtf
/export?format=pdf
/export?format=txt
/export?format=html
export?format=pdf&size=0&fzr=true&portrait=false&fitw=true&gid=0&gridlines=true&printtitle=true&sheetnames=false&pagenum=UNDEFINED&attachment=true
要以PDF格式预览,请/preview
在末尾添加,例如
https://docs.google.com/document/d/DOCS_ID/preview
要将其导出为PDF,请使用以下URL结构:
https://docs.google.com/document/export?format=pdf&id=DOCS_ID
示例wget
命令:
wget --content-disposition "https://docs.google.com/document/export?format=pdf&id=1QtgW1rdyqaGVP3cqDSagTacewsND41t22hD3hdS7b-w"
我花了很多力气和@Quinn Comendant的非常有帮助的评论来弄清楚这一点。
网址必须以以下结尾:
/export?format=pdf&attachment=false
示例:https: //docs.google.com/document/d/1PjO5dM4KQLWBFU2IzBE5gINwFU13ub9uvVRywk2Hx_s/export?format = pdf&attachment = false
attachment=false