Skip to content

docs: --page-size=A4|Letter|... named-size shortcut for write/page-layout #640

@sebsnyk

Description

@sebsnyk

Summary

v0.19 added --page-width / --page-height on gog docs write and gog docs page-layout (closes #629). Setting A4 today requires the explicit numbers:

gog docs write <id> --page-width=595.275pt --page-height=841.89pt --margin-left=36pt --margin-right=36pt --margin-top=36pt --margin-bottom=36pt

Would be more ergonomic to accept named sizes:

gog docs write <id> --page-size=A4
gog docs page-layout <id> --page-size=Letter

Suggested set

Common print sizes the CLI could map to PT:

Name Width (pt) Height (pt) Notes
A4 595.275 841.890 ISO 216
A5 419.528 595.275 ISO 216
Letter 612 792 US 8.5×11 in
Legal 612 1008 US 8.5×14 in
Tabloid 792 1224 US 11×17 in

Behaviour: --page-size=<name> sets both width and height in one go; mutually exclusive with --page-width / --page-height (or, if both passed, explicit dims override the named preset).

Why

  • Removes the magic-number footgun (841.890 is easy to mistype)
  • Matches how customers actually think about page layouts ("A4" vs "841.89pt")
  • Trivial to add — internal lookup table, no API change needed

Workaround

Pass explicit --page-width=595.275pt --page-height=841.89pt until shipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions