Skip to content

Conversation

@peter-gy
Copy link
Contributor

@peter-gy peter-gy commented Jan 27, 2026

📝 Summary

Adds marimo export pdf [OPTIONS] NAME [ARGS]... to CLI with options for output inclusion, webpdf / latex rendering mode, file watching and sandboxed notebook execution.

Closes #896, closes #3415.

🔍 Description of Changes

🔍 Description of Changes

  • Reused the existing nbformat & nbconvert PDF export pipeline.
  • Added support for --include-outputs/--no-include-outputs, --webpdf, --watch, and --sandbox for DX
  • Introduced watch_and_export_bytes (kept separate from watch_and_export to avoid complicating the existing text export helper with bytes/stdout/encoding concerns).
  • Added a thin smoke test (test_export_pdf_missing_dependencies) to ensure missing deps produce a helpful error.
  • Purposefully no e2e PDF generation test here to avoid heavy system deps (Chromium / TeX / Pandoc)
    • plan is to cover that in marimo-team/marimo-integration-ci

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Tests have been added for the changes made.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Pull request title is a good summary of the changes - it will be used in the release notes.

@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jan 27, 2026 3:54pm

Request Review

asyncio_run(start())


def watch_and_export_bytes(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might be able to kill watch_and_export and consolidate to one function (and use bytes. it looks like nothing may use ExportResult.download_filename

we can do this in a followup though if you prefer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to do it in a followup.

@mscolnick mscolnick merged commit 50428cf into marimo-team:main Jan 27, 2026
51 of 56 checks passed
@peter-gy peter-gy deleted the ptr/pdf-export branch January 27, 2026 16:26
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.7-dev18

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.

pdf output with code Export Marimo notebook to PDF

2 participants