使用演讲者备注
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本指南介绍了如何使用 Google Slides API 读取和修改演讲者备注。
备注页和备注母版
备注页是一种用于为演示文稿中的幻灯片生成讲义的页面。每张幻灯片都有一张备注页。幻灯片备注页上的第一个 BODY
占位形状包含幻灯片演讲者备注的文本。在 Slides API 中,只有此备注形状的文本内容可修改。其其他属性和笔记页面的其余内容都是只读的。
演示文稿的备注母版是一个页面,用于定义备注页上使用的默认元素和文本样式。一个演示文稿只能有一个备注母版。在 Slides API 中,备注母版是只读的。
读取和写入演讲者备注
如需查找幻灯片的演讲者备注形状,请在其 SlideProperties
消息中查找幻灯片的备注 presentations.pages
对象。包含演讲者备注文本的形状由备注页面的 NotesProperties
消息中的 speakerNotesObjectId
字段标识。
如需读取幻灯片的演讲者备注,请在备注页面上找到具有此 ID 的对象,然后读取其 text。在极少数情况下,此对象可能不存在,这意味着幻灯片没有演讲者备注。
您可以使用 batchUpdate
文本请求来修改演讲者备注形状内的文本。在极少数情况下,如果演讲者备注形状不存在,Slides API 会在收到使用 speakerNotesObjectId
的有效文本操作时自动创建该形状。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["# Work with speaker notes\n\nThis guide explains how to read and edit speaker notes using the Google Slides API.\n\nNotes pages and notes masters\n-----------------------------\n\nA notes page is a kind of page used for generating handouts for slides in a\npresentation. Each slide has one notes page. The first `BODY` placeholder shape\non a slide's notes page contains the text of a slide's speaker notes. Only the\ntext content of this notes shape is editable in Slides API. Its other\nproperties and the rest of the notes page contents are read-only.\n\nThe presentation's notes master is a page that defines the default elements and\ntext styles used on notes pages. A presentation only has one notes master. Notes\nmasters are read-only in the Slides API.\n\nRead and write speaker notes\n----------------------------\n\nTo find a slide's speaker note shape, find the slide's notes\n[`presentations.pages`](/workspace/slides/api/reference/rest/v1/presentations.pages)\nobject in its\n[`SlideProperties`](/workspace/slides/api/reference/rest/v1/presentations.pages#slideproperties)\nmessage. The shape containing the speaker notes text is identified by the\n`speakerNotesObjectId` field in the notes page's\n[`NotesProperties`](/workspace/slides/api/reference/rest/v1/presentations.pages#notesproperties)\nmessage.\n\nTo read a slide's speaker notes, find an object with this ID on the notes page\nand read its [text](/workspace/slides/api/concepts/text). In rare cases, this\nobject might not exist which means the slides have no speaker notes.\n\nYou can use [`batchUpdate`](/workspace/slides/api/guides/styling) text requests\nto modify the text inside the speaker notes shape. In the rare case where the\nspeaker notes shape doesn't exist, the Slides API creates it\nautomatically when it receives a valid text operation using a\n`speakerNotesObjectId`."]]