Skip to content

Conversation

@copilot-developer-agent-robch
Copy link

@copilot-developer-agent-robch copilot-developer-agent-robch bot commented Feb 21, 2025

This PR adds support for exporting markdown files to PDF, DOCX and PPTX formats using a new export command.

Key changes:

  • Added IMarkdownExporter interface and implementations for each format
  • PDF export uses Markdig + Puppeteer to render HTML and generate PDFs with nice styling
  • DOCX export uses OpenXML to create Word documents
  • PPTX export uses OpenXML with automatic slide generation per content block
  • Added export command with format and output path options:
mdx export --format pdf|docx|pptx --output output.{pdf|docx|pptx} input1.md input2.md ...

When multiple input files are provided, they are combined in sequence separated by double newlines.

Added new dependencies:

  • Markdig for markdown to HTML conversion
  • PuppeteerSharp for HTML to PDF conversion

Full test coverage added for both the command handling and format-specific exporters.

Fixes #6.

@copilot-developer-agent-robch copilot-developer-agent-robch bot changed the title [WIP] mdx -- consider adding output to pdf or docx or pptx abilities Add MD to PDF/DOCX/PPTX export functionality Feb 21, 2025
@copilot-developer-agent-robch copilot-developer-agent-robch bot marked this pull request as ready for review February 21, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mdx -- consider adding output to pdf or docx or pptx abilities

1 participant