CN111552447B - Printing method and system - Google Patents

Printing method and system Download PDF

Info

Publication number
CN111552447B
CN111552447B CN202010360091.5A CN202010360091A CN111552447B CN 111552447 B CN111552447 B CN 111552447B CN 202010360091 A CN202010360091 A CN 202010360091A CN 111552447 B CN111552447 B CN 111552447B
Authority
CN
China
Prior art keywords
template
printing
page
custom
data
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
Application number
CN202010360091.5A
Other languages
Chinese (zh)
Other versions
CN111552447A (en
Inventor
孙波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010360091.5A priority Critical patent/CN111552447B/en
Publication of CN111552447A publication Critical patent/CN111552447A/en
Application granted granted Critical
Publication of CN111552447B publication Critical patent/CN111552447B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page
    • G06F3/1243Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management

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)
  • Record Information Processing For Printing (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention provides a printing method and a printing system, wherein the method comprises the following steps: acquiring template parameters and printing data corresponding to the business to be transacted; constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters; and generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. In the scheme, when the business is transacted for the client, the template parameters and the printing data corresponding to the business to be transacted are acquired, and the custom printing template corresponding to the business to be transacted is constructed according to the template parameters and the template default parameters. And generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. And generating custom printing templates corresponding to different business scenes according to template default parameters and template parameters corresponding to different business scenes, and improving the universality and flexibility of the custom printing templates.

Description

Printing method and system
Technical Field
The invention relates to the technical field of data processing, in particular to a printing method and a printing system.
Background
At present, when a bank handles business for a client, credentials are printed for the client based on a fixed printing template. However, with the increase of business scenes, the fixed printing templates cannot meet the printing requirements of certain scenes, for example, for the silver-insurance transaction scenes, the data format and the position of each insurance company to be printed are different, and the fixed printing templates cannot be used. Therefore, the current printing methods using a fixed printing template have poor versatility and flexibility.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a printing method and system, so as to solve the problems of poor versatility and poor flexibility existing in the current printing method.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
an embodiment of the invention discloses a printing method, which comprises the following steps:
acquiring template parameters and printing data corresponding to the business to be transacted;
constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters;
and generating a final printed page of the to-be-handled business by utilizing the printing data and the custom printing template.
Preferably, the constructing the custom printing template corresponding to the to-be-handled service according to the template parameter and the preset template default parameter includes:
judging whether the parameter value of the template parameter is a null value or not;
if the parameter value of the template parameter is a null value, determining that the actual parameter of the template of the custom printing template is a default parameter of the preset template;
if the parameter value of the template parameter is not a null value, determining that the template actual parameter of the custom printing template is the template parameter;
and constructing the custom printing template according to the actual parameters of the template.
Preferably, the generating, by using the print data and the custom print template, a final print page of the to-be-handled service includes:
determining the initial position of the printing data written into the custom printing template by using template actual parameters corresponding to the custom printing template;
writing the printing data into the custom printing template according to the initial position, wherein in the process of writing the printing data into the custom printing template, if the preset line feed condition is met, line feed writing processing is executed, and if the preset page feed condition is met, page feed writing processing is executed;
and determining the custom printing templates written with all the printing data as final printing pages of the to-be-handled business.
Preferably, after the final printed page of the to-be-handled business is generated by using the print data and the custom print template, the method further includes:
and sending a printing instruction containing the final printing page to a printer.
A second aspect of an embodiment of the present invention discloses a printing system, the system comprising:
the acquisition unit is used for acquiring template parameters and printing data corresponding to the to-be-handled business;
the construction unit is used for constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters;
and the generating unit is used for generating a final printed page of the to-be-handled business by utilizing the printing data and the custom printing template.
Preferably, the construction unit includes:
the judging module is used for judging whether the parameter value of the template parameter is a null value, if the parameter value of the template parameter is a null value, executing the first determining module, and if the parameter value of the template parameter is not a null value, executing the second determining module;
the first determining module is used for determining that the actual template parameters of the custom printing template are preset default template parameters;
the second determining module is used for determining the template actual parameters of the custom printing template as the template parameters;
and the construction module is used for constructing the custom printing template according to the template actual parameters.
Preferably, the generating unit includes:
the first determining module is used for determining the initial position of the printing data written into the custom printing template by utilizing the template actual parameters corresponding to the custom printing template;
the writing module is used for writing the printing data into the custom printing template according to the initial position, wherein in the process of writing the printing data into the custom printing template, if the preset line feed condition is met, line feed writing processing is executed, and if the preset page feed condition is met, page feed writing processing is executed;
and the second determining module is used for determining the custom printing templates written with all the printing data as the final printing page of the to-be-handled business.
Preferably, the system further comprises:
and the sending unit is used for sending the printing instruction containing the final printing page to the printer.
Based on the printing method and system provided by the embodiment of the invention, the method comprises the following steps: acquiring template parameters and printing data corresponding to the business to be transacted; constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters; and generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. In the scheme, when the business is transacted for the client, the template parameters and the printing data corresponding to the business to be transacted are acquired, and the custom printing template corresponding to the business to be transacted is constructed according to the template parameters and the template default parameters. And generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. And generating custom printing templates corresponding to different business scenes according to template default parameters and template parameters corresponding to different business scenes, and improving the universality and flexibility of the custom printing templates.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a printing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of generating a final printed page provided by an embodiment of the present invention;
FIG. 3 is another flow chart of a printing method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a printing system according to an embodiment of the present invention;
FIG. 5 is another block diagram of a printing system according to an embodiment of the present invention;
FIG. 6 is a block diagram of a printing system according to an embodiment of the present invention;
fig. 7 is a block diagram of a printing system according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
According to the background technology, when a bank handles business for a client, credentials are printed for the client based on a fixed printing template, but with the increase of business scenes, the fixed printing template cannot meet the printing requirements of certain scenes, and the current printing mode is poor in universality and flexibility.
Therefore, the embodiment of the invention provides a printing method and a printing system, which construct custom printing templates corresponding to different business scenes according to default parameters of the templates and template parameters corresponding to the different business scenes so as to improve the universality and the flexibility of the custom printing templates.
Referring to fig. 1, a flowchart of a printing method provided by an embodiment of the present invention is shown, where the printing method includes:
step S101: and acquiring template parameters and printing data corresponding to the business to be transacted.
The template parameters include, but are not limited to, word size, margin, line height, page length, and the like. The font size is a parameter for indicating the size of a print element, and is generally classified into a large size, a medium size, a small size, and a custom parameter. The margins are the left margin and the top margin of the printing template corresponding to the printing element distance. The line height indicates the height of a row of print elements in the print template. The page length is the height (page height) and width (page width) of a sheet of paper to be printed.
In the specific implementation process of step S101, when a service is transacted for a client, template parameters and print data corresponding to the service to be transacted are obtained according to an actual service scenario.
It can be understood that, according to an actual service scenario, template parameters corresponding to the service to be transacted, such as the size of the custom word size, the numerical value of the custom margin, the numerical value of the custom line height and the numerical value of the custom page length, can be set.
Step S102: and constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters.
It should be noted that, as can be seen from the foregoing, the template parameters corresponding to the business to be transacted can be customized according to the actual business scenario, and default values (called template default parameters) of each template parameter are preset, for example: the default value of the word size is set to medium, the default value of the margin is set to left margin 300 (3 cm) and top margin 500 (5 cm), the default value of the line height is set to 50 (5 mm), and the default value of the page length is set to height 2700 (27 cm) and width 2100 (21 cm).
In the specific implementation process of step S102, when a custom printing template corresponding to the to-be-handled business is constructed, the actual parameters of the template corresponding to the custom printing template need to be determined, the custom printing template is constructed according to the actual parameters of the template, and the specific process of determining the actual parameters of the template is as follows:
judging whether the parameter value of the template parameter is a null value, if the parameter value of the template parameter is the null value, determining that the actual parameter of the template of the custom printing template is a default parameter of the preset template, and if the parameter value of the template parameter is not the null value, determining that the actual parameter of the template of the custom printing template is the template parameter.
That is, if the parameter value of the acquired template parameter (custom template parameter) is a null value, the template default parameter is taken as the template actual parameter of the custom printing template, and if the parameter value of the acquired template parameter is not a null value, the template parameter is taken as the template actual parameter of the custom printing template.
Such as: if the obtained parameter value of the font size (custom font size) is a null value, determining that the default font size is the actual font size of the custom printing template, and if the obtained parameter value of the font size is not a null value, determining that the font size is the actual font size of the custom printing template.
If the obtained parameter value of the margin (custom margin) is a null value, determining that the default margin is an actual margin of the custom printing template, and if the obtained parameter value of the margin is not a null value, determining that the margin is an actual margin of the custom printing template.
If the obtained parameter value of the line height (custom line height) is a null value, determining that the default line height is the actual line height of the custom printing template, and if the obtained parameter value of the line height is not a null value, determining that the line height is the actual line height of the printing template.
If the obtained parameter value of the page length (the custom page length) is a null value, determining that the default page length is the actual page length of the custom printing template, and if the obtained parameter value of the page length is not a null value, determining that the page length is the actual page length of the printing template.
Step S103: and generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template.
In the specific implementation step S103, after the custom print template is built, the print data is written into the custom print template, and a final print page of the service to be transacted is generated.
Preferably, after the final print page is generated, a print instruction including the final print page is sent to the printer, so that the printer prints the final print page.
In the embodiment of the invention, the template parameters and the printing data corresponding to the business to be transacted are acquired, and the custom printing template corresponding to the business to be transacted is constructed according to the template parameters and the default parameters of the template. And generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. And generating custom printing templates corresponding to different business scenes according to template default parameters and template parameters corresponding to different business scenes, and improving the universality and flexibility of the custom printing templates.
The process of generating the final printed page referred to in step S103 of fig. 1 in the above embodiment of the present invention, referring to fig. 2, shows a flowchart of generating the final printed page provided in the embodiment of the present invention, including the steps of:
step S201: and determining the initial position of the printing data written into the custom printing template by using the template actual parameters corresponding to the custom printing template.
It will be appreciated that during printing, the start position of printing can be determined from the left margin (leftMargin) and the top margin (topMargin).
That is, in the process of embodying step S201, the initial position of the print data written into the custom print template is determined using the actual margins (the actual left margin and the actual top margin) corresponding to the custom print template, and the print data is written into the custom print template from the initial position.
Step S202: and writing the printing data into the custom printing template according to the initial position.
In the specific implementation step S202, the print data is written into the custom print template from the initial position, and in the process of writing the print data into the custom print template, if the preset line feed condition is met, the line feed writing process is executed, and if the preset page feed condition is met, the line feed writing process is executed.
The preset line feed condition refers to: in writing print data to the custom print template, a line is wrapped if a line wrap identifier (e.g., "\n") occurs.
In writing print data into the custom print template, if the actual left margin (leftMargin) +data length (dataNum) ×actual font size) > width in actual page length (pageWidth), the line feed writing process is performed.
The line number value (lineNum) corresponding to the line number is increased by 1 each time the line feed writing process is performed, wherein the initial value of the line number value is 1.
The preset page change condition refers to: in the process of writing the print data into the custom print template, the total length of the data page (total page size) is calculated, and the calculation process of the total length of the data page is as in formula (1).
total pagesize=linenum+actual top margin (topMargin) (1)
When the total pagesize is greater than the height (pageHeight) in the actual page length, a wrap writing process is performed.
The page number value (pageNum) corresponding to the number of pages is self-increased by 1 each time the page change writing process is executed, wherein the initial value of the page number value is 1.
It will be appreciated that after performing the page change writing process, the total length of the data page (referred to as a new total length) is calculated again, and the calculation of the new total length of the data page is as in equation (2).
total pagesize (new total length) =total pagesize (total length obtained last) - (pageHeight-topmagin) (2)
And comparing the new total length of the data page with the height in the actual page length again, if the new total length of the data page is larger than the height in the actual page length, executing the line feed writing processing, and continuing to execute the content in the formula (2) until the total length of the data page is smaller than (pageHeight-topmap).
By the method, the printing data are written into the custom printing templates, the custom printing templates written with all the printing data are determined to be the final printing page (including one or more data pages) of the to-be-handled business, and the content and the format of each data page of the final printing page can be determined.
Step S203: and determining the custom printing templates written with all the printing data as the final printing page of the to-be-handled business.
In the specific implementation process of step S203, all the print data are written into the custom print template through the content in step S202, so as to obtain the final print page of the to-be-handled business.
Preferably, it will be appreciated that, when transacting business for a client, for some business scenarios, a custom printing template corresponding to the business scenario needs to be customized through the content in fig. 1 in the embodiment of the present invention. For some business scenes, a fixed printing template can be directly acquired to carry out a printing flow.
Thus, referring to fig. 3, another flowchart of a printing method provided by an embodiment of the present invention is shown, the printing method comprising the steps of:
step S301: and obtaining a printing identifier and printing data corresponding to the business to be transacted.
Note that, the print flag is used to indicate: and customizing a custom printing template corresponding to the business scene, or directly acquiring a fixed printing template.
Step S302: the type of print identifier is determined. If the type of the print flag is "template", step S303 is executed, and if the type of the print flag is "xml_ibas", step S305 is executed.
Step S303: a fixed print template is obtained.
Step S304: the print data is combined with a fixed print template to generate a final printed page.
Step S305: and obtaining template parameters corresponding to the business to be transacted.
Step S306: and constructing the custom printing template by using the template parameters and the template default parameters.
Step S307: and combining the printing data with a custom printing template to generate a final printing page.
It can be understood that, for the specific content of combining the print data with the custom print template, reference may be made to the content in fig. 1 and fig. 2 in the above embodiment of the present invention, and no further description is given here.
In the embodiment of the invention, the fixed printing template or the custom printing template corresponding to the business scene is determined and acquired according to the requirement of the business scene, and the printing data is combined with the fixed printing template or the custom printing template to generate the final printing page, so that the universality and the flexibility of the printing mode are improved.
Corresponding to the printing method provided by the embodiment of the present invention, referring to fig. 4, the embodiment of the present invention further provides a structural block diagram of a printing system, where the printing system includes: an acquisition unit 401, a construction unit 402, and a generation unit 403;
the obtaining unit 401 is configured to obtain template parameters and print data corresponding to the to-be-handled service.
The construction unit 402 is configured to construct a custom print template corresponding to the to-be-handled service according to the template parameter and a preset default template parameter.
A generating unit 403, configured to generate a final printed page of the service to be transacted by using the print data and the custom print template.
In the embodiment of the invention, the template parameters and the printing data corresponding to the business to be transacted are acquired, and the custom printing template corresponding to the business to be transacted is constructed according to the template parameters and the default parameters of the template. And generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. And generating custom printing templates corresponding to different business scenes according to template default parameters and template parameters corresponding to different business scenes, and improving the universality and flexibility of the custom printing templates.
Preferably, referring to fig. 5 in conjunction with fig. 4, another block diagram of a printing system provided by an embodiment of the present invention is shown, and the construction unit 402 includes: a judgment module 4021, a first determination module 4022, a second determination module 4023, and a construction module 4024;
the determining module 4021 is configured to determine whether the parameter value of the template parameter is a null value, execute the first determining module 4022 if the parameter value of the template parameter is a null value, and execute the second determining module 4023 if the parameter value of the template parameter is not a null value.
The first determining module 4022 is configured to determine that the template actual parameter of the custom print template is a preset default template parameter.
The second determining module 4023 is configured to determine that the template actual parameter of the custom printing template is a template parameter.
The construction module 4024 is configured to construct a custom printing template according to the template actual parameters.
Preferably, referring to fig. 6 in conjunction with fig. 4, there is shown a further block diagram of a printing system provided in an embodiment of the present invention, and the generating unit 403 includes: a first determination module 4031, a writing module 4032, and a second determination module 4033;
the first determining module 4031 is configured to determine an initial position of the print data written into the custom print template by using the template actual parameter corresponding to the custom print template.
The writing module 4032 is configured to write the print data into the custom print template according to the initial position, wherein in the process of writing the print data into the custom print template, if the preset line feed condition is met, the line feed writing process is performed, and if the preset page feed condition is met, the line feed writing process is performed.
The second determining module 4033 is configured to determine that the custom print templates written with all the print data are final print pages of the to-be-handled business.
Preferably, referring to fig. 7 in conjunction with fig. 4, there is shown a further block diagram of a printing system according to an embodiment of the present invention, where the printing system further includes:
a transmitting unit 404 for transmitting a print instruction including the final print page to the printer.
In summary, the embodiment of the invention provides a printing method and a printing system, wherein the method comprises the following steps: acquiring template parameters and printing data corresponding to the business to be transacted; constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters; and generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. In the scheme, when the business is transacted for the client, the template parameters and the printing data corresponding to the business to be transacted are acquired, and the custom printing template corresponding to the business to be transacted is constructed according to the template parameters and the template default parameters. And generating a final printed page of the business to be transacted by utilizing the printing data and the custom printing template. And generating custom printing templates corresponding to different business scenes according to template default parameters and template parameters corresponding to different business scenes, and improving the universality and flexibility of the custom printing templates.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (4)

1. A method of printing, the method comprising:
acquiring template parameters and printing data corresponding to the business to be transacted;
constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters, wherein the custom printing template comprises: judging whether the parameter value of the template parameter is a null value or not; if the parameter value of the template parameter is a null value, determining that the actual parameter of the template of the custom printing template is a default parameter of the preset template; if the parameter value of the template parameter is not a null value, determining that the template actual parameter of the custom printing template is the template parameter; constructing the custom printing template according to the actual parameters of the template;
generating a final printed page of the to-be-handled business by using the print data and the custom print template, wherein the final printed page comprises: determining the initial position of the printing data written into the custom printing template by using the actual left margin and the actual top margin of the template corresponding to the custom printing template; writing the printing data into the custom printing template from the initial position according to the initial position, and in the process of writing the printing data into the custom printing template, if a line feed identifier appears, line feed is performed, and if the actual left margin plus the data length multiplied by the actual word size is larger than the width in the actual page length, line feed writing processing is performed; if the total length of the data page is greater than the height in the actual page length, performing page-changing writing processing, calculating the new total length of the data page after the page-changing writing processing is performed, comparing the new total length of the data page with the height in the actual page length, and if the new total length of the data page is greater than the height in the actual page length, continuing performing page-changing writing processing, and recalculating the total length of the data page until the total length of the data page is less than the height in the actual page length; and determining the custom printing templates written with all the printing data as final printing pages of the to-be-handled business.
2. The method of claim 1, wherein after generating the final printed page of the to-Do business using the print data and the custom print template, further comprising:
and sending a printing instruction containing the final printing page to a printer.
3. A printing system, the system comprising:
the acquisition unit is used for acquiring template parameters and printing data corresponding to the to-be-handled business;
the construction unit is used for constructing a custom printing template corresponding to the to-be-handled business according to the template parameters and preset template default parameters;
the construction unit includes: the device comprises a judging module, a first determining module, a second determining module and a constructing module;
the judging module is used for judging whether the parameter value of the template parameter is a null value, if the parameter value of the template parameter is a null value, the first determining module executes the operation, and if the parameter value of the template parameter is not a null value, the second determining module executes the operation;
the first determining module is used for determining that the actual template parameters of the custom printing template are preset default template parameters;
the second determining module is used for determining the template actual parameters of the custom printing template as the template parameters;
the construction module is used for constructing the custom printing template according to the actual parameters of the template;
the generating unit is used for generating a final printed page of the to-be-handled business by utilizing the printing data and the custom printing template;
the generation unit includes: the writing module is used for writing the first data into the first memory;
the third determining module is configured to determine, by using an actual left margin and an actual top margin of a template corresponding to the custom printing template, an initial position where the print data is written into the custom printing template;
the writing module is used for writing the printing data into the custom printing template from the initial position according to the initial position, and in the process of writing the printing data into the custom printing template, if a line feed identifier appears, line feed is performed, and if the actual left margin plus the data length multiplied by the actual word size is larger than the width in the actual page length, line feed writing processing is performed; if the total length of the data page is greater than the height in the actual page length, performing page-changing writing processing, calculating the new total length of the data page after the page-changing writing processing is performed, comparing the new total length of the data page with the height in the actual page length, and if the new total length of the data page is greater than the height in the actual page length, continuing performing page-changing writing processing, and recalculating the total length of the data page until the total length of the data page is less than the height in the actual page length;
the fourth determining module is configured to determine that the custom printing templates written with all the printing data are final printing pages of the to-be-handled business.
4. A system according to claim 3, wherein the system further comprises:
and the sending unit is used for sending the printing instruction containing the final printing page to the printer.
CN202010360091.5A 2020-04-30 2020-04-30 Printing method and system Active CN111552447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010360091.5A CN111552447B (en) 2020-04-30 2020-04-30 Printing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010360091.5A CN111552447B (en) 2020-04-30 2020-04-30 Printing method and system

Publications (2)

Publication Number Publication Date
CN111552447A CN111552447A (en) 2020-08-18
CN111552447B true CN111552447B (en) 2024-01-30

Family

ID=72004310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010360091.5A Active CN111552447B (en) 2020-04-30 2020-04-30 Printing method and system

Country Status (1)

Country Link
CN (1) CN111552447B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116521101A (en) * 2022-01-24 2023-08-01 荣耀终端有限公司 Picture printing method, electronic device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607880A (en) * 2015-12-29 2016-05-25 南威软件股份有限公司 Printing method and device for examined and approved documents
CN105631738A (en) * 2015-12-30 2016-06-01 中国建设银行股份有限公司 Standard inputting and storing system for accountant document template
CN106933518A (en) * 2015-12-29 2017-07-07 口碑控股有限公司 A kind of printing equipment and Method of printing
CN110851092A (en) * 2019-11-15 2020-02-28 厦门商集网络科技有限责任公司 Customized printing method and system based on printing template under B/S framework
CN111045615A (en) * 2019-12-19 2020-04-21 厦门商集网络科技有限责任公司 Method and system for printing JS template customized at browser end

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110173529A1 (en) * 2010-01-11 2011-07-14 Microsoft Corporation Template processing engine for business systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607880A (en) * 2015-12-29 2016-05-25 南威软件股份有限公司 Printing method and device for examined and approved documents
CN106933518A (en) * 2015-12-29 2017-07-07 口碑控股有限公司 A kind of printing equipment and Method of printing
CN105631738A (en) * 2015-12-30 2016-06-01 中国建设银行股份有限公司 Standard inputting and storing system for accountant document template
CN110851092A (en) * 2019-11-15 2020-02-28 厦门商集网络科技有限责任公司 Customized printing method and system based on printing template under B/S framework
CN111045615A (en) * 2019-12-19 2020-04-21 厦门商集网络科技有限责任公司 Method and system for printing JS template customized at browser end

Also Published As

Publication number Publication date
CN111552447A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
US8089644B2 (en) Image-processing device, recording medium, and method
CN110399108B (en) Voucher printing processing method and device
US20150161487A1 (en) Print service providing apparatus and printing system
CN111596869B (en) Printing data typesetting method and device, printer and storage medium
JP4193137B2 (en) Printing system, printing management apparatus, printing program, and computer-readable recording medium
JP6536009B2 (en) Print job correction method and system
CN111552447B (en) Printing method and system
US8743412B2 (en) Printing device which prints first object and second object on the same page
CN115617283A (en) Data source printing method and device, electronic equipment and storage medium
CN109960476A (en) A kind of electronic invoice Method of printing, equipment and system
CN105189130A (en) System and method for printing
KR101277003B1 (en) Print control apparatus and print control method
JP5885702B2 (en) Image forming apparatus and web page language adding method
CN106293553B (en) Method of cutting out and device, the storage medium and processor of drawing
CN113934385A (en) Electronic certificate generation method and device and bank counter business system
CN105027072A (en) Method and system for generating a print job
CN113400800B (en) Printing and amplifying processing method and system
CN113448522B (en) Variable data printing output method and device, terminal equipment and readable storage medium
JP2010128574A (en) Image forming apparatus, detection program of divided character string, and joint program of character string
US20150347071A1 (en) Print management apparatus, image forming system, and non-transitory computer readable medium
JP6729234B2 (en) Image processing apparatus, printing system, and image processing method
JP4917560B2 (en) Image forming apparatus and control method thereof
CN115495029A (en) Self-adaptive adjusting method and device for printer, electronic equipment and readable storage medium
JP6390283B2 (en) Information processing apparatus and program
JP4803065B2 (en) PRINT CONTROL SYSTEM, PRINT CONTROL METHOD, PRINT CONTROL PROGRAM, PRINT SYSTEM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant