Skip to content

Feature: expose pageless / page-setup toggle on docs #593

Description

@sebsnyk

What

Add a way to set the page layout of a Google Doc — specifically the pageless flag — via the gog CLI.

Why

Google Docs supports two layouts: the classic paged view and the newer pageless view (File → Page setup → Pageless). Pageless is preferable for content where rich tables, wide code blocks, and long-form prose would otherwise break across page boundaries — which describes most agent-generated docs.

The Docs API supports this via documents.batchUpdate with updateDocumentStyle:

{
  "requests": [{
    "updateDocumentStyle": {
      "documentStyle": { "flipPageOrientation": false, "pageless": true },
      "fields": "pageless"
    }
  }]
}

There's no current gog command that exposes this. Today the only path is the UI (File → Page setup), which means a docs-create + write pipeline can't end in the layout the author actually wants.

Suggested shape

gog docs set-page-layout <docId> --layout=pageless    # or paged
# or as a flag on create:
gog docs create "My Doc" --file=in.md --markdown --pageless

Either form is fine — flag-on-create is the more useful place since most automated pipelines set the layout once at creation time.

Scope

  • updateDocumentStyle for pageless is the single load-bearing field.
  • Other documentStyle fields (margins, page size, background colour) are nice-to-have but not driving this request.

Context

Filed alongside #592 (table-insert bug). For agent-driven doc creation, pageless is the layout that actually renders multi-tab + table-heavy specs cleanly — paged is the wrong default for that use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions