In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly analyzes the relevant knowledge points of the printing technology of big data report tool, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look. Let's follow the editor to learn more about the printing technology of big data's report tool.
In the era of Chand S, the report is displayed by the application, and the printer can be directly controlled to achieve printing. After entering the era of BBG S, report presentation has become a matter for browsers, and JS programming in browsers can not directly control the printer, but can only rely on the printing ability of the browser itself. There are many problems in this way, such as not accurate paging, browsers generally determine the paging location based on the page size set by the user and the content of the web page, which is difficult for programmers to control; for example, unable to accurately align the margins and print text, unable to achieve invoice set-up and other functions.
In order to make up for these capabilities, the browser provides ActiveX controls, which is equivalent to moving the original Cramp S front-end program into the browser, which can solve the problems of printing accuracy and paging controllability. But ActiveX has serious security problems: as long as the computer user can complete the task, such as it can access the registry, can access the local file system and so on. This seriously violated the principles of browsers, so it was gradually banned.
Many reporting tools are written in Java, and ActiveX technology is often not compatible with Java. In order to be more compatible with Java, browsers also provide Java Applet to embed Java programs, which can be understood as ActiveX written in Java. In this way, you can use the ability of Java to print on the browser side, that is, Applet printing. Applet printing is almost perfect for accuracy and paging, and printing is faster:
However, Applet printing also has shortcomings, mainly reflected in two aspects: one is the strict configuration requirements of Applet itself, and the other is a series of problems caused by the upgrade of Java and browser. Applet requires the client to have at least jre installed, which is a bit too demanding for personnel. Although Applet is a little more secure than ActiveX, there are still security issues. In recent years, browsers have strengthened their security and imposed restrictions on Java Applet to require digital signatures, so when printing versions above Java7, it is easy to pop up the following dialog box and add user actions:
Google browser simply disabled the Java plug-in from version 42, and then Firefox disabled the Java plug-in, which is currently only supported by browsers in the IE kernel. Although the scope of application is now very narrow, some users still choose to use this method.
Flash is a universal plug-in that can always be used in browsers and has a high installation rate. It has strong graphics rendering capabilities and can be programmed, so it is thought to be used to achieve printing. The emergence of Flash printing mode solves the problems of high complexity of printing operation and high consumption of browser resources. Its implementation principle is: the client click to print will trigger the Flash Player plug-in (plug-ins are almost built-in browsers, generally do not bring the terminal installation trouble, and the browser takes up less resources), Flash will be in accordance with the transfer of the content to draw their own panel, and then transmitted to the printer to print, overall printing speed is also very fast. Flash printing also belongs to accurate printing, and the content is not distorted in vector printing mode.
Although more people print with Flash now, Flash printing has an insurmountable drawback, which is its own security sandbox mechanism, which does not allow the transmission of paper information, so it will cause a problem: customers need to manually adjust the paper before printing.
PDF printing is also a common printing method to replace applet printing. Its principle is to download a PDF file stream from the server, and then call Adobe Reader, so as to use Adobe to realize the printing function. Therefore, it is necessary to install the corresponding plug-in for the browser, but usually the corresponding plug-in will be installed automatically after the system installs Adobe Reader.
PDF printing is printed by Adobe Reader, and there is no self-designed code at the front end, the advantage is that there is no security problem at all, there is no need to worry about malicious code on the server side to attack the local computer, but the disadvantage is that it is unable to carry out complex logic control, such as the inability to print zoom, clear layers, mirror print, column separation and other settings in the print interface.
Summary 1
Each printing method has its own advantages and disadvantages. A good report tool, in addition to ActiveX, should support several other printing methods at the same time, so that users can freely choose and use them in different demand scenarios.
The above techniques solve the problem of accurate printing, and there are other common special requirements for report printing:
Silent printing
Silent printing means to output the report results directly to the printer without popping up the options window and printer settings window when you click to print. The report tool should provide the foreground implementation of silent printing.
For example, provide a foreground js method:
Applet direct printing: directPrintReport ('report1')
Flash direct printing: directFlashPrintReport ('report1')
Pdf direct printing: directPdfPrintReport ('report1')
Set up and fight
Matching is a printing method that prints the data to a specified location based on a template file. The difficulty of this printing requirement lies in how to accurately locate the content and how to process it under multi-page printing. Excel-like or excel-like report tools make it easy to make template files:
Paging should be handled by the report tool itself, without the need for users to add additional code, forcing the paging mechanism to be sound and easy to operate:
Batch printing
Batch printing means that multiple reports can be printed by clicking the print button once. The report tool itself should provide batch printing, and the more printing methods supported, the better. The mode of use should also be as simple and easy to use as possible, for example, to achieve pdf batch printing by directly spelling different report parameters through URL: http://localhost:6868/demo/reportJsp/pdfBatchPrint.jsp?report={t1.rpx}{t2.rpx(arg1=1; Arg2=2)} can be seen from URL to support splicing of report files with different parameters, which also requires batch printing support. In addition, batch printing provided by report tools also needs to support scale printing and horizontal and vertical mixed printing.
Summary 2
Silent printing, set printing, batch printing are generally also the functions of report tools, but the implementation solutions may be different. Of course, the simpler the implementation operation configuration provided by the report tool, the better.
About "big data report tool printing technology" is introduced here, more related content can be searched for previous articles, hope to help you answer questions, please support the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.