0

I am creating google slides with the help of javascript API. I need to set up the page size But its not working. Below is my code .

        var size = {
              width:{
                magnitude: 612,
                unit: "PT"
              },
             height: {
                magnitude: 792,
                unit: 'PT'
            }};

gapi.client.slides.presentations.create({
        title: "Some title",
        pageSize: size
        }).then((response) => {
     var presentationId = response.result.presentationId;

})

1 Answers1

0

Use this Method: presentations.create

Creates a new presentation using the title given in the request. Other fields in the request are ignored. Returns the created presentation.

Here is the request body:

{
  "presentationId": string,
  "pageSize": {
    object(Size)
  },
  "slides": [
    {
      object(Page)
    }
  ],
  "title": string,
  "masters": [
    {
      object(Page)
    }
  ],
  "layouts": [
    {
      object(Page)
    }
  ],
  "locale": string,
  "revisionId": string,
  "notesMaster": {
    object(Page)
  },
}

To check the description of pageSize, you can refer to the fields table. It was specified as the size of pages in the presentation.

Also, you may want to check this javascript Browser Quickstart to help you further.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65