I am wondering if it is possible to get a simple GoogleDoc (via the python gdata client) and render a PDF, replacing some custom # [PLACE_HOLDERS] with its own information.
Found what I was looking for. The problem was that I was trying to use DocsService (v1 API) instead of DocsClient (v2).
WARNING . AppEngine's gdata / OAuth examples are deprecated - http://code.google.com/p/gdata-python-client/source/browse/samples/oauth/oauth_on_appengine/main_hmac.py .
To get the updated version , check this link (this is for Django, but you only need to change the request / response) - http://pamelafox-samplecode.googlecode.com/svn/trunk/spreadsheetsimporter/importer/views.py
So, after changing the Oauth method to a newer version, I managed to get the contents of the file in HTML, DOC, PDF, TXT, etc. Just change exportFormat.
In the future, if someone needs:
_client = gdata.docs.client.DocsClient('My-Prety-App-v1') # Set your prefered auth method # ... entry = _client.GetDoc('document:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') exportFormat = 'html' content = _client.GetFileContent(uri=entry.content.src + '&exportFormat=' + exportFormat) self.response.out.write(content)
Source: https://habr.com/ru/post/1792591/More articles:ANDROID - How to display text on an image? - androidEmacs function to open the file [current date] .tex - functionYii - Module with its UserIdentity component - authentication++ i versus i ++: is there any difference in any modern compiler? - c ++Does the Java HTTP connection pool have an eviction time? Can it be installed? - javaDetermining the number of lines in a text line? - c #How to debug Android? - androidsubprocess.popen and psql - pythonHow to interact with a website using HttpURLConnection? - javaXML DOM vs Object in Javascript - javascriptAll Articles