pstein Posted March 6, 2021 Share Posted March 6, 2021 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 More sharing options...
niche Posted March 6, 2021 Share Posted March 6, 2021 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 More sharing options...
Ingolme Posted March 6, 2021 Share Posted March 6, 2021 You could try using break-inside. If the break-inside rule does not work on the <img> tag then it might not be possible to solve this. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now