Spit Groove Lodopweb End Print control

Source: Internet
Author: User
Tags blank page

First look at the following official sample code, is actually very simple. Other code can go to the official view cover up.
I just want to vomit the first time with this control to do a, constantly go to the background to read the data and then print out the function.
Ideas are as follows:
Each time from the background read a page of data, and then in JS processing, stitching into HTML content. Then determine the content height, whether it is full page, print full, or continue to append content (virtual height is a strong virtual size between millimeters and pixels).
When the program code is written, it is printed through the virtual printer. is in line with our requirements,
So here's the problem: their plugins are first in different versions of the system, and the success rate of installation in different browsers is not the same.
Just like I'm installing in WIN10. Google is not installed in the Win7, Google also installed in the. As if the JS they provide also conflicts with the jquery validation framework.

OK, spit out the plug-in compatibility, and then to spit the slot under this space on the printer compatibility, in the HP printer (looking at a very new one) printed out the effect is we need the effect, but the change of a printer printed out the effect is wrong. The results printed in different browsers are not the same. For example: fonts are not consistent in all printed paper, and some of the printed data is one page short. Some more out of a blank page and so on;

The final summary: if you just print the visible data of the page. I think it's nice to have a browser-enabled print function. Need to be constantly retrieved from the background. It may not be possible for this control to populate the content with HTML. Compatibility is too bad.

 function Createprintpage () {Lodop.
    Print_init ("Lodop Print Test ..."); Lodop.
    Add_print_text (30,60,170,20,document.getelementbyid ("Text_0"). Value); Lodop.
    Add_print_text (60,60,170,20,document.getelementbyid ("text_1"). Value); Lodop.
    Add_print_text (90,60,170,20,document.getelementbyid ("Text_2"). Value); Lodop.
    Add_print_text (120,60,170,20,document.getelementbyid ("Text_3"). Value); Lodop.
    Add_print_text (150,60,170,20,document.getelementbyid ("Text_4"). Value); Lodop.
Add_print_text (180,60,170,20,document.getelementbyid ("Text_5"). Value);
Where: Print_init () is the initialization method, must have the parameter as the Print task display, or as a PDF file when printing the file name. "Page code controls the printer through controls" This is the basic idea of LODOP.
    So each content must be page code to the control, the control is not going to the page to obtain information, preview method: function Print_view () {createprintpage (); Lodop.
PREVIEW ();
    } Printing method: Function print () {createprintpage (); Lodop.
PRINT ();
    Print Maintenance: function Print_setup () {createprintpage (); Lodop.
Print_setup ();
    } Print Design: function print_design () {createprintpage (); Lodop.
Print_design (); }

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.