Steven Matthews
Steven Matthews

Reputation: 11275

Generating a PDF using Google Docs API

Is it possible to provide HTML for the Google Docs API and have it output as a PDF? As far as I can tell, it seems like it is possible to submit an HTML document to Google Docs, and then have Google Docs convert it to a PDF.

I'm checking the API documentation and it has a lot of information about dealing with PDFs already created, but I'm not seeing anything about creating them.

Also, does it accept CSS styling as well, or is it pure HTML?

Upvotes: 8

Views: 19396

Answers (1)

mwKART
mwKART

Reputation: 1085

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

this is what your saying right?

Upvotes: 7

Related Questions