CN113238721B - OFFICE template printing method for unified government affairs service - Google Patents
OFFICE template printing method for unified government affairs service Download PDFInfo
- Publication number
- CN113238721B CN113238721B CN202110511094.9A CN202110511094A CN113238721B CN 113238721 B CN113238721 B CN 113238721B CN 202110511094 A CN202110511094 A CN 202110511094A CN 113238721 B CN113238721 B CN 113238721B
- Authority
- CN
- China
- Prior art keywords
- printing
- template
- application system
- server
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1242—Image or content composition onto a page
- G06F3/1243—Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1253—Configuration of print job parameters, e.g. using UI at the client
- G06F3/1257—Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1278—Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
- G06F3/1285—Remote printer device, e.g. being remote from client or server
- G06F3/129—Remote printer device, e.g. being remote from client or server in server-printer device-client configuration, e.g. print flow goes from server to printer and then bidirectional from printer to client, i.e. the client does not communicate with the server
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The invention discloses an OFFICE template printing method for unified government affairs service, which relates to the technical field of document printing and comprises the following steps: a client of the business application system forms a plurality of printing templates through local OFFICE software and stores the printing templates in a server of the business application system; the business application system performs API packaging operation to form a local HTTP service, and further form instruction data to be transmitted to a server; calling an API (application program interface) by a client of the service application system, selecting a printing template meeting the requirement, and initiating a request to a server; the server side of the business application system receives the request and modifies and stores the printing template according to the instruction data; the service end of the service application system processes the modified printing template and returns a PNG picture of each page to the client; and the client of the service application system performs uniform preview and printing on the returned PNG pictures. According to the invention, other components are not required to be additionally installed, so that the implementation workload can be reduced, and the problem of compatibility of OFFICE and WPS installation is avoided.
Description
Technical Field
The invention relates to the technical field of document printing, in particular to an OFFICE template printing method for unified government affairs service.
Background
Currently, 2 modes of NTKO components and rich media editing controls are mainly adopted for template printing in the field of government affairs services, and the two modes are that a printed template is obtained through a server side and replaced by actual service data through a bookmark at a browser side to generate a final printed file and print the final printed file.
The disadvantages of the NTKO module approach mainly include the following:
(1) The client is required to install the NTKO component and the OFFICE software, which causes the implementation workload of the business application system to be large;
(2) OFFICE software which must be installed at a client easily conflicts with common software WPS;
(3) The NTKO component is limited by a browser, and the compatibility is poor;
(4) COM components and activation are prone to errors.
The rich media editing control mode has the characteristics of good compatibility and high performance, but has the defects of small adjustability before printing, few styles, high template customization difficulty and the like.
Disclosure of Invention
Aiming at the requirements and the defects of the prior art development, the invention provides the OFFICE template printing method of the unified government affair service, so as to reduce the implementation workload of a business application system and improve the application efficiency on the premise of not installing additional components or controls.
The invention discloses an OFFICE template printing method for unified government affairs service, which adopts the following technical scheme for solving the technical problems:
an OFFICE template printing method for unified government affairs service comprises the following steps:
a client of the business application system forms a plurality of printing templates through local OFFICE software and stores the printing templates in a server of the business application system;
the business application system performs API packaging operation to form a local HTTP service, and further forms instruction data to be transmitted to the server;
calling an API (application program interface) by a client of the service application system, selecting a printing template meeting the requirement, and initiating a request to a server;
the server side of the business application system receives the request and modifies and stores the printing template according to the instruction data;
the service end of the service application system processes the modified printing template and returns base64 content and a PNG picture of each page to the client;
and the client of the service application system performs uniform preview and printing on the returned PNG pictures.
Furthermore, before the client of the related service application system calls the API interface to select the printing template meeting the requirement,
a client of the service application system calls an API (application program interface) interface and sends an instruction for opening a printing template to a server;
the server receives the instruction and calls OFFICE software to open the printing template;
the OFFICE software returns a token generated correspondingly to the opened printing template to the server;
and the server receives the token and calls the API (application programming interface) to return the instruction relationship between the printing template and the token to the client.
Furthermore, the client of the related business application system calls an API interface to select a printing template meeting the requirement, and initiates a request to the server, and in the process, the content of the request comprises the name of the selected printing template, a token corresponding to the selected printing template, and a printing device code to be used for printing the printing template.
Preferably, after printing is finished, the client of the service application system calls an API (application program interface) interface and sends an instruction for closing the printing template to the server;
and the server receives the instruction, calls OFFICE software to close the printing template, and clears the cache.
Further, the API wrapping operations involved include bookmark operations and form operations.
Furthermore, the bookmark updating operation or the form updating operation performed by the related business system respectively form instruction data, and the instruction data is transmitted to the server side for storage.
Furthermore, after the printing template is selected, the specific process of the business system performing bookmark updating operation to form instruction data is as follows:
a client of the business application system calls an API (application program interface) interface and sends updated bookmark contents to a server;
the server receives the updated bookmark content, calls OFFICE software to open the selected printing template, obtains a token generated by the corresponding printing template, calls the updated bookmark content and updates the printing template;
and after all bookmark updating operations are executed, processing the updated printing template to return the PNG picture of each page to the client.
Furthermore, after the printing template is selected, the specific process of the business system performing the form updating operation to form the instruction data is as follows:
a client of the business application system calls an API (application program interface) interface and sends updated table contents to a server;
the server receives the updated table content, calls OFFICE software to open the selected printing template, obtains a token generated by the corresponding printing template, calls the updated table content and updates the printing template;
and after all the form updating operations are completed, processing the updated printing template to return the PNG picture of each page to the client.
Compared with the prior art, the OFFICE template printing method for the unified government affair service has the beneficial effects that:
(1) The method carries out API packaging operation through the service application system, carries out batch instruction processing at a service end of the service application system, completes content replacement and format adjustment of the printing template, and transmits the PNG picture of the result to return to a client of the service application system, thereby realizing rapid preview and uniform printing of the printing template;
(2) The business application system client does not need to additionally install other components or controls, thereby greatly reducing the implementation workload, and simultaneously avoiding the problems of compatibility of OFFICE and WPS installation and the limitation of browsers;
(3) The invention can also support all styles of OFFICE, greatly improves the autonomous selectivity and the use satisfaction of users, saves the application implementation cost, and improves the application efficiency and the application range.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flow chart of a business application system opening a print template through an API wrapper interface in accordance with the present invention;
fig. 3 is a flow chart of bookmark updating operation performed by the business application system of the present invention.
Detailed Description
In order to make the technical scheme, the technical problems to be solved and the technical effects of the present invention more clearly apparent, the following technical scheme of the present invention is clearly and completely described with reference to the specific embodiments.
The first embodiment is as follows:
with reference to fig. 1, this embodiment provides a method for printing an OFFICE template of a unified government affairs service, which includes the following steps:
and S1, forming a plurality of printing templates by a client of the business application system through local OFFICE software, and storing the printing templates in a server of the business application system.
And S2, carrying out API packaging operation by the service application system to form a local HTTP service, and further forming instruction data to be transmitted to the server.
The API wrapping operation specifically includes a bookmark operation and a table operation. And bookmark updating operation or table updating operation carried out by the service system respectively forms instruction data, and the instruction data are transmitted to the server side for storage.
And S3, calling an API (application program interface) by the client of the service application system, selecting a printing template meeting the requirement, and initiating a request to the server. The requested content includes the name fileName of the selected printing template, the token corresponding to the selected printing template, and the printing device code machineCode to be used for printing the printing template, and at this time, the code sent by the API interface is as follows:
the fileName content is a template used by the service to be printed, and the server may store a plurality of printing templates (e.g., business license, food and drug administration license), and which one is to be used is specified by the parameter; the maschineCode is printed through a server, a plurality of client machines are called, parameters are required to explain which machine is processing, for example, a No. 1 machine and a No. 2 machine are simultaneously used for printing business license, and the operations of the two machines cannot be influenced mutually; the token is the unique identifier of the binding operation, the subsequent series of operations are connected in series by the parameter, and one complete process uses the same token.
It should be added that, with reference to fig. 2, before the client of the service application system calls the API interface to select a printing template meeting the requirement,
a client of the service application system calls an API (application program interface) interface and sends an instruction for opening a printing template to a server;
the server receives the instruction and calls OFFICE software to open the printing template;
the OFFICE software returns a token generated correspondingly to the opened printing template to the server;
and the server receives the token and calls the API (application programming interface) to return the instruction relationship between the printing template and the token to the client.
And S4, the server of the business application system receives the request, and modifies and stores the printing template according to the instruction data.
And S5, the service end of the service application system processes the modified printing template and returns base64 content and a PNG picture of each page to the client.
And S6, uniformly previewing and printing the returned PNG pictures by the client of the service application system.
After printing is finished, the client of the service application system calls an API (application program interface) interface and sends an instruction for closing the printing template to the server;
and the server receives the instruction, calls OFFICE software to close the printing template, and clears the cache.
Based on the bookmark operation and the form operation of the present embodiment,
(A) After the printing template is selected, with reference to fig. 3, the specific process of the business system performing bookmark updating operation to form instruction data is as follows:
a client of the business application system calls an API (application program interface) interface and sends updated bookmark contents to a server;
the server receives the updated bookmark content, calls OFFICE software to open the selected printing template, obtains a token generated by the corresponding printing template, calls the updated bookmark content and updates the printing template;
and after all bookmark updating operations are executed, processing the updated printing template so as to return the PNG picture of each page to the client.
When the above specific process is implemented, the codes sent by the API interface are as follows:
wherein token is a random character string which is consistent with the printing template selected to be opened; the bookmark is the name of the bookmark, one printing template file has a plurality of bookmarks, and the position of which bookmark the content is to be placed in must be clearly indicated; text represents text content that needs to be inserted in the print template.
(B) After the printing template is selected, the specific process of the business system for performing form updating operation to form instruction data is as follows:
a client of the business application system calls an API (application program interface) interface and sends updated table contents to a server;
the server receives the updated table content, calls OFFICE software to open the selected printing template, acquires a token generated by the corresponding printing template, calls the updated table content and updates the printing template;
and after all the form updating operations are completed, processing the updated printing template to return the PNG picture of each page to the client.
The specific implementation code of the PNG picture returned by the API is as follows:
{
token, a randomly generated uuid string,
"printName": A4 Printer name "
}
The service end returns data after operating the OFFICE software
{
"Succ":1,
"data": base64 content ",
}
wherein, token is a random character string which is consistent with that used when the printing template is opened; the printName is a printer name used at the time of printing, and this parameter may not be used (default printer);
returning to the explanation: succ represents whether the instruction is executed successfully or not, if the instruction is executed successfully, 1 is returned, otherwise, 0 is returned, and all instructions have the return of Succ; the data represents the content of the file.
In summary, the OFFICE template printing method of the unified government affair service does not need to additionally install components related to debugging, reduces the implementation workload of a business application system, solves the problem that the original printing components limit the browser, and improves the compatibility of the browser.
The foregoing has outlined rather broadly the principles and embodiments of the present invention in order that the detailed description of the invention that follows may be better understood. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and all such modifications and modifications should fall within the scope of the present invention.
Claims (6)
1. An OFFICE template printing method for unified government affairs service is characterized by comprising the following steps:
a client of the business application system forms a plurality of printing templates through local OFFICE software and stores the printing templates in a server of the business application system;
the business application system performs API packaging operation to form a local HTTP service, and further form instruction data to be transmitted to a server;
a client of the business application system firstly calls an API (application programming interface) to send a printing template opening instruction to a server, the server receives the instruction, the OFFICE software is called to open the printing template, the OFFICE software returns a token generated correspondingly to the opened printing template to the server, the server receives the token, and calls the API to return the instruction relationship between the printing template and the token to the client; the client of the service application system calls an API interface subsequently, selects a printing template meeting the requirement, and initiates a request to the server, wherein the content of the request comprises the name of the selected printing template, a token corresponding to the selected printing template, and a printing device code to be used for printing the printing template;
the server side of the business application system receives the request and modifies and stores the printing template according to the instruction data;
the service end of the service application system processes the modified printing template and returns base64 content and a PNG picture of each page to the client;
and the client of the service application system performs uniform preview and printing on the returned PNG pictures.
2. The method for printing OFFICE templates for unified government service according to claim 1, wherein after printing is finished, the client of the business application system calls an API interface to send an instruction to close the printing templates to the server;
and the server receives the instruction, calls OFFICE software to close the printing template, and clears the cache.
3. The method of printing the OFFICE template of the unified government service according to claim 1, wherein the API wrapping operation comprises a bookmark operation and a form operation.
4. The method of claim 3, wherein the bookmark update operation or the form update operation performed by the business system forms instruction data, and transmits the instruction data to the server for storage.
5. The method for printing the OFFICE template of the unified government service according to claim 4, wherein after the printing template is selected, the specific process of the business system performing the bookmark updating operation to form the instruction data is as follows:
a client of the business application system calls an API (application program interface) interface and sends updated bookmark contents to a server;
the server receives the updated bookmark content, calls OFFICE software to open the selected printing template, obtains a token generated by the corresponding printing template, calls the updated bookmark content and updates the printing template;
and after all bookmark updating operations are executed, processing the updated printing template to return the PNG picture of each page to the client.
6. The method for printing OFFICE templates of the unified government service according to claim 4, wherein after the printing templates are selected, the specific process of the business system performing the form updating operation to form the instruction data comprises:
a client of the service application system calls an API (application program interface) interface and sends updated table contents to a server;
the server receives the updated table content, calls OFFICE software to open the selected printing template, obtains a token generated by the corresponding printing template, calls the updated table content and updates the printing template;
and after all the form updating operations are executed, processing the updated printing template to return the PNG picture of each page to the client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110511094.9A CN113238721B (en) | 2021-05-11 | 2021-05-11 | OFFICE template printing method for unified government affairs service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110511094.9A CN113238721B (en) | 2021-05-11 | 2021-05-11 | OFFICE template printing method for unified government affairs service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113238721A CN113238721A (en) | 2021-08-10 |
CN113238721B true CN113238721B (en) | 2022-10-04 |
Family
ID=77133343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110511094.9A Active CN113238721B (en) | 2021-05-11 | 2021-05-11 | OFFICE template printing method for unified government affairs service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113238721B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114281276A (en) * | 2021-12-06 | 2022-04-05 | 浪潮软件股份有限公司 | Service document printing method and device and computer readable medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104571977A (en) * | 2014-12-05 | 2015-04-29 | 北京赛德高科铁道电气科技有限责任公司 | Report printing method and system based on HTML (Hyper Text Markup Language) template |
CN106201375A (en) * | 2016-07-01 | 2016-12-07 | 浪潮通用软件有限公司 | Websocket-based network sharing printing control method |
CN108170385A (en) * | 2017-12-27 | 2018-06-15 | 浪潮金融信息技术有限公司 | Stencil marking method and system, computer readable storage medium, terminal |
CN110865775A (en) * | 2019-09-26 | 2020-03-06 | 福建亿能达信息技术股份有限公司 | Printing method for online design and preview based on WEB |
CN111324317A (en) * | 2020-02-18 | 2020-06-23 | 上海东普信息科技有限公司 | Local printing method, device, equipment and storage medium |
CN112486429A (en) * | 2020-11-26 | 2021-03-12 | 四川长虹电器股份有限公司 | Method for automatically configuring printer by terminal |
CN112486437A (en) * | 2020-12-18 | 2021-03-12 | 武汉点石互动网络科技有限公司 | Method for printing in Web application by cross-platform and cross-browser |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112488660A (en) * | 2020-12-11 | 2021-03-12 | 浪潮云信息技术股份公司 | Electronic example display device applied to government field |
-
2021
- 2021-05-11 CN CN202110511094.9A patent/CN113238721B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104571977A (en) * | 2014-12-05 | 2015-04-29 | 北京赛德高科铁道电气科技有限责任公司 | Report printing method and system based on HTML (Hyper Text Markup Language) template |
CN106201375A (en) * | 2016-07-01 | 2016-12-07 | 浪潮通用软件有限公司 | Websocket-based network sharing printing control method |
CN108170385A (en) * | 2017-12-27 | 2018-06-15 | 浪潮金融信息技术有限公司 | Stencil marking method and system, computer readable storage medium, terminal |
CN110865775A (en) * | 2019-09-26 | 2020-03-06 | 福建亿能达信息技术股份有限公司 | Printing method for online design and preview based on WEB |
CN111324317A (en) * | 2020-02-18 | 2020-06-23 | 上海东普信息科技有限公司 | Local printing method, device, equipment and storage medium |
CN112486429A (en) * | 2020-11-26 | 2021-03-12 | 四川长虹电器股份有限公司 | Method for automatically configuring printer by terminal |
CN112486437A (en) * | 2020-12-18 | 2021-03-12 | 武汉点石互动网络科技有限公司 | Method for printing in Web application by cross-platform and cross-browser |
Also Published As
Publication number | Publication date |
---|---|
CN113238721A (en) | 2021-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111176752B (en) | Method and device for embedding window applet in browser page | |
US10120847B2 (en) | Methods for transforming requests for web content and devices thereof | |
US7190467B2 (en) | Print option configurations specific to a service or device for printing in a distributed environment | |
US7865890B2 (en) | Electronic apparatus, a network apparatus, a management method, a software updating method, a management program, a software updating program, and a recording medium | |
US7191448B2 (en) | Web based imaging page redirector system for accessing a redirector reference that directs a browser to a redirector software | |
CN110730208A (en) | Local device calling method and device, storage medium and device | |
IL156525A (en) | Method and system of fulfilling request for information from a network client | |
JP2004318842A (en) | Webpage generation device, embedding device, method for control of webpage generation, webpage generation program, and recording medium | |
US20030030837A1 (en) | Variable data printing with web based imaging | |
CN105117469A (en) | Method and apparatus for personalized replacement of webpage theme | |
US20030112460A1 (en) | Method for accessing imaging information on a demand basis using web based imaging | |
CN113238721B (en) | OFFICE template printing method for unified government affairs service | |
CN104093075A (en) | Portal page updating method and system | |
WO2016005885A2 (en) | Asynchronous initialization of document object model (dom) modules | |
US20190332641A1 (en) | Generating rich digital documents from limited instructional data | |
US8223373B2 (en) | Image editing pipelines for automatic editing and printing of online images | |
US20050024355A1 (en) | Selecting items displayed on respective areas on a screen | |
WO2016005884A2 (en) | Javascript-based, client-side template driver system | |
CN111309320A (en) | Method and system for customizing home page interface | |
US6944868B2 (en) | Imaging extension API for isolating web content from user resources and services | |
US7062752B2 (en) | Method, system and program product for multi-profile operations and expansive profile operation | |
CN113360100B (en) | Data printing method and printing management system | |
JP7056310B2 (en) | How to set up the application program and download server | |
US7889374B2 (en) | System and method for routing electronic documents for processing via transient e-mail addressing | |
CN106126663B (en) | Page aggregation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information |
Address after: 271000 Langchao science and Technology Park, 527 Dongyue street, Tai'an City, Shandong Province Applicant after: INSPUR SOFTWARE Co.,Ltd. Address before: No. 1036, Shandong high tech Zone wave road, Ji'nan, Shandong Applicant before: INSPUR SOFTWARE Co.,Ltd. |
|
CB02 | Change of applicant information | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |