Expand description
Read-only structured export of PPTX content: slides in deck order, each with its shape tree,
text stories, tables and placeholders for content the export cannot represent, every record
carrying the location it was read from, plus diagnostics for everything omitted.
render_pptx_markdown renders the same content as Markdown.
One walker reads every source: a live session (DeckSession::export_structured) and PPTX
bytes (export_pptx_structured), which open a private session first.
Reading order is the current shape tree, depth first: slides in deck order, shapes in their tree order, a group’s descendants at the group’s position, and table cells row by row. It is the authored order, not a visual or accessibility reading order inferred from geometry.
Structs§
- Cell
Position - Export
Comment - Export
Diagnostic - Export
Failure - Why an export was refused, as data.
targetis the anchor the refusal concerns, if any. - Export
Link - A click hyperlink: an external URL, or the internal part it jumps to.
- Export
Notes - A slide’s speaker notes, as plain text.
- Export
Object - A placeholder for content the export does not represent; its data is never included.
- Export
Paragraph - Export
Placeholder - Export
Read - Content read from a session together with the version it was read at.
- Export
Refusal - A session export refusal; the deck is at
version. - Export
Run - A run of one kind and formatting. Line breaks are one
\nunit and fields cover their cached result; an unsupported inline is zero-width. - Export
Shape - A shape, group or unrepresented shape-tree element, with its stories, table, placeholder object and children.
- Export
Slide - Export
Story - One text story;
anchorspans all of it. - Export
Table - A table on its grid. Every source cell appears once;
mergedmarks a continuation covered by the cell atmerge_origin, whose content PowerPoint does not show. - Export
Table Cell - Export
Table Row - Included
Content - The optional content an export was asked to include.
- Markdown
Anchor - Pptx
Export Options - What to export. Hidden slides and shapes, notes and comments are excluded unless requested; formatting is included unless turned off.
- Pptx
Markdown Content - Markdown rendered from structured content. Each
<!-- pptx-export:N -->marker precedes the recordanchorsmaps it to. Markdown keeps no slide layout, geometry or typography. - Pptx
Markdown Options - Pptx
Structured Content - A structured export. Ids are deterministic export-tree paths, not document identities.
- Source
Provenance - The retained source XML a record was seeded from.
pathholds element-child ordinals from the part’s root;sld_idis the owning slide’sp:sldId/@idandsource_ida shape’scNvPr/@id. - Text
Span - A half-open range of UTF-16 offsets.
Enums§
- Anchor
Scope - Whether anchors resolve against a live session version or only against the returned snapshot.
- Export
Diagnostic Code - Export
Error - Why a bytes export produced nothing.
- Export
Failure Code - Why an export was refused: options out of range (
InvalidOptions), above a hard maximum (LimitExceeded), or structured content handed to the renderer that contradicts itself (InvalidContent). Unsupported deck content is diagnosed, never refused. - Export
List - Export
Mark - Export
Object Kind - Export
RunKind - Export
Severity - Export
Shape Kind - Pptx
Anchor - Where a record was read from.
rangeanchors areTextTarget::Rangebatch targets in the story offsets ofDeckSession::read_content;notesandcommentranges index the plain text they carry;sourcePartaddresses retained XML by element-child ordinals from the part’s root. - Reading
Order - The order records are exported in; see the module documentation.
Constants§
- DEFAULT_
MAX_ BLOCKS - Blocks an export returns when the options name no limit.
- DEFAULT_
MAX_ BYTES - Serialized bytes an export or rendering returns when the options name no limit.
- MAX_
BLOCKS_ LIMIT - The largest block limit an export accepts.
- MAX_
BYTES_ LIMIT - The largest byte limit an export or rendering accepts.
- MIN_
BYTES_ LIMIT - The smallest byte limit an export or rendering accepts: room for the envelope and one truncation diagnostic.
- SCHEMA_
VERSION - The only structured-content schema version this crate reads and writes.
Functions§
- export_
outcome_ json - JSON of a session export:
{"ok":true,"version","content"}or{"ok":false,"version","failure"}. - export_
pptx_ markdown export_pptx_structuredrendered as Markdown.- export_
pptx_ structured - Exports PPTX bytes as a snapshot: anchors address the returned content only.
- render_
pptx_ markdown - Renders
contentas Markdown withinoptions.max_bytes, stopping at a block boundary. - snapshot_
outcome_ json - JSON of a bytes export or rendering:
{"ok":true,"content"}or{"ok":false,"failure"}.Erris the message for input that is not a readable PPTX.
Type Aliases§
- Pptx
Export Result - A session export: the content with its version, or a refusal.