google-docs-api

Google Docs Pixels to Inches

蹲街弑〆低调 提交于 2019-12-24 00:36:29
问题 Is anyone aware of the formula google docs use to convert pixels to inches? Right click on a cell and click table properties then you get the image below, note I have opened up firebug and you can clearly see each td is set with a px width. I can work with inches or mm or equivalent for printing to pdf but pixels is not so accurate. This is all done on client side hence the javascript tag... 回答1: Haroon, I'm not sure what you're trying to do, but PC displays are generally 96DPI and I think

Could not upload a local image file embedded into HTML as a data URI into google doc via java api

时光怂恿深爱的人放手 提交于 2019-12-23 16:47:06
问题 I need upload a image file from local disk. I converted the image into base64 format, and write the html file into local disk as well, that html file can be opened in browser with image showing, but the document in google doc just an empty file, even I drag that html file into google docs the image still not there. My code is below: DocsService client = new DocsService("testappv3"); client.setUserCredentials("username", "password"); File file = new File("c:/test.bmp"); ByteArrayOutputStream

Google Doc's (Spreadsheet) get Revision Id

≡放荡痞女 提交于 2019-12-23 04:29:10
问题 I'm testing this page: https://developers.google.com/drive/v2/reference/revisions/get#try-it I can't find the revision id and when i try put something like i think is the revision id, an error is displayed saying: "message": "Revision not found: " How i can find the revision id of the file (i'm trying for Spreadsheet)? Later i'll try to use (in java): RevisionList revisions = service.revisions().list(fileId).execute(); return revisions.getItems(); But for now i need to do manually. 回答1: It

Google Doc's (Spreadsheet) get Revision Id

走远了吗. 提交于 2019-12-23 04:29:03
问题 I'm testing this page: https://developers.google.com/drive/v2/reference/revisions/get#try-it I can't find the revision id and when i try put something like i think is the revision id, an error is displayed saying: "message": "Revision not found: " How i can find the revision id of the file (i'm trying for Spreadsheet)? Later i'll try to use (in java): RevisionList revisions = service.revisions().list(fileId).execute(); return revisions.getItems(); But for now i need to do manually. 回答1: It

Authentication with the Google Docs List API, Python and OAuth 2

﹥>﹥吖頭↗ 提交于 2019-12-23 02:38:17
问题 I'm trying to use the Google Docs API with Python+Django and OAuth 2. I've got the OAuth access token, etc. via google-api-python-client, with the code essentially copied from http://code.google.com/p/google-api-python-client/source/browse/samples/django_sample/plus/views.py Now, I assume I should be using the google gdata API, v 2.0.17. If so, I'm unable to find exactly how to authorize queries made using the gdata client. The docs at http://packages.python.org/gdata/docs/auth.html#upgrading

Uploading a PDF file to Google Docs generated by pdfjet on GAE/J

强颜欢笑 提交于 2019-12-22 17:48:10
问题 I need to upload a PDF file to users google docs which is generated by pdfjet on google app engine. I figure out to generate pdf using pdfjet for gae/j. pdfjet uses streams to create the pdf. Is there anyway to convert stream to file so I can upload to users google docs. I tried gaevfs but couldn't make it work. I can use another pdf generation solution if needed or another virtual file system etc. PDF generation code ByteArrayOutputStream os = new ByteArrayOutputStream(); PDF pdf = new PDF

Google Script: How to highlight a group of words?

自作多情 提交于 2019-12-22 17:44:05
问题 I'd like to write a script for google docs to automatically highlight a set of words. For one word I could use a script like this: function myFunction() { var doc = DocumentApp.openById('ID'); var textToHighlight = "TEST" var highlightStyle = {}; highlightStyle[DocumentApp.Attribute.FOREGROUND_COLOR] = '#FF0000'; var paras = doc.getParagraphs(); var textLocation = {}; var i; for (i=0; i<paras.length; ++i) { textLocation = paras[i].findText(textToHighlight); if (textLocation != null &&

Create file on GAE/J and upload to Google docs

妖精的绣舞 提交于 2019-12-21 21:27:19
问题 Is it possible to create any kind of file on GAE/J and upload to google docs? I've asked a similar question before about creating and uploading PDF. Thanks. Update According to Google Docs API "To upload a document to the server, you can attach the file to the new DocumentListEntry using the setFile() method.". And setFile method needs java.io.File which is not accepted by GAE/J setFile(java.io.File file, java.lang.String mimeType). Is there a solution I can upload without storing data. I

Script to automatically make a copy of a Google Document for editing

扶醉桌前 提交于 2019-12-20 09:51:53
问题 I feel like a total noob posting here. I know CSS, HTML, and XML pretty well but have always avoided JS. I know very little javascript and recently started a Lynda.com course to catch up. Sorry for my ignorance. As such, I am really struggling learning Google Apps Script. Obviously, I need to learn JS before I can make sense of any of it. The school I work for (5000 students) has set up an online curriculum. I created the curriculum in the form of thousands of google document worksheets.

Google doc no preview available error

≡放荡痞女 提交于 2019-12-20 09:38:36
问题 I used the google doc to display the pdf file in web broswer. It was working fine before. Now it gives no preview available. Most of the time it gives the blank screen with no preview available but sometime it opens the pdf. However i noticed that if the size of the pdf is small, it works fine but if the size is a bit larger with 10-100 or more pages, the no preview is shown. link: https://docs.google.com/gview?embedded=true&url=http://trafficpolice.gov.np/traffic/uploadfiles/56a0e8156d4ea