Skip to content

Releases: nilskruthoff/pptx-parser

v2.0.0

Choose a tag to compare

@nilskruthoff nilskruthoff released this 30 Oct 21:05
c0245dc

Highlights

This release fixes five security advisories in the zip dependency and removes third-party error types from the public API, so future dependency upgrades no longer require a new major version.

Security

Upgraded zip from 8.6.0 to 9.0.5, which fixes the following advisories:

pptx-to-md only reads archives and never extracts them, so the practical risk was low. Upgrading still removes the advisory alerts for every project that depends on this crate.

Breaking changes

  • Error::Zip now wraps the new opaque pptx_to_md::ZipError instead of zip::result::ZipError. Error no longer implements From<zip::result::ZipError>.
  • The source field of Error::Xml is now the new opaque pptx_to_md::XmlError instead of quick_xml::Error.

Both errors still provide their message through Display, and the underlying error remains available through std::error::Error::source.

Migration

Most users do not need to change anything. Code that matched on the concrete zip or quick-xml error types should use the error message or source() instead:

match error {
    pptx_to_md::Error::Zip(zip_error) => eprintln!("Could not read the package: {zip_error}"),
    pptx_to_md::Error::Xml { part, source } => eprintln!("Invalid XML in {part}: {source}"),
    other => eprintln!("{other}"),
}

Other changes

  • zip now only enables deflate compression, which is the only compression method used by PPTX and ODP files. This drops the dependencies for AES, bzip2, LZMA, PPMd, Zstandard, and Deflate64.
  • Fixed broken intra-doc links and malformed code blocks in the API documentation, including the PptxContainer::load_slide example.

Thanks

Thanks to @SommerEngineering for reporting the advisories and contributing the zip upgrade in #49.

Full changelog: 1.0.0...2.0.0

v1.0.0

Choose a tag to compare

@nilskruthoff nilskruthoff released this 17 Jul 21:16
1a11674

pptx-to-md v1.0.0

Version 1.0.0 introduces a new semantic parsing pipeline for PPTX and ODP
presentations. XML is now processed with event-driven pull parsers and mapped to
a shared document model before Markdown is generated.

This release significantly improves the preservation of presentation structure:
titles and headings are recognized, paragraph boundaries remain intact, mixed
list content is handled correctly, merged table cells are retained, images carry
alternative text, and multi-column slides can use a spatial reading order.

Highlights

  • Shared semantic model: Inspect presentations as metadata, slides, and
    positioned text, table, image, or unsupported-content blocks.
  • PPTX and ODP parity: Both formats now use the same semantic Markdown
    rendering path.
  • More accurate lists: Nested levels, ordered-list start values, inherited
    bullets, and explicit list removal are preserved.
  • Better tables: Standard tables use GFM Markdown; merged cells use HTML to
    preserve row and column spans.
  • Richer formatting: Added strikethrough, superscript, subscript, fields, and
    hard line breaks.
  • Better image output: Images use standard Markdown syntax, alternative text,
    and detected MIME types.
  • Configurable reading order: Choose spatial ordering or original source
    ordering per slide.
  • Actionable diagnostics: Missing resources and unsupported structures are
    reported without discarding the whole slide.

New structured API

Use PresentationContainer::parse_document() to access the semantic model:

let document = container.parse_document()?;

for slide in document.slides {
    println!("{} blocks", slide.blocks.len());
}

Use Slide::to_markdown(&MarkdownOptions) when the default Markdown behavior
needs to be customized.

Breaking Changes

  • Slide::convert_to_md() now returns a Result<String>:
// v0.5.x
let markdown = slide.convert_to_md().unwrap_or_default();

// v1.0.0
let markdown = slide.convert_to_md()?;
  • Applications that construct Slide, Formatting, or table-cell values with
    public struct literals must add the new fields. Prefer the supplied constructors,
    builders, or Default where possible.

  • Existing presentation containers, streaming iteration, parse_all(), and the
    PPTX-specific PptxContainer remain available. Slide::elements is retained as
    a transitional compatibility view, while new integrations should use
    Slide::blocks.

Known limitations

Charts and SmartArt currently expose fallback text and diagnostics rather than a
complete structured representation. Spatial ordering remains heuristic for
overlapping or unusually free-form layouts, and OCR is outside the scope of this
release.

v0.5.1

Choose a tag to compare

@nilskruthoff nilskruthoff released this 14 Jul 14:06
7aeccd3

pptx-to-md v0.5.1

  • Migrated the crate to Rust edition 2024
  • updated dependencies to newest versions

v0.5.0

Choose a tag to compare

@nilskruthoff nilskruthoff released this 14 Jul 12:59
1ffa3ab

pptx-to-md v0.5.0

This release adds .odp support and improves Markdown conversion quality, metadata handling, and slide positioning.

Highlights

  • Added .odp support via PresentationContainer, including automatic format detection.
  • Added presentation metadata extraction and optional metadata rendering.
  • Added hyperlink extraction and Markdown rendering for text runs.
  • Added optional speaker notes and slide comments in Markdown output.
  • Added context-aware Markdown escaping for text, lists, and tables.
  • Improved placeholder positioning by resolving slide layout and master-slide relationships.
  • Reorganized the test suite into unit and integration tests with dedicated fixtures.

Breaking changes

  • ParserConfig::include_slide_comment was renamed to include_slide_number_as_comment.
  • ParserConfig, Run, and Slide gained new public fields; struct-literal construction must be updated.
  • Slide::new now accepts speaker notes and comments.
  • PptxContainer::get_full_image_path was removed. Use PptxContainer::resolve_target_path instead.

Upgrade notes

Update usages of include_slide_comment to include_slide_number_as_comment. If you construct public structs directly, add the newly required fields or prefer the provided builder APIs where available.

Available on crates.io

v0.4.0

Choose a tag to compare

@nilskruthoff nilskruthoff released this 01 Jul 15:10
d79a384

v0.3.0

Choose a tag to compare

@nilskruthoff nilskruthoff released this 16 Jun 19:13
699d870

v0.2.0

Choose a tag to compare

@nilskruthoff nilskruthoff released this 15 Jun 01:57
f73c065