Repository navigation
Description
Summary
Binary Markdown 0.5.1 lets users choose an editor Width Mode (default, full, or custom), but PDF export has no equivalent page-width choice. PDF output is always A4 with 16 mm margins, and the Export panel and settings expose no PDF page-size or width option.
As a result, a user who selects a wide editor layout still gets a narrow A4 PDF. The only current workaround is to export HTML and print it manually with different paper settings.
This report does not claim a regression. The closed width-mode work explicitly scoped the preference to the visual editor and left export paper dimensions independent. This request is for a separate, explicit PDF page-width control.
Build identity and environment
- Binary Markdown 0.5.1
- Source commit:
f89edbcd4a64f7ca7ba1a4e98e3896581f571843 - VS Code 1.142.0, x64
- Windows 11, OS version 10.0.26300, x64
- PDF engine: Google Chrome 155.0.8059.80
- Local source changes: No
Reproduction, expected and actual behavior
- Open a saved Markdown document in Binary Markdown.
- Set
binary-markdown.editorWidthModetofull, or tocustomwith a widerbinary-markdown.editorMaxWidth. - Export the document to PDF.
- Inspect the PDF page size and review the Export panel and Binary Markdown settings.
Actual behavior: The PDF is always A4 with 16 mm margins. The editor Width Mode changes only the editing column. There is no PDF width mode, page-size preset, or custom width/height setting.
Expected behavior: Users can choose a PDF page width independently of the editor Width Mode, or explicitly opt in to matching the editor content width.
Proposed behavior
- Add PDF-specific page settings rather than silently applying the editor Width Mode to exports.
- Offer at least A4, Letter, and a custom width/height option. A3 or other presets would also be useful.
- Consider exposing page margins alongside the page width.
- If an editor-matching option is added, make it an explicit choice such as Match editor content width, with a documented CSS-pixel-to-page-unit conversion. Do not make it the implicit behavior.
- Capture the selected settings when an export job starts and report them with the result.
- Keep A4 with 16 mm margins as the default so existing output remains stable.
Acceptance criteria
- PDF export exposes a page-width or page-size choice in the Export panel or a documented setting.
- A custom width changes the generated PDF page dimensions and lets text, code, tables, and graphics reflow or scale within the chosen page.
- The default A4/16 mm output remains unchanged for users who do not opt in.
- Changing
binary-markdown.editorWidthModedoes not affect PDF output unless the user explicitly selects an editor-matching mode. - Settings are persisted, localized, and documented across the supported VS Code hosts.
- Pagination and oversized-content behavior are verified with the existing PDF export fixtures in Chrome, Edge, and Chromium.
Related work
- Add full-width and configurable maximum-width rendering #28 added full-width and custom-width rendering for the visual editor and intentionally left export paper dimensions independent.
- Standardize Markdown rendering and heading spacing with a CommonMark/GFM and Primer baseline #16 covers broader Markdown rendering and spacing work.
- The export contract currently treats paper size and margins as fixture/export defaults.
Alternatives considered
- Automatically reuse the editor Width Mode for PDF pages. This would make the output depend on a layout preference that is documented as editor-only, so an explicit PDF setting is preferable.
- Export HTML and print from a browser. This works today but does not provide an integrated PDF export workflow.
- Use a separate Markdown PDF extension. This avoids the limitation but does not improve Binary Markdown's own export experience.
Activity
skalitz-wolf commentedon Oct 17, 2026
Reporter follow-up: the issue was created without a label because this account does not have permission to apply repository labels. Please add �nhancement during triage if appropriate.