To enhance the way webprint print controls print multiple documents at once

Source: Internet
Author: User

Web Printing has always been a difficult problem in Web management system, and it has been proved that using lightweight DLL control to achieve Web printing is an ideal solution.

Using the VC ATL technology, combined with IE's print template technology written by Webprint.dll, compressed packaging generated DLL, file download only about 80k, is a lightweight printing control. The following features have been implemented recently:

1, the DLL plug-in function modification

1.1 Increasing the properties of the print URL

Description: When you set the value of this property to a URL link, and then call the print () function to do the printing, you can print the URL link to the Web page.

Grammar: Webprint.printurl=[stringvalue];

Webprint.print (); or Webprint.preview ();

Apply to: Webprint Object

Use examples:

Webprint.initprint ();

Webprint.printurl= "http://www.fcsoft.com.cn";

Webprint.preview (); will see the page you linked to

Note: Webprint is the ID of the print widget.

1.2 Increasing the state properties of the print completion

Description: When you call a DLL control to do a printing document, the document processing completed, successfully sent to the printer processing, this time, this state value will become "over"; that is, when the user is doing the printing document, you can judge the value of the property by callback to determine whether the document is finished printing.

Syntax: webprint.state

Use examples:

Webprint.InitPrint();

Webprint.Print();

……此处需要使用回调来判断是否打印完成。

If (webprint.state==”over”){

 Alert(“打印完成!”);

}

Note: Webprint is the ID of the print widget

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.