使用演讲者备注
本指南介绍了如何使用 Google 幻灯片 API 读取和修改演讲者备注。
记事页面和记事母版
备注页是一种用于为演示文稿中的幻灯片生成手册的页面。每个幻灯片都有一个备注页。幻灯片备注页上的第一个 BODY
占位符形状包含幻灯片演讲者备注的文本。在 Slides API 中,只有此备注形状的文本内容可修改。其其他属性和记事页面内容的其余部分均为只读。
演示文稿的备注母版是一个页面,用于定义备注页上使用的默认元素和文本样式。一个演示文稿只有一个备注母版。在 Google 幻灯片 API 中,备注母版是只读的。
读取和写入演讲者备注
如需查找幻灯片的演讲者备注形状,请在其 SlideProperties
消息中查找幻灯片的备注 presentations.pages
对象。包含演讲者备注文本的形状由记事页面 NotesProperties
消息中的 speakerNotesObjectId
字段标识。
如需阅读幻灯片的演示文稿,请在“备注”页面上找到具有此 ID 的对象,然后阅读其文本。在极少数情况下,此对象可能不存在,这意味着幻灯片没有演讲者备注。
您可以使用 batchUpdate
文本请求修改讲者备注形状中的文本。在极少数情况下,如果不存在演讲者备注形状,当 Slides API 收到使用 speakerNotesObjectId
的有效文本操作时,会自动创建该形状。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-14。
[null,null,["最后更新时间 (UTC):2025-02-14。"],[[["This page explains how to utilize the Slides API to view and modify speaker notes associated with presentation slides."],["Each slide's speaker notes are stored within a designated shape on its corresponding notes page, accessible via the `speakerNotesObjectId`."],["You can read speaker notes by locating the shape with the `speakerNotesObjectId` and accessing its text content."],["Modifying speaker notes involves using text batchUpdate requests to edit the text within the identified speaker notes shape."],["If a speaker notes shape is missing, the Slides API will automatically generate one upon receiving a valid text operation using the `speakerNotesObjectId`."]]],[]]