Reputation: 108
I know it's possible to convert an HTML file to PDF using Google Drive (HTML2PDF using Google Drive API) but I'd like to know if this HTML has images and CSS files is possible and how to do that.
Upvotes: 2
Views: 5253
Reputation: 1520
For images you could try this: Embedding Base64 Images Worked for me when uploading by web. Should work with my solution https://stackoverflow.com/a/21711109/592042
Css can be written right into html file.
Upvotes: 1
Reputation: 9213
You need convert HTML to a Docs file and export it as PDF. During the docs conversion most of the non-trivial styles are being trimmed. Basic coloring, sizing and positioning will all you'll get. The exported PDF is the Docs' file's PDF version. Images will be preserved though.
You can make experiments by uploading your html
files to Google Drive on drive.google.com with conversion settings on and see the results.
Upvotes: 2