使用Google Drive API的HTML2PDF

使用Google Drive API的HTML2PDF

问题描述:

是否可以使用Google Drive API将HTML文件上传并转换为PDF,而无需用户互动

Is it possible to upload and convert an HTML file to PDF using Google Drive API without user interaction?

是的,有两个请求。您可以将文件作为Google文档导入,然后将其导出为PDF。使用Drive API。

Yes, it is, with two requests. You can import the file as a Google Docs, then export it to PDF. Using the Drive API.

https:// developers.google.com/drive/v2/reference/files/insert
https ://developers.google.com/drive/v2/reference/files/get