wikipendium.no icon indicating copy to clipboard operation
wikipendium.no copied to clipboard

Lots of errors when printing

Open Matsemann opened this issue 10 years ago • 8 comments

Tried with this page: https://www.wikipendium.no/TI%C3%984146_Finance (on this revision https://www.wikipendium.no/TI%C3%984146_Finance/history/3052/ )

List of TODOs:

  • [x] No header
  • [ ] Fix images on page breaks
  • No header on first page
  • But a header on every following page, this header overlaps with the text so not all text is visible on the print
  • Images on page breaks, could apply css-rule to images so they are not cut in half (page-break-inside: avoid)

First page:

firstpage

Two other pages:

otherpage

Matsemann avatar Dec 01 '14 13:12 Matsemann

We're aware of some issues with printing, but they seem to vary greatly between browsers. Hiding navigation is a simple cross-browser fix, so I'll push an update for that. But many of the other issues I can't reproduce in Google Chrome, what browser did you use?

stianjensen avatar Dec 01 '14 17:12 stianjensen

I tried out the page-break-inside property in Firefox, but it doesn't seem to have any effect.

I've created a pull request which resolves the issues with the header, and will have another go at image floating later.

stianjensen avatar Dec 01 '14 17:12 stianjensen

As for page-break-inside, there are some issues applying it directly to an image. You will need to wrap the image and apply it to the container. E.g. <div class"no-break"><img..></div>, or sometimes it works just by having the image inside something with display block. I had some issues with something similar this summer as well..

Matsemann avatar Dec 01 '14 18:12 Matsemann

I've updated the comment to include fixes that needs to be done.

The removal of the headers makes it seem that images does not break on pages, but I think a bit more testing of this would be good.

Update: As pointed out before, the images still break in firefox :/

cristeahub avatar Dec 02 '14 15:12 cristeahub

Has this been fixed by the recent updates to print styling?

sigvef avatar May 24 '15 22:05 sigvef

I would suppose there will be fewer issues now since we pack more content on each page, but we still haven't done anything in particular to ensure nice floating of images between page breaks.

stianjensen avatar May 24 '15 22:05 stianjensen

Removing display:block from img fixes them in Fx at least. A second problem that interferes with printing is the negative margin on #article section

Other than that, it looks good.

Matsemann avatar May 25 '15 08:05 Matsemann

I'll look into to the block-display, and see if we can make that work.

And negative margins can be removed on print, so I'll do that.

stianjensen avatar May 25 '15 08:05 stianjensen