diff --git a/README.md b/README.md index 3c2a0113e..2b3927707 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Join us on Slack: [https://gridstackjs.slack.com](https://join.slack.com/t/grids - [Custom columns CSS (OLD, not needed with v12+)](#custom-columns-css-old-not-needed-with-v12) - [Override resizable/draggable options](#override-resizabledraggable-options) - [Touch devices support](#touch-devices-support) + - [Printing Support](#printing-support) - [Migrating](#migrating) - [Migrating to v0.6](#migrating-to-v06) - [Migrating to v1](#migrating-to-v1) @@ -301,6 +302,15 @@ GridStack.init(options); See [example](http://gridstack.github.io/gridstack.js/demo/mobile.html). +## Printing Support + +GridStack v13.1+ introduces native printing support with two distinct layout modes to handle the complexities of browser print engines (like Chrome's Flexbox/Grid pagination bug). + +- **Flow Mode (Default):** Items auto-size their height and flow naturally across pages without slicing. Best for dashboards with tall widgets that span multiple pages. +- **Exact Mode (`printMode: 'exact'`):** Uses CSS Grid to perfectly respect visual coordinates and dimensions, but may slice tall items or push entire rows to the next page. Best for single-page dashboards. + +See [print_README.md](./print_README.md) for full details, examples, and how to use widget `PrintOptions` (like `pageBreak` and `orientation`). + # Migrating ## Migrating to v0.6 diff --git a/demo/index.html b/demo/index.html index 9dba41ac2..52006f391 100644 --- a/demo/index.html +++ b/demo/index.html @@ -22,7 +22,8 @@
- New v13.1+ printing support and widget PrintOptions to control how items are printed.
+ Default v13.1+ Print Behavior (Flow Mode), 6 column. Notice how large items span across multiple printed pages automatically without being sliced.
+ Drawback: Cannot force exact layout, and manual page breaks/orientations may not work well.
Notice how large items span across multiple printed pages automatically, but layout same.