google-slides-api

Google script replaceAllShapesWithImage with image from drive doesn"t work any more

有些话、适合烂在心里 提交于 2020-03-10 04:35:10
问题 Since yesterday one of my google script doesn't work anymore. The script take an image on the drive copie a slide replace a shape with an image But I got this error: "The provided image is in an unsupported format." -> I give all access to the image: it doesn't change anything -> The script work if I take an url outside the drive Any idea function test_image(){ var imageUrls = DriveApp.getFilesByName("DSC_3632.png"); var file = "undefined"; while ( imageUrls.hasNext()) { var file = imageUrls

Image from Google Drive to Google Slides via DriveApp.getFileById

倾然丶 夕夏残阳落幕 提交于 2020-02-21 13:42:05
问题 I want to import an image to Google Slides over Google Apps Script after the instruction Google Developers - How to... function createImage(presentationId) { // Add a new image to the presentation page. The image is assumed to exist in // the user's Drive, and have 'imageFileId' as its file ID. var requests = []; var pageId = 'g1fe0c....'; var imageId = 'MyImage_01'; var imageUrl = DriveApp.getFileById('0B6cQESmLJfX...').getUrl(); var emu4M = { magnitude: 4000000, unit: 'EMU' }; requests.push

How can we fill linear gradient color in google slide by api?

故事扮演 提交于 2020-01-30 11:01:47
问题 Below example of normal fill color. $requests[] = new \Google_Service_Slides_Request(array( 'updateShapeProperties' => array( 'objectId' => "elementID", 'fields' => "shapeBackgroundFill.solidFill.color", 'shapeProperties' => array( 'shapeBackgroundFill' => array( 'solidFill' => array( 'color' => array( 'rgbColor' => array( 'red' => "RGBCODE_0", 'green' => "RGBCODE_1", 'blue' => "RGBCODE_2" ), ), ), ), ), ), ) ); I want to set color like below in google slide by GOOGLE API. background: linear

How can we fill linear gradient color in google slide by api?

╄→尐↘猪︶ㄣ 提交于 2020-01-30 11:00:07
问题 Below example of normal fill color. $requests[] = new \Google_Service_Slides_Request(array( 'updateShapeProperties' => array( 'objectId' => "elementID", 'fields' => "shapeBackgroundFill.solidFill.color", 'shapeProperties' => array( 'shapeBackgroundFill' => array( 'solidFill' => array( 'color' => array( 'rgbColor' => array( 'red' => "RGBCODE_0", 'green' => "RGBCODE_1", 'blue' => "RGBCODE_2" ), ), ), ), ), ), ) ); I want to set color like below in google slide by GOOGLE API. background: linear

How can we fill linear gradient color in google slide by api?

不想你离开。 提交于 2020-01-30 10:58:05
问题 Below example of normal fill color. $requests[] = new \Google_Service_Slides_Request(array( 'updateShapeProperties' => array( 'objectId' => "elementID", 'fields' => "shapeBackgroundFill.solidFill.color", 'shapeProperties' => array( 'shapeBackgroundFill' => array( 'solidFill' => array( 'color' => array( 'rgbColor' => array( 'red' => "RGBCODE_0", 'green' => "RGBCODE_1", 'blue' => "RGBCODE_2" ), ), ), ), ), ), ) ); I want to set color like below in google slide by GOOGLE API. background: linear

403 error with message “Google Slides API has not been used in project … before or it is disabled”

て烟熏妆下的殇ゞ 提交于 2020-01-05 07:18:07
问题 I am trying to generate Google Slides from Google Sheets; have used Sheets script with no issues, but when I try to include Google Slides, after authenticating and getting Oauth permissions prompt, I am getting this error that I cannot find any reference for; I have made sure Google Slides API and Drive API are enabled in the Developers Console. "Request failed for https://slides.googleapis.com/v1/presentations/... returned code 403. Truncated server response: { "error": { "code": 403,

Google Apps Script: How to create slides on Google Slides and fill the placeholders in it with information from an array?

妖精的绣舞 提交于 2020-01-05 05:30:08
问题 I have an array and am trying to use the information in it to create a Google Slides presentation. I would like some help and, if possible, also point me to some material that I could read to better understand the possible solutions to these problems. The array is as the following: var myArray = [[Project1,Status1,Info1],[Project2,Status2,Info2],...,[ProjectN,StatusN,InfoN]] Each element in the array refers to a different project and contains: the name of the project, the status of the

Is there a known way to update the page setup size In the Google Slides API?

旧城冷巷雨未停 提交于 2019-12-24 03:26:01
问题 I've been poking around in the Google Slides API documentation. I can only find a way to update the element sizes. What I want to do is update the page setup size to widescreen 16:10. I looked at this documentation and this but this just references page elements, not the slide its self. Is there any preferred or suggested way to go about doing this? 回答1: Those are links to the Google Apps Script Slides Service documentation (known as a built-in service). It gives you access to some features

Finding whether the slide is skipped or not using GAS

若如初见. 提交于 2019-12-24 00:39:06
问题 I want to check among the slides, whether a slide is skipped or not? I have referred the API as well as slide service buy I couldn't find a way to determine the skipped slide. How do I write a custom code slide.isSkipped() which will return true if skipped or false if not. 来源: https://stackoverflow.com/questions/47740005/finding-whether-the-slide-is-skipped-or-not-using-gas

Strategies to GoogleDrive API limit export download 10 mb

强颜欢笑 提交于 2019-12-23 19:18:10
问题 We've been developing a solution which is responsible for generating a PPT with a lot of images embedded and then downloading in the browser via Google Slides and Google Drive API. So, we discovered in the middle of the project that there's a limitation on the export of files from Google Drive API - currently at 10mb per file. Some PPT's are supposed to have thousand pics on them, so that's not ok for us. Here's a sample of the method used for exporting and downloading the PPT file. public