Print preview bug when change orientation option(javascript) RRS feed

  • Question

  • The images in each page do not fit to page any more when orientation option changed.

    Here is my case:

    I need to print all the images displayed on the page. When user choose to print, I will create a "div" by javascript, containing these images, and set one image per page by applying the css "page-break-before" to 'always'. Also, the image in each page will fit the page by applying the css "max-height/width" to '100%'. It works perfectly.

    However, if I choose orientation option from 'portrait' to 'landscape', the image on each page does not fit the page any more. So does the Size option and other option affect the page size. 

    Below is my css code:

    @media print { .noprint { display: none; } #printArea { display:block; }

    .page {
            page-break-before: always;

    #printArea img{ max-height: 100%; max-width: 100%; } }

    Sun Bin

    Friday, September 14, 2012 7:14 AM