Jump to content

How to avoid page breaks for <img> when printing?

Recommended Posts

Assume I have a webpage loaded which contains some big pictures.
When I print this webpage (into a pdf file) and a picture does not fit completely onto the current pdf page then automatically a page break is inserted and the picture is printed on the next pdf page.

How can I avoid this?

If the picture cannot be fully printed on the current page it should be cut.
The remaining, lower part should be printed on the next pdf page.

How can I achieve this with CSS?

I guess it must have something to do with the "clear" attribute?

Link to post
Share on other sites

FYI, my experience is your code will be tied to the version of the browser you're currently using when it comes to printing a page.  A version or to down the road, and your code may not work, as intended.

Having said that, are you really talking about printing a page of displaying a page?


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...