kodeklubben / codeclub-viewer

A viewer to display codeclub lessons
4 stars 17 forks source link

Make PDFs better #679

Closed Skagevang closed 4 years ago

niclan commented 4 years ago

Relevant: https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after https://developer.mozilla.org/en-US/docs/Web/CSS/break-after

Skagevang commented 4 years ago

This was "fixed" in this PR #691

niclan commented 4 years ago

I'm still seeing page breaks in the middle of text lines? See image in kodeklubben/oppgaver#1488

Skagevang commented 4 years ago

@niclan This is not deployed yet. Hopefully very very soon

niclan commented 4 years ago

Examined pr and found onClick: () => window.print(), - so pdf is produced in browser? Chromes page breaking is much worse in my experience, I tried that as an alternative before I wrote the ticket and figured out how to run the whole viewer on my laptop to get printouts with kodeklubben/codeclub-viewer#689 included.

Skagevang commented 4 years ago

When we deploy later today that will be the solution. It's not optimal, but we think it's better than what we had. We used puppeteer. So when travisci built the solution it called node createLessonPdfs.js after everything is done but before deploy of course. That file is in the root folder if you want to check it out