google-docs-api

Edit on Google Docs without converting

放肆的年华 提交于 2019-12-11 23:28:04
问题 I'm integrating my system with Google Drive. Everything is working so far, but one thing. I cannot edit the uploaded Word documents without converting them to Google Docs first. I've read here it's possible using a Chrome plugin: https://support.google.com/docs/answer/6055139?hl=en But that's not my goal. I'm storing the file's information on my database and then I just request the proper URL for editing and previewing. Previewing is working fine, but when I try the edit URL it says the file

How to Add google doc viewer in mvc4 Applicaton?

╄→гoц情女王★ 提交于 2019-12-11 19:19:26
问题 I am beginner in programming. My problem is, I want to show PDF files in Google Doc Viewer in my website page. I put my PDF files in folder named as Bullettin , it is in App_Data folder. How can I view this PDF file in my website through Google Doc Viewer using C# MVC4 application? i used the following code in view page http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf&embedded=true" target="_blank" class="embed">View 回答1: You should use the following url for

How to add content to table cell via google-docs-api request?

我怕爱的太早我们不能终老 提交于 2019-12-11 17:25:10
问题 I want to add a content to a table cell in google doc, but the way described in the documentation doesn't work. What is wrong with my request? When I provide 1 for index parameter of insertText request it just pastes text before table. When I provide 2 as value of index parameter I get an error: "Invalid requests[1].insertText: The insertion index must be inside the bounds of an existing paragraph. You can still create new paragraphs by inserting newlines." { "requests": [ { "insertTable": {

How to get the embed url for google docs presentation?

大城市里の小女人 提交于 2019-12-11 16:46:46
问题 It looks like recently there has been a slight change on embedding a published google docs presentation. The url for the iframe embed changed from: https://docs.google.com/present/embed?id=[doc_id] To: https://docs.google.com/presentation/embed?id=[doc_id] Looks like some old documents still require the old embed url, and the new documents require the new url. So given a doc_id is there a way (using the API) to get the embed url you should be using? update : After poking around, it looks like

Need help optimizing our Google Docs API for document.batchupdate

烈酒焚心 提交于 2019-12-11 16:42:55
问题 We are using Google docs api-document.generate function to generate templates and documents.BatchUpdate function to replace/merge various kinds information like text, URL's, images and tables with values inside the templates. During document.BatchUpdate function we are sending a JSON more than 200 objects with "WriteControl" and it has some custom code to handle our tables- text color, conditional logics, URLS and Inline images. Google Docs API is typically taking 20-60 seconds for loading a

addViewer the method used with the class DriveApp always sends the email to the recipient. Can I disable the email?

末鹿安然 提交于 2019-12-11 13:06:51
问题 Code A and B do the same things but in case A when add a viewer, the command addViewer don't send the email to currentUser. Instead, in the case B when add a viewer the currentUser receive an email of file sharing. //CASE A var f = DocsList.getFolderById(folder.getId()); f.addViewer(currentUser); //CASE B var f = DriveApp.getFolderById(folder.getId()); f.addViewer(currentUser); I would like to share wihouth automatic email because at the end of procedure I'll send a custom email (with the

cURL download file issues

牧云@^-^@ 提交于 2019-12-11 11:17:58
问题 I am trying to download a file from Google drive, but when I play the script, it gives me following error: Moved Temporarily The document has moved here. My code is given below: $source = "https://docs.google.com/uc?id=0B8tmy5YxFFGhM0szSUZWVl9qQWc&export=download"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $source); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 2); curl_setopt($ch, CURLOPT_SSLVERSION,3); echo $data = curl_exec($ch); echo $error = curl_error($ch); //print_r($ch);

Remove a shared link to a google resource

醉酒当歌 提交于 2019-12-11 11:09:21
问题 As a followup to this how can I remove access to a document when I have established a shared link? I would have assumed it was something like this (where I set the role to 'none') but that doesn't work: POST /feeds/default/private/full/<resource_id>/acl GData-Version: 3.0 Authorization: OAuth <access_token> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:gAcl='http://schemas.google.com/acl/2007'> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/acl

How to get multiple headers/footers in a document with Google Apps Script

笑着哭i 提交于 2019-12-11 10:39:52
问题 Im trying to replace a text in a Google Document header which has "Different first page Header/Footer" active. I succesfully replace text in any other page header except on first page. ... var something = "Some string."; var copyId = DriveApp.getFileById(docTemplate).makeCopy(name).getId(); var copyDoc = DocumentApp.openById(copyId); var copyHeader = copyDoc.getHeader(); copyHeader.replaceText('keySomething', something); ... I looked at the documentation but didn't see how to do it. I even

Images disappear after uploading a doc with conversion

巧了我就是萌 提交于 2019-12-11 08:49:30
问题 When using the 'insert' DRIVE API function, in combination with the multi-part type. The images that are in my document appear to be stripped? It's just normal HTML with a img tag. Some 2 weeks ago it worked fine, but somehow it stopped working. I can provide sample HTML and the result GDocs file if needed. 来源: https://stackoverflow.com/questions/19224410/images-disappear-after-uploading-a-doc-with-conversion