Sefaria-Project icon indicating copy to clipboard operation
Sefaria-Project copied to clipboard

Show Page Breaks on Source Sheets

Open blockspeiser opened this issue 11 years ago • 7 comments

It can currently be difficult to design source sheets for print because you don't know where pages will break.

I think it may be very difficult to get this information exactly, but perhaps it is possible to make some estimations. An option for "Show page breaks" could simply show a set of lines across the page which may make it easier to chunk up sources across pages neatly.

Not sure if this would be able to handle alternations to page margins.

blockspeiser avatar Jan 20 '14 21:01 blockspeiser

With jquery you can pull the screen dimensions easily, and then it is just a matter of scaling it with some math and then displaying the lines. On my 1600 by 900, each page is about 133% of the screen.

shelfgot avatar Jul 06 '14 16:07 shelfgot

I believe unfortunately it's a bit more involved than this. Try printing the same sheet from Chrome and from Firefox -- I've seen a number of inconsistencies that lead to text being laid out on different lines, which is important if you want to display line breaks exactly across browsers.

It may be that there is just some extra CSS that needs to be set to make the two consistent, but I haven't looked into enough yet to know.

blockspeiser avatar Jul 06 '14 17:07 blockspeiser

Would love to leave a comment on this, reemphasizing the importance of this feature for those creating source sheets.

rivkahcarl avatar Nov 08 '15 02:11 rivkahcarl

Thanks for the vote. We're starting to think through Print issues around source sheets a bit more now, but it still remains the case that this is difficult to do perfectly across browsers. Hopefully we'll know more about the options soon in any case!

blockspeiser avatar Nov 09 '15 21:11 blockspeiser

I'll try to look into this issue after Shabbat. It should definitely be possible, as I've seen other sites correctly implement this feature. @blockspeiser mentioned that printing the same sheet from different browsers often results in different page breaks. I wonder if this problem can be mitigated with good CSS resets/normalizations for print media queries. If not, perhaps we can force page breaks with the page-break-before/page-break-after CSS attribute-- it has pretty good browser support. I also stumbled upon a plugin for ckeditor that claims to accomplish this, but I'm not sure how well maintained it is. Hopefully, more to come soon.

pzp1997 avatar Aug 05 '16 23:08 pzp1997

@blockspeiser @shman why don't you use

or, you have seen this for instance: https://www.w3schools.com/CSSref/pr_print_pagebb.asp

yishairasowsky avatar Apr 01 '20 17:04 yishairasowsky

@blockspeiser @shman why don't you use

or, you have seen this for instance: https://www.w3schools.com/CSSref/pr_print_pagebb.asp

yishairasowsky avatar Apr 01 '20 17:04 yishairasowsky