首页 > 解决方案 > 创建带页脚的谷歌文档

问题描述

我正在尝试使用页脚创建谷歌文档。但作为回应,我只有身体

这是我的带有页脚和标题的代码

gapi.client.docs.documents.create({
      "title": "Test document creating",
      "footers": {
        "footer.qwe": {
          "footerId": "footer.qwe",
          "content": [
            {
              "endIndex": 2,
              "paragraph": {
                "elements": [
                  {
                    "endIndex": 2,
                    "textRun": {
                      "content": "test\n",
                      "textStyle": {}
                    }
                  }
                ],
                "paragraphStyle": {
                  "namedStyleType": "NORMAL_TEXT",
                  "direction": "LEFT_TO_RIGHT"
                }
              }
            }
          ]
        }
      }
    })

作为回应,只有空的正文,没有任何页脚元素

标签: javascriptgoogle-docs-api

解决方案


推荐阅读