[Bug Report] Broken columns when printing a page with Chrome/Puppeteer
See original GitHub issueEnvironment
Vuetify Version: 2.4.0 Vue Version: 2.6.12 Browsers: Chrome 87.0.4280.88 OS: Linux x86_64
Steps to reproduce
- Launch the app locally or use “Debug mode” in Codepen
- Print the page with Chromium/Puppeteer
- The 8+4 column width is broken and, instead, a 12+12 width is displayed
Expected Behavior
The printed columns should keep the 8-4 width, just like when displayed in the browser.
Actual Behavior
The printed columns use a 12+12 width (one is displayed above the other with full width).
Reproduction Link
https://codepen.io/PequeX/pen/LYReqXM
Other comments
Code to reproduce with Puppeteer in case a copy of Chromium is not available:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(
'http://localhost:8081/#/',
{ waitUntil: 'networkidle2' },
);
await page.emulateMediaType('print');
await page.pdf({ path: 'output.pdf', format: 'A4', printBackground: true});
await browser.close();
})();
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
99124 - Printed table content does not respect page-break ...
This is really a ridiculous bug. A lot of people need to print data tables. Chrome devs are playing around implementing WebGL and...
Read more >Puppeteer | Protocol error (Page.printToPDF): Printing failed
I use jsreport-core in my node project to generate PDF or XLSX files, to generate PDF I use the library jsreport-chrome-pdf that use ......
Read more >What's New In DevTools (Chrome 107)
Go to Settings > Shortcuts, hover over a command and click the Edit button (pen icon) to customize the keyboard shortcut. You can...
Read more >page-break-inside - CSS: Cascading Style Sheets | MDN
The page-break-inside CSS property adjusts page breaks inside the ... width: 200px; columns: 1; column-width: 100px; } .list, ol, ul, ...
Read more >Enhance print-to-pdf in headless mode to support all Page ...
Currently, Mbox Viewer relies on the standard Google Chrome Browser to print mails to PDF files via command line option --print-to-pdf.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this should be regarded as browser quirks, if you want a consistent print layout it’s probably a good idea to write your own stylesheet with
@media print
instead of relying on px breakpoints.Viewport affects
$vuetify.breakpoint
, but css breakpoints are based on paper size. It is pretty inconsistent though, toggling between A4 and A3 will randomly render as 12+12, 8+8, or 8+4.