Create new Google Slides by setting the page size. In the current stage, there are no methods for setting the page size for Google Slides in the existing Google Slides service and Slides API, although Slides API has the method of "presentations.create". This method achieves this.
const object = {
title: "sample title", // Title of created Slides.
parent: "###", // folder ID
width: { unit: "pixel", size: 200 },
height: { unit: "pixel", size: 300 },
};
const res = DocsServiceApp.createNewSlidesWithPageSize(object);
console.log(res);- In this method, the presentation ID of created Slides is returned.
- "pixel" and "point" can be used for
unitin above object.
When this method is used, the following application can be created.
- Inserting Text on Image using Google Apps Script : This is a sample script for inserting a text on an image using Google Apps Script.