How to style a Google Doc using Google Drive API?

落爺英雄遲暮 提交于 2019-12-06 15:44:58

问题


Currently, I have a web application that basically consists in a simple form. When I submit this form, I generate a document that I send to Google Drive. It works.

My problem is that I have no styling and I wonder how I can do that? I tried with HTML and CSS but if the HTML allows me to structure my document, the CSS does nothing.

So, how could I do that?


回答1:


I guess you're uploading an HTML file, with convert=true, to create a Google Doc. Any "attached" CSS file will be ignored. There is some embedded element styling that will be honoured by the conversion process. Perhaps the best approach would be to create a sample styled document manually, then export it as HTML to see how the styling works.



来源:https://stackoverflow.com/questions/22584845/how-to-style-a-google-doc-using-google-drive-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!