Skip to content

docs write --pageless: also widen pageSize.width (or add --page-width flag) #629

Description

@sebsnyk

Problem

gog docs write --replace --markdown --pageless flips documentFormat.documentMode = PAGELESS correctly (thank you for #593) — but leaves documentStyle.pageSize.width at the default 612pt (US Letter). In pageless mode, content (especially tables) still respects pageSize.width as the content width, so tables render narrow on a wide screen.

Repro (v0.18.0)

gog docs write <docId> --replace --markdown --pageless --file=some-table-doc.md
gog docs raw <docId> | jq '.documentStyle | {pageSize, marginLeft, marginRight, documentFormat}'
# Output:
# {
#   "pageSize":     { "width":  { "magnitude": 612, "unit": "PT" }, "height": ... },
#   "marginLeft":   { "magnitude": 72, "unit": "PT" },
#   "marginRight":  { "magnitude": 72, "unit": "PT" },
#   "documentFormat": { "documentMode": "PAGELESS" }
# }

Effective content width = 612 − 72 − 72 = 468pt (≈6.5″) even though the doc is pageless.

Proposed fix

Either:

  1. Default to wider pageSize when --pageless is set — e.g. 1080pt × 792pt with 36pt L/R margins. Matches what Google Docs UI does when a user creates a fresh pageless doc.
  2. Add --page-width=<PT> and --margin-lr=<PT> flags on docs write and docs page-layout — explicit control. See companion issue for margins.

Workaround today

Follow --pageless with a Docs API updateDocumentStyle batchUpdate to widen pageSize.width.

v0.18.0 verified

  • gog docs write --replace --markdown --pageless does not widen.
  • gog docs page-layout --layout=pageless does not widen either.

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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions