Jump to content

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


pstein

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 comment
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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...