views:

649

answers:

4

i have an jpg where the height is larger than a regular 8.5x11 piece of paper (the height is around 2000px)

here is the link http://i39.tinypic.com/121d7ur.jpg

so obviously when you try to print this picture its going to print on more than 1 piece of paper ....however when i try to print the page (or even go to print preview)...it only shows half the image on the first page....but there is no second page?...there should be a second page to show the rest (or even a 3rd page)

if i use FF there is no problem...it prints on 3 pages....but with IE 7 i'm limited to just printing 1 piece of paper.

i have right right clicking on the image itself within IE7 and clicking "print this image" and still no luck.

anyone have a solution for this?

+2  A: 

I know this probably isn't the answer you are really looking for, but if you are intending on the users printing the image, I would consider putting it into a PDF. That way it will always print the same, everytime for everyone.

Ryan Guill
+4  A: 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Blank XHTML 1 Transitional Page</title>
<style>
@media print {
    html { height: 100%; }
    img { height: 100%; }
}
</style>
</head>
<body>
    <img src="bigimage.jpg" />
</body>
</html>

EDIT: Sorry, didn't initially realize your image was too TALL rather than too WIDE. To reduce the image height whilst maintaining aspect ratio, use CSS to set both HTML and IMG to have a height of 100% - see modified example.

Dylan Beattie
unfortunately i still get the same problem.your solution made my picture fill the whole page of paper but still cut off halfway......naturally the image should be printed on multiple pieces of paper due to it's large size.
dezwald
A: 

thanks Dylan Beattie...your solution worked!

i was losing hair here for a second.

dezwald
A: 

Try wrapping the image in a div, in the div css apply the following:

image_wrapper {*height:1%; position:relative}

The star/* selector should limit to IE, this is a variant of the holly hack.