ukwa / ukwa-pywb

GNU General Public License v3.0
11 stars 3 forks source link

Per-chapter printing + print preview #109

Closed tw4l closed 1 year ago

tw4l commented 1 year ago

Related to last milestone of #100

This PR introduces per-chapter printing and print-preview.

The way this works is that the user is redirected to a print-friendly rendition of the epub when they enter Ctrl/Cmd-P on their keyboard or click on the new print icon in the header:

Screen Shot 2023-08-04 at 11 44 11 AM

This approach was taken because epubjs-reader and a number of the already existing features are tied pretty heavily into the existing layout, so doing this without introducing a new view would require a substantial amount of work and reworking previous features.

The new print-friendly view displays only a chapter at a time, with a select to choose a new chapter (or navigate to chapter sub-sections - this can be removed to only have top-level chapter headings if it feels busy or confusing), and a button to return to the main view with full functionality:

Screen Shot 2023-08-04 at 11 44 45 AM

Some additional work on margins may still be needed but this new view has a much better layout for printing and print preview:

Screen Shot 2023-08-04 at 11 45 07 AM