Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print in the command menu renders the PDF different from using window.print() in the console or Ctrl + P #5

Open
co-bby opened this issue Dec 27, 2023 · 4 comments

Comments

@co-bby
Copy link

co-bby commented Dec 27, 2023

This is what I get when I use the print in the command menu
Screenshot 2023-12-26 222004

when I use window.print() in the console or ctrl + p.(I'm on windows and I'm using chrome)
Screenshot 2023-12-26 222030

Suggestion: Instead of the Print command in the command menu why don't you tell the user to use ctrl + p.

@BartoszJarocki
Copy link
Owner

this is interesting. what command menu does is calling window.print() which is essentially cmd + p. can you share more about your setup, what browser you're using etc?

@co-bby
Copy link
Author

co-bby commented Dec 27, 2023

I tested it in Chromium browsers (Edge and Google chrome) on windows. I also found it interesting after I tried solving it. That is why I suggested instead of implementing windows.print() in the code just tell the user to use ctrl+P. on Firefox the problem exists in both windows.print() and ctrl+p

@lunarcontrol
Copy link

I believe you can remove the page break by commenting out this line in the global css file /src/app/globals.css

.print-force-new-page {
/* page-break-before: always; */
}

@co-bby
Copy link
Author

co-bby commented Dec 28, 2023

I believe you can remove the page break by commenting out this line in the global css file /src/app/globals.css

.print-force-new-page { /* page-break-before: always; */ }

this seems to fix the issue. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants