Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Instructions for using HttpPrinter

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

HttpPrinter

instructions

(V1.0)

Shandong Yiqiao Intelligent Technology Co., Ltd.

Website: http://www.HttpPrinter.com http://www.yiqiao.net.cn

Mobile / Wechat: 13165191728 QQ:46140262 group number: 230518187 (free version) 666783702 (paid version)

Free version

There are no functional restrictions, such as designing reports, report paths, client connections, exporting pdf,jpg files, setting offset values, etc.

Do not provide technical advice

Fee version (500 yuan)

One-time payment, provide permanent technical advice.

Provide OEM service, replacement software name, contact information and so on.

Enjoy discount service (customization function, design report, etc.).

You can use this software for free. If you need to design report templates, customize functions and provide technical guidance, please contact the author!

I. Overview:

Common methods of report printing include:

1. Use activex to print but can only be used in IE, but Microsoft has abandoned the monopoly of IE,chrome, and the new version of EDGE uses the chrome open source kernel.

two。 Generate pdf printing but the efficiency and printing effect are limited. You batch print data to try, not tired you, generate a pdf, click to print once.

3. Use js to transfer data to the report server, compatible with a variety of browsers.

4. Android IOS custom printer printing, or using the printer interface to print.

Can so many prints be unified? This is the HttpPrinter we use now. Through Http communication, the printer server sets the template format and sends the data to the server.

2. Characteristics:

1. No plug-ins, just one sentence called js.

2. Drag and drop to complete the design. Thank you for the support of Ruilang report and the pride of the Chinese people.

3, powerful report function, no matter what report, cross, nested, or QR code, pictures, etc., are supported.

4. Printers: all printers are supported as long as they are available, needle printers, laser printers, receipt printers, card printers, etc., and printers can be specified when there are multiple printers

Support a variety of languages, java php js delphi python ios andriod, etc., languages that provide Http communication support.

3. Prerequisites for use:

1. Before printing, we need to design the printed report (we use Ruilang's website is the pride of http://www.rubylong.cn report developers)

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

Fourth, data format description:

Let's take a report data as an example to illustrate the data format.

{

"ReportName": encodeURIComponent ("test.grf"), / report file name /

"Copies": 1 / optional. The number of printed copies, the specified number of printed copies is supported. Default 1 copy, if zero, do not print, only return pdf,jpg and other files generated by the report /

"PrinterName": encodeURIComponent (") / optional. Specify the printer, use the default printer if empty, please view the name of your printer in Control Panel-> Devices and printers.

"PrintOffsetX": 0 / optional. Print the right offset, in centimeters. The horizontal offset of the report is positive to the right and negative to the left. /

"PrintOffsetY": 0 / optional. Print the offset in centimeters. The offset in the vertical direction of the report is positive down and negative up. /

"token": encodeURIComponent ("aa"), / * optional. Print only as long as the token value is in the list

"Control": encodeURIComponent ('['/ * part box Available values: AsStaticBox, AsMemoBox,AsRichTextBox,AsPictureBox (base64 format), AsBarcode*/ +'{"type": "AsStaticBox", "name": "name", "value": "Gao Wenjie", "required": false},'+'{"type": "AsStaticBox", "name": "gender", "value": "male", "required": false},'+'{"type": "AsStaticBox", "name": "phone" "value": "13165191728", "required": false},'+'{"type": "AsBarcode", "name": "QR code", "value": "5520002701774727", "required": false},'+'{"type": "AsPictureBox", "name": "picture", "value": "/ j9KKKACiiigAoooAGN 9k =", "required": false},'/ base64 format +']') "Parameter": encodeURIComponent ('['/ * parameter) Type is empty by default. Alternate fields +'{"type": "," name ":" order number "," value ":" 5520002701774727 "," required ": false},'+'{" type ":"," name ":" date "," value ":" 2019-09-09 12:21:12 "," required ": false},'+'{" type ":"have been set on the report side. "name": "year", "value": "2018", "required": false},'+']'), "Field": encodeURIComponent ('['/ * field Type ftBlob (base64 format), ftString ftInteger ftBoolean, ftFloat, ftCurrency,ftDateTime, size (ftString is set to actual length, other settings are set to 0, for example, ftInteger ftBlob, etc.) +'{"type": "ftString", "name": "express order number", "size": 255, "required": true},'+'{"type": "ftString", "name": "Sender", "size": 255, "required": false} '+' {"type": "ftString", "name": "Sender's phone", "size": 255," required ": false},'+'{" type ":" ftBlob "," name ":" Image "," size ": 0," required ": false},'+']')," Data ": encodeURIComponent ('[/ / * data line +'{" express order number ":" 1234567890 ") "Sender": "Shandong Yiqiao Intelligent Technology Co., Ltd.", "Sender phone number": "13165191728"},'+'{"Express order number": "1234567890", "Sender": "Shandong Yiqiao Intelligent Technology Co., Ltd.", "Sender phone number": "13165191728"},'+ {"Express order number": "1234567890" "Sender": "Shandong Yiqiao Intelligent Technology Co., Ltd.", "Sender phone number": "13165191728"},'+'{"Express order number": "1234567890", "Sender": "Shandong Yiqiao Intelligent Technology Co., Ltd.", "Sender phone number": "13165191728"},'+ {"Express order number": "1234567890" "Sender": "Shandong Yiqiao Intelligent Technology Co., Ltd.", "Sender telephone": "13165191728"},'+'{"Express order number": "1234567890", "Sender": "Shandong Yiqiao Intelligent Technology Co., Ltd.", "Sender phone": "13165191728"},'+'])

}

Successfully returned {"status": "ok", "data": "report address"}, failed returned {"status": "error", "data": "specific error message"}

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report