There are many web printing solutions, which can be divided into the following three categories based on their implementation methods.
1. native printing
Directly use the APIS provided by the SDK, which has the advantages of fast response, cross-platform cross-browser, and no dependency on external tools. There are several types:
1) javaapplet: By using the printing API provided by JDK, various text, graphic images, and swing components can be output to the printer.
2) Flex: using the print API provided by the flex framework, You can output the flex or flash visualization component to the printer.
2. Host Printing
Print through a browser. The following are common examples:
1) HTML: outputs the rendered HTML directly to the printer. You can use CSS to control the rendering of HTML elements on the printer.
2) ActiveX + HTML: ActiveX is used to print HTML elements and pages. ActiveX control can use Win32 printing API and browser development interface to output HTML to the printer.
3. External Printing
Strictly speaking, this cannot be printed. It is actually a data export solution. It imports application data to an external tool and then uses this tool for printing. There are several common types:
1) PDF printing: PDF is an industry standard. pdf Development kits (such as Java-based itext and flex-based alivepdf) can be used to form PDF documents for application data, it is then printed by Adobe Reader or other tools.
2) office printing: Microsoft office suites are widely used in Word and Excel, and many other office software are compatible. Therefore, you can export application data to Word and Excel documents before printing.