The customer needs a web printing function, which has not been completed in two days. I found the pazu printing control on the Internet. Let's just talk about it.
First, the customer needs to click the button to print it directly. Set the page margins, headers and footers, printers, paper, and pages before printing.
You can use javascript code to set properties through the pazu control.
To use pazu, add the following code and install the activeX control as prompted.
<Div style = "display: none">
<Object classid = "clsid: AF33188F-6656-4549-99A6-E394F0CE4EA4" codebase = "http://www.4Fang.net/4ff/ SC _setup.exe" id = "pazu" name = "pazu">
<Param name = "License" value = "2AE816BA3A24A9BA3F01162E7BF420F4"/>
</Object>
</Div>
The following code sets properties and calls methods:
Pazu. TPrinter. marginTop = parseInt (mtop. value); // attribute top margin
Pazu. TPrinter. marginBottom = parseInt (mbottom. value); // attribute bottom margin
Pazu. TPrinter. marginLeft = parseInt (mleft. value); // left margin of the attribute
Pazu. TPrinter. marginRight = parseInt (mright. value); // right margin of the property
Pazu. TPrinter. footer = sFooter; // attribute footer
Pazu. TPrinter. header = sHeader; // attribute header
Pazu. TPrinter. orientation = o; // attribute INTEGER: Paper direction 1 = vertical 2 = horizontal
// Pazu. TPrinter. doPrint (false) // print the Method
Pazu can be used to meet most functions. pazu can be used to set page margins, headers and footers, printers, paper, previews, and print directly. Currently, these functions are used and need to be explored.