BartoszJarocki / cv

Print-friendly, minimalist CV page
https://cv.jarocki.me
MIT License
8.79k stars 934 forks source link

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

Open co-bby opened 8 months ago

co-bby commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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!