Browser-side precise printing or nesting components

Notice:

For the software and related information of the Kanghu cloud report component, please go to

http://www.cfsoft.cf

Get it, this page will no longer be updated! !

 

----------------------------------------------

The report printing of B/S application system has always been a difficult problem. The conventional idea was to install ActiveX plug-in in the browser to obtain the ability to directly drive the printer.

However, with the development of browsers, more and more browser manufacturers prohibit the installation of ActiveX to avoid various security problems caused by ActiveX components.

In order to solve the pain points in B/S printing, my studio developed this report server, which perfectly solves the problem of obtaining the same printing ability as the C/S system without using ActiveX on the browser side.

This report system does not need to install any plug-ins in the browser, just through JavaScript, the report can be printed accurately and the printing process can be free of manual intervention.

 

2. Features:

1. High compatibility: There is no need to install any plug-ins on the browser side and the server side. Today, when browser plug-ins have become cross-street mice, they are compatible with most browsers (an extension is required for versions below IE10);

2. No installation: the software is copied and used immediately, without installation, without polluting the operating system, making the operating system lasting for a long time; 

3. Visualization: Visual template designer, template design can be completed by dragging and dropping; 

4. High precision: realize the printing accuracy accurate to millimeters. For some occasions where the format is complex and requires accurate printing, it can easily achieve millimeter-level accuracy;

5. Easy set printing: a visual template designer, adding a base map of the bill format to the template, it can easily realize the set printing, and there is no pressure to realize the printing of invoices, express orders, checks, etc.;

6. Strong functions: from simple reports, master-slave reports to nested reports and even cross reports, all can be easily dealt with. There are also one-dimensional and two-dimensional barcodes, and even, there are scripting functions against the sky, only unexpected, not impossible;

7. Automation: The printing process is fully automated, and there is no need to manually print again like generating PDF, Word, and Excel;

8. Easy deployment: The print template can be deployed on the client side (in the same directory as the cfprint.exe program), or on the server side, and the template can be Base64 encoded and transmitted to the client in real time;

 

3. Preconditions for use:

1. IE10 or above, Chrome (Google Chrome) 4.0 or above, Firefox 4.0 or above, Opera 11 or above, Safari 5.0.2 or above, iOS 4.2 or above

Or browsers using Chrome kernel and Firefox kernel can use this printing system directly; for IE6~IE9, please contact us for support;

2. Before printing, you need to design a printing template (see Section 5 for template designer);

3. The print data must be sent to the print server in the format of Json, and the data must meet the specified format (see below);

 

An example of an Odoo call is attached to the zip file.

 

 

Author: Kanghu Software Studio

QQ:  360026606

WeChat: 360026606

 

 

----------------

2017.01.21:

In recent days, many friends have reported that there is no template designer. This is my negligence. I did not explain the use of the built-in template designer. Now add:

 

First, you print it with the test page (mainly to generate json, you can also write a json manually according to the instructions, you don't need to try printing this step)

 

2. Double-click on the "H" in the lower right corner of the server , the server window can be zoomed with the mouse, and the window can be enlarged by pulling the lower right corner with the mouse



 

3. In the opened area, you can see three buttons "Design", "Preview" and "Print".

    in: 

    The "Design" button is used to design the print template

    The "Preview" button is to print preview the data in the text box below

    The "Print" button is to send the data in the text box below to the printer for printing



 

 

4. Click the "Design" button to enter, the print template designer will appear, which is a visual designer. You can pull the controls from the toolbar or pull the data fields from the data window on the right, and arrange them on the page according to the format requirements. on the template.



 

 

5. After the design is completed, save the template with a different file name from the top menu "File-->Save As", and then in the print data (json), "{"template":"waybill_huaxia3.fr3"" template file name waybill_huaxia3 .fr3 is changed to the file name you just saved.

 

6. The default size unit is millimeters, which can be modified by opening the options window through the top menu --> View --> Options



 



 

7. After the design is completed, pull the window back to its original size, and then double-click the "H" in the lower right corner again to lock the window and not allow zooming

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326951749&siteId=291194637