question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug Report] Broken columns when printing a page with Chrome/Puppeteer

See original GitHub issue

Environment

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:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
KaelWDcommented, Jan 6, 2021

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.

1reaction
KaelWDcommented, Jan 4, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found