I have an application on one domain that displays content from another application from a different domain. The iframe gets dynamically resized similar to the method described here to prevent the iframe from having any scroll bars in it. The problem I'm having is that when the page is printed, if the iframe is bigger than a printer's paper size, content from the iframe is not printed. I would like the iframe to print on multiple pages, not get truncated. I have set the page-break-inside css property to auto in the print css, but that didn't seem to do anything. Can an iframe span multiple pages when printing?
views:
190answers:
1
+1
A:
I don't think this can be done except maybe for a fancy "Poster" printer driver that can split huge output to multiple pages. That would require installation on the client side, of course.
Can't you print the IFrame's contents alone? Without a surrounding page?
Pekka
2010-03-22 20:37:13
That is a possibility. I've been looking around for a solution, and this solution keeps coming up. Before I implement this less than ideal solution, I would like to know if the ideal solution is impossible. Why can't a page-break be inserted into the middle of an iframe. Is an iframe any different than a paragraph or div? Can't those span multiple pages when being printed?
Dave
2010-03-22 20:46:40
An iframe is an entirely independent document within a document, which is why I guess the page-break won't work - it would have to intelligently split up the surrounding page *and* the document in the iframe. Probably too much to ask any browser right now.
Pekka
2010-03-22 20:49:43