Jqprint page printing, print preview can contain pictures

Source: Internet
Author: User

Your own module needs to have a paper printing function, you need to print the content of a specific range of pages, so the Jquery.jqprint script is selected

It's very easy to use.

Print
$ ("#printPage"). Jqprint ({
debug:false,//If True, the IFRAME viewing effect can be displayed, false by default
Importcss:true,//true represents the introduction of the original page of the CSS, the default is true.
printcontainer:true,//indicates that the default is true if the original selected object must be included in the print.
operasupport:true///indicates that if the plugin must also support the Opera browser, the default is true.
});

But there is a problem, that is, when the page has a lot of pictures, when using Google Chrome print preview, the preview of the page will not show all the pictures, so print out also does not show the picture.

Check to find out, can only be jqprint script problem, the final test, found that the script inside

SetTimeout (function () {(Opt.operasupport && $.browser.opera tab: $iframe [0].contentwindow). print (); if (tab) {Tab.close ();}}, 1000);

The time from 1000 to 3000 will show all pictures.

Although found the reason, the program ran through, but the principle is still do not know, I hope someone can see this essay to guide.

I guess the print preview is also slowly loading, if given more time, the picture can be loaded at this time, it will appear in the print preview.

Jqprint page printing, print preview can contain pictures

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.