Technical Analysis on WEB Printing

Source: Internet
Author: User
Tags print format

Technical Analysis on WEB Printing
The existing Web printing control technology is divided into several solutions
Print Custom Controls
Print using the WebBrowser control provided by IE
Printing using third-party controls
The following describes the first two aspects.
I. Custom Controls
Custom Controls use tools such as VB or VC to generate COM components and use the defined print format to analyze and print the source files. Only by downloading and registering the generated components to the client can the generated components be printed on the client.
The difficulty is to define the print format and how to analyze the print source file. A better method is to use XML technology to completely solve the problem. XML can be used to easily define the format of the printed target text, table, and other content. However, it is difficult to develop programmers.
Ii. Web Printing Using WebBrowser
WebBrowser is a browser control built in IE, which does not need to be downloaded by users. This document discusses the technical content of the WebBrowser control of IE6.0. Related Technical requirements include generation of printed documents, page settings, and implementation of printing operations.
(1) generate printed documents
1. client script
Client scripts include VBScript, JavaScript, and JScript. The syntax used to develop applications in IE is JScript. Because it is almost identical with JavaScript, it can also be called JavaScript (hereinafter abbreviated as JS ). Generally, JavaScript is used to analyze DOM documents. DOM is a Web document model proposed by Microsoft and is mainly used to implement Web script programming.
Javascript can be used to analyze the content of the Source Page and extract the page elements to be printed for printing. By analyzing the content of the source document, you can generate a printed target document.
Advantage: the client generates the target document independently to reduce the server load;
Disadvantages: The analysis operations of the source document are complex, and the printed content in the source document must be agreed;
2. server-side program
The server-side program mainly uses the background code to read the print source from the database and generate the print target document. When the page is generated, you should also consider using CSS to implement forced paging control.
Advantage: You can generate a rich set of printed target documents, which is highly controllable. Since the printed content is obtained from the database, the generation operation is relatively simple;

Related Article

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.