Skip to content

Print: choose paper size and orientation for notes and handouts - #499

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:print-paper-orientation
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:print-paper-orientation

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Summary

  • The Print page (File › Print) gets paper (Letter, A4, Legal, A3) and orientation (Portrait/Landscape) pickers, as PowerPoint has; until now notes pages and handouts were always portrait US Letter. They apply to notes and handouts; full-page slides still print slide-shaped, so the pickers are disabled for that layout.
  • The preview draws the chosen page shape.
  • file.export (pdf), app.print and the MCP export tool accept paper: letter|a4|legal|a3 and orientation: portrait|landscape; unknown values are an error instead of a silent fallback.
  • Notes pages keep the slide within the top half of the page, so landscape paper still leaves room for the notes.
  • The paper table lives in deckcraft-pdf (PAPERS, paper_size) and the engine re-exports it for the UI, so the layer rules hold.

Part of ROADMAP Upcoming item 4 (Output: printing). Doesn't touch the rasterising path that #245 (vector PDF) changes.

Test plan

  • cargo xtask ci (fmt, clippy, test, assets, layers, wasm)
  • New deckcraft-pdf test: every paper in both orientations gives that MediaBox for notes and handouts, and every slide box stays on the page
  • New engine test: pdf_options defaults to Letter portrait, takes A4 landscape and Legal, and rejects unknown paper or orientation
  • Backstage test: print_params carries paper/orientation; the preview page size follows them, except for full-page slides
  • MCP schema test lists paper and orientation and exports with them
  • deckcraft-cli run --sample --cmd 'file.export={…"layout":"notes","paper":"a4","orientation":"landscape"}' writes MediaBox[0 0 841.89 595.28] pages
  • Not checked: how the Print page looks on screen. The box can't run the app's display (libxkbcommon-x11 isn't installed)

The Print page always laid notes pages and handouts out on portrait US
Letter. It now offers Letter, A4, Legal and A3 in portrait or landscape,
as PowerPoint's Print settings do, and the preview shows the chosen
page. file.export, app.print and the MCP export tool take the same
`paper` and `orientation` params; unknown values are an error. A notes
page keeps its slide within the top half of the page, so landscape
paper still leaves room for the notes. Full-page slides still print on
slide-shaped pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 06a6b10 into storytold:main Oct 14, 2026
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

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.

3 participants