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.
Asked
Active
Viewed 4,373 times
2 Answers
2
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.

Burcu Dogan
- 9,153
- 4
- 34
- 34
-
Thanks! I didn't know how to convert it manually. Now my only problem is how to generate a beautiful pdf – Kikers25 May 04 '13 at 20:58
-
there are some limitations:
tag doesnt work, rowspan/colspan not working. – vs4vijay Jun 05 '13 at 07:46 -
any way to avoid the styles being trimmed when converting from html to a google doc? – Louis Sankey Apr 14 '22 at 17:37
1
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.