ASKnetCommunity / Training

This is the training plan to organize your own training.
https://training.asknet.community
GNU General Public License v3.0
5 stars 10 forks source link

Time Slots / Day Breaks in print view #156

Closed walthierer closed 9 months ago

walthierer commented 12 months ago

Day Breaks / Time Slots destroy the Print View if they are created between the module blocks. If they are placed within the module, the print view displays correct.

edit:

Fix: add note next to the "Print" button [1] [info icon] "Currently the print view works best in Chromium based browsers."

timmwille commented 11 months ago

here are examples where it is visible:

Broken-Example2-ASKtraining.pdf Broken-Example-ASKtraining.pdf Working-Example-ASKtraining.pdf

bmen commented 11 months ago

I have tried this and I cannot reproduce @timmwille problem.

I have now added a page break at Day Break. A new page begins with a day break.

bmen commented 11 months ago

We currently seem to have the problem that the print version is not the same in all operating systems and browsers. All browsers with the Chrome engine work well, but there are problems with some Firefox browsers. For example, a day break between two modules makes a strange break and is not displayed completely. I have no problems. Neither with Chrome engines nor with Firefox. I have a Linux Ubuntu 20.04 + Brave Version 1.58.131 Chromium: 117.0.5938.92 / Firefox 120.0.1

If you @saisilinus have any ideas on how we could solve this, that would be great?! The latest development status is in the branch "156-time-slots-day-breaks-in-print-view". I have already merged all the changes from the Development Branch.

If we can't get the print versions to look roughly the same on the different systems, we may have to think about using a PDF converter like this one: https://github.com/parallax/jsPDF. But that would be a feature that would have to be discussed and commissioned first!

saisilinus commented 11 months ago

I concur with @bmen. It seems that the Window.print() feature is inconsistent in different environments. I've tried some of the workarounds but I can't get rid of the bug for now. The problem is with the implementation of the print feature rather than a bug on our end. It seems that printing starts immediately when you are using Firefox sometimes while it always waits for the site to load when you use Chrome. I think it's also part of the reason why the preview takes some time to load when using Chrome and almost no time at all on Mozilla.

I also noticed a related bug. Sometimes the references list is empty when you print if you open and close the list before printing.

I think we should add a disclaimer with a CanIUse list for now to the README. We should also think about a long-term solution like @bmen said. I'll try and see if there is a workaround in the meantime.

walthierer commented 11 months ago

maybe there is hope, that the window.print() function will be improved soon?? i think a disclaimer in the README. would be good for now. what do you think @timmwille?

timmwille commented 11 months ago

Ok so the issue is:

Fix: add note next to the "Print" button [1] [info icon] "Currently the print view works best in Chromium based browsers."