metabase / metabase/metabase

PDF exports: author controlled pagination

Open
#82,166 3 comments 0 reactions 0 assignees View on GitHub
.Needs Triage .Team/UXWest Priority:P2 Type:New Feature
Dominant language
Clojure
Stars
49.3k
Forks
6.8k
Avg merge
1d 13h
Merged PRs (30d)
653

Description

**What problem will this feature request solve?**
In PDFs attached to dashboard subscriptions, pages fill top to bottom in dashboard order, and a new page starts whenever the next card does not fit. As a consequence:
- There is no way to start a section on a fresh page.
- It is not possible to keep headers and content together: a **Heading** card can be stranded at the bottom of a page, with the card it introduces starting the next one.

To work around this, authors resort to tuning card heights and order until the breaks happen to land right, but any later edit silently re-flow the document.

**Describe the solution you'd like.**
Author-controlled pagination, set on the dashboard. Several options:

1. Keep headings with the card below them. A heading should never be the last thing on a page.
The minimal version needs no UI: move a heading and the card below it to the next page together.

2. Explicit page break: a page-break card in the dashboard grid.

3. A per-card "start a new page before this card" option.

4. A per-card "keep with next" option un the UI to keep content together. A generalization of option 3.

Both are dashboard layout settings, so both the subscription/API PDF and the browser based rendering should honour them.

**How does this feature request impact you?**
Requested by enterprise customer.
The automatic heading rule alone would remove the most visible defect in their exports.

**Additional information**
**Prior art**: [#39218](https://github.com/metabase/metabase/issues/39218), closed, asked for the PDF to be divided into pages at all. This is the next step: control over where. Nothing else found for heading-with-card, keep-with-next, or author-declared breaks.

**Related**: [#61256](https://github.com/metabase/metabase/issues/61256) long tables spanning pages; [#80928](https://github.com/metabase/metabase/issues/80928) browser and server PDF outputs diverging; [#81164](https://github.com/metabase/metabase/issues/81164) PDF-grade layout in the subscription email body.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing related issues #39218, #61256, #80928, and #81164, then trace how dashboard layout settings reach subscription/API PDF and browser-based rendering. Define the chosen pagination behavior and verify that the relevant outputs honor it consistently, including the automatic heading rule or any author-controlled break option selected for implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.