Printing method, device, equipment, medium and program product
By obtaining the file categories and multiple sets of print data in the printing request, matching the corresponding printing templates and analyzing the segmentation marks in the bookmarks, the problems of cumbersome and inefficient printing operations in the prior art are solved, and efficient and accurate printing effects are achieved.
Patent Information
- Application Number
- CN202411670462.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The existing printing technology is cumbersome, inefficient, and prone to errors. Especially when printing files in batches, manually adjusting the position and format of data fields is time-consuming and prone to errors.
By obtaining the file category and multiple sets of print data in the print request, matching the corresponding print template, using the split mark in the bookmark to parse the field type, and inserting the print data accurately into the target position.
Improves the efficiency, accuracy and flexibility of file printing, reduces manual adjustment errors, and is suitable for complex and diverse printing needs.
Smart Images

Figure CN119620966A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data technology, and in particular to a printing method, device, equipment, medium and program product. Background Art
[0002] In existing printing technologies, when users need to print out files, they usually need to import the file content into specific printing software, and then manually adjust the file format and layout according to the printing requirements. This method is not only cumbersome and inefficient, but also prone to errors. Especially for files that need to be printed in batches, such as forms, tickets, reports, etc., each file may contain multiple different data fields. Manually adjusting the position and format of each field is a time-consuming and error-prone task, and the printing results are often unsatisfactory. Summary of the invention
[0003] In view of the above problems, the present disclosure provides a printing method, apparatus, device, medium and program product for improving the efficiency, accuracy and flexibility of document printing.
[0004] According to the first aspect of the present disclosure, a printing method is provided, comprising: obtaining a first parameter and a second parameter in a received printing request, the first parameter being used to indicate a file category of a file to be printed, and the second parameter being used to indicate multiple groups of print data in the file to be printed; obtaining a printing template matching the file category, at least one target position in the printing template being configured with a bookmark, the bookmark being used to indicate a field type corresponding to the target position, the field type comprising one of a text type, an option type, and a grid single-character fill type, and at least one segmentation mark being provided in each bookmark, the segmentation mark being used to segment the corresponding bookmark into different components, the components being used to characterize at least a field name and a field type of the bookmark; parsing each bookmark according to the segmentation mark to determine the field type of the target position corresponding to each bookmark; and inserting each group of print data in the multiple groups of print data into the corresponding target position according to the field type corresponding to each bookmark.
[0005] According to an embodiment of the present disclosure, the print template is in an editable document format; before parsing each bookmark, it also includes: loading the print template in the editable document format to obtain an object instance of the print template; in the object instance, traversing the paragraphs and / or tables of the print template to obtain each bookmark.
[0006] According to an embodiment of the present disclosure, each bookmark is parsed according to the segmentation mark, and the field type of the target position corresponding to each bookmark is determined, including: identifying the segmentation mark in the bookmark to determine the components of each bookmark; and performing feature information inspection on each component to determine the field type of each bookmark.
[0007] According to an embodiment of the present disclosure, a bookmark includes a first bookmark to be parsed; parsing each bookmark to determine the field type of the target position corresponding to each bookmark includes: segmenting the first bookmark to be parsed according to the segmentation mark to obtain a first component; when the first component consists of a field name, a print count and a text field type, and the print count is a positive integer, determining the first bookmark to be parsed as a text type bookmark.
[0008] According to an embodiment of the present disclosure, inserting each group of print data in multiple groups of print data into a corresponding target position according to the field type corresponding to each bookmark includes: obtaining the style of a text type bookmark, the style representing the format of the font and font size; and inserting the characters to be inserted of the print data into the print position of the text type bookmark in the style.
[0009] According to an embodiment of the present disclosure, the bookmark includes a second bookmark to be parsed; parsing each bookmark to determine the field type of the target position corresponding to each bookmark includes: segmenting the second bookmark to be parsed according to the segmentation mark to obtain a second component; when the second component consists of a field name, a print count, a check box field type, and a dictionary value, and the print count is a positive integer, determining the second bookmark to be parsed as an option type bookmark.
[0010] According to an embodiment of the present disclosure, inserting each group of print data in multiple groups of print data into a corresponding target position according to the field type corresponding to each bookmark includes: obtaining the style of the option type bookmark, the style representing the format of the font and the font size; wrapping the option mark characters in the print data with a circle mark; and inserting the wrapped option mark characters into the print position of the option type bookmark in the style.
[0011] According to an embodiment of the present disclosure, the bookmark includes a third bookmark to be parsed; parsing each bookmark to determine the field type of the target position corresponding to each bookmark includes: segmenting the third bookmark to be parsed according to the segmentation mark to obtain a third component; when the third component consists of a field name, a number of prints, a character fill field type and a format serial number, and the number of prints and the grid serial number are both positive integers, the third bookmark to be parsed is determined to be a grid single character fill type bookmark.
[0012] According to an embodiment of the present disclosure, inserting each group of print data in multiple groups of print data into a corresponding target position according to the field type corresponding to each bookmark includes: obtaining the style of a grid single-character fill type bookmark, the style representing the format of the font and the font size; wrapping the characters to be inserted in the print data with circle marks; and inserting the wrapped characters to be inserted into the print position of the grid single-character fill type bookmark in the style.
[0013] The second aspect of the present disclosure provides a printing device, including: a first acquisition module, used to acquire a first parameter and a second parameter in a received print request, the first parameter is used to indicate the file category of the file to be printed, and the second parameter is used to indicate multiple groups of print data in the file to be printed; a second acquisition module, used to acquire a print template that matches the file category, at least one target position in the print template is configured with a bookmark, the bookmark is used to indicate the field type corresponding to the target position, the field type includes one of a text type, an option type and a grid single character fill type, and each bookmark is provided with at least one segmentation mark, the segmentation mark is used to segment the corresponding bookmark into different components, and the components are at least used to characterize the field name and field type of the bookmark; a parsing module, used to parse each bookmark according to the segmentation mark, and determine the field type of the target position corresponding to each bookmark; an insertion module, used to insert each group of print data in the multiple groups of print data into the corresponding target position according to the field type corresponding to each bookmark.
[0014] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0015] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0016] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0017] Based on the above, the corresponding print template is obtained according to the file category. By parsing the bookmarks pre-configured in the print template, the corresponding field type of the print position can be identified, so that the print data can be accurately inserted into the corresponding print position, which can avoid errors that may be caused by manual data entry and improve printing efficiency and accuracy. The template can be configured according to the file category and pre-configured with bookmarks. These bookmarks can indicate the field type of the target location, such as text type, option type, and grid single character fill type, so that the user can flexibly adjust the layout and data fields of the print template according to actual needs, which is suitable for complex and diverse printing needs. Through the segmentation marks set in the bookmarks, the system can parse the content of the bookmark into multiple logically independent components, so that it is easier to process and understand the structure of the bookmark, improve the accuracy and efficiency of identifying the bookmark content, and further improve the accuracy and efficiency of printing. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0019] Figure 1 The application scenario diagram of the printing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown;
[0020] Figure 2 A flowchart of a printing method according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of a voucher printing method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 4 A diagram schematically showing a text type bookmark structure diagram according to an embodiment of the present disclosure;
[0023] Figure 5 Schematically shows an option type bookmark structure diagram according to an embodiment of the present disclosure;
[0024] Figure 6 The structure diagram of a grid single character filling type bookmark according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 7 A flowchart of bookmark parsing according to an embodiment of the present disclosure is schematically shown;
[0026] Figure 8 A schematic diagram of a structure of a printing device according to an embodiment of the present disclosure is shown; and
[0027] Fig. 9 A block diagram of an electronic device suitable for implementing a printing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0031] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0032] It should be noted that the printing method and device disclosed herein can be used for data processing applications in the financial field, and can also be used for data processing applications in any field other than the financial field. The application field of the printing method and device disclosed herein is not limited.
[0033] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the applicant has or will necessarily use the solution.
[0034] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0035] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0036] An embodiment of the present disclosure provides a printing method, comprising: obtaining a first parameter and a second parameter in a received printing request, wherein the first parameter is used to indicate a file category of a file to be printed, and the second parameter is used to indicate multiple groups of printing data in the file to be printed; obtaining a printing template that matches the file category, wherein at least one target position in the printing template is configured with a bookmark, and the bookmark is used to indicate a field type corresponding to the target position, and the field type includes one of a text type, an option type, and a grid single-character fill type, and each bookmark is provided with at least one segmentation mark, and the segmentation mark is used to segment the corresponding bookmark into different components, and the components are used to characterize at least the field name and field type of the bookmark; according to the segmentation mark, parsing each bookmark to determine the field type of the target position corresponding to each bookmark; and according to the field type corresponding to each bookmark, inserting each group of printing data in the multiple groups of printing data into the corresponding target position.
[0037] Figure 1 The application scenario diagram of the printing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0038] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0039] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0040] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0041] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0042] It should be noted that the printing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the printing device provided in the embodiment of the present disclosure can generally be set in the server 105. The printing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the printing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0043] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0044] The following will be based on Figure 1 The scene described by Figure 2 The printing method of the disclosed embodiment is described in detail.
[0045] Figure 2 The flowchart of the printing method according to the embodiment of the present disclosure is schematically shown.
[0046] like Figure 2As shown, the printing method of this embodiment includes operations S210 to S240, and the transaction processing method can be executed by the server 105.
[0047] In operation S210, a first parameter and a second parameter in a received print request are acquired, wherein the first parameter is used to indicate a file category of a file to be printed, and the second parameter is used to indicate a plurality of groups of print data in the file to be printed.
[0048] The print request may come from a variety of sources, such as a network request, a local function call, or a message queue, etc. The format of the print request may be JSON, XML, or other structured data formats, which is not specifically limited in the present disclosure. Once the request is received, the request data may be parsed to extract key information, namely the first parameter and the second parameter. The file category may indicate the name of the file to be printed, such as an asset certificate, an invoice, a voucher, etc.
[0049] In operation S220, a printing template matching the file category is obtained, and at least one target position in the printing template is configured with a bookmark, which is used to indicate the field type corresponding to the target position, and the field type includes one of a text type, an option type, and a grid single-character fill type, and each bookmark is provided with at least one segmentation mark, which is used to segment the corresponding bookmark into different components, and the components are used to at least characterize the field name and field type of the bookmark.
[0050] A template library can be maintained within the system, and each template in the library is associated with one or more file categories, thereby achieving automatic matching. The print templates in the template library are indexed by file category, and templates matching the file category are searched in the template library.
[0051] Before using the template, the corresponding bookmarks need to be pre-configured in it. For example, a bookmark can be set at the printing position of the template through a graphical user interface (GUI) editing tool or through code / script, and the type, name and attributes of the bookmark can be specified. In some embodiments, the template with the bookmark configured can be tested, for example, to generate a preview and verify data filling to test the effect of the bookmark.
[0052] Bookmarks are equivalent to guidelines in the template, marking the specific location of the data to be filled. At the same time, each bookmark is associated with a specific field type to ensure accurate filling of data. In the printing template, the field types indicated by bookmarks are varied to meet the filling needs of different data. The text type can be suitable for filling text content, such as titles, paragraphs, etc. The option type can be single choice or multiple choice, which is often used to fill in certain fixed options in the form, such as gender, education and other fields in the form. The grid single character filling type can be used to fill in a single character, as well as some positions that require special character marks. Separation marks can be, for example, specific text strings, symbols or formatting marks, which are unique within the bookmark or follow certain rules so that the system can accurately identify them.
[0053] In operation S230, each bookmark is parsed to determine the field type of the target location corresponding to each bookmark.
[0054] For each bookmark, the information it contains needs to be parsed. This information may include, for example, the name, location, and field type associated with the bookmark. The field type may indicate the data type corresponding to the bookmark, such as text, options, grid single character fill, etc. Based on the parsing results of the bookmark, the field type of the target location corresponding to each bookmark may be determined. For example, this may be achieved by looking up template configuration information or metadata of the bookmark itself. Taking the text type as an example, if a bookmark is marked as a text type, then it is known that when filling in data, the location should accept a piece of text.
[0055] In operation S240, each set of print data among the plurality of sets of print data is inserted into a corresponding target position according to the field type corresponding to each bookmark.
[0056] You can extract the field values that need to be filled into the template from the print data, and insert the corresponding field values into the target position according to the identified field type. There are some differences in the insertion methods for different field types. For text types, you can directly insert the text content into the corresponding print position. For option types or grid fill types, you can process them before inserting them into the print position, so that the inserted characters are accurately positioned and the printed effect meets the requirements. The insertion of different field types will be further explained later.
[0057] Through the above-mentioned embodiment, the corresponding printing template is obtained according to the file category, and by parsing the bookmarks pre-configured in the printing template, the field type corresponding to the printing position can be identified, so that the printing data can be accurately inserted into the corresponding printing position, which can avoid errors that may be caused by manual data entry and improve the efficiency and accuracy of printing. The template can be configured according to the file category and pre-configured with bookmarks. These bookmarks can indicate the field type of the target location, such as text type, option type, and grid single character fill type, so that the user can flexibly adjust the layout and data fields of the printing template according to actual needs, which is suitable for complex and diverse printing needs. Through segmentation tags, the system can parse the content of the bookmark into multiple logically independent components, so that it is easier to process and understand the structure of the bookmark, improve the accuracy and efficiency of identifying the bookmark content, and further improve the accuracy and efficiency of printing.
[0058] Based on the above embodiment, the printing template is in an editable document format; before parsing each bookmark, the printing method may also include: loading the printing template in an editable document format to obtain an object instance of the printing template; in the object instance, traversing the paragraphs and / or tables of the printing template to obtain each bookmark.
[0059] Print templates in editable document formats can support the editing and formatting of multiple elements such as text, pictures, tables, etc., making it easy to generate and adjust templates, as well as pre-configure bookmarks. Configured print templates can be stored in a specific location, and when needed, the template file can be read from the specified path or data source. According to the format of the template file, create an object instance corresponding to it. This instance is a document object represented in memory, which can contain all the content and structure information of the template.
[0060] After loading the template and creating the object instance, you can access the document's structural information, such as the document's paragraph collection, table collection, etc., through the API or method provided by the object instance. For each paragraph or table, traverse one by one. During the traversal process, check whether each element contains a bookmark tag. When an element is detected to contain a bookmark tag, the information of this bookmark can be extracted. For each identified bookmark, for example, its name, location, and possible other attributes (such as field type, default value, etc.) can be extracted for subsequent data filling.
[0061] By loading a print template in an editable document format, traversing the paragraphs and / or tables in the template and extracting bookmark information, all bookmarks in the template can be quickly and accurately identified without the need for complex programs and identification operations, ensuring accuracy and efficiency in template processing.
[0062] Based on the above embodiment, each bookmark is parsed according to the segmentation mark to determine the field type of the target position corresponding to each bookmark, including: identifying the segmentation mark in the bookmark to determine the components of each bookmark; performing feature information inspection on each component to determine the field type of each bookmark.
[0063] Check the characteristic information of each component, such as field content, format, etc., and identify these characteristic information to help the system identify the field type of each component. Through the segmentation mark in the bookmark, the bookmark can be automatically and accurately segmented into different components, and the field type of each bookmark can be determined by checking the characteristic information. In this way, the automatic and accurate identification of the field type in the bookmark can be achieved, providing the necessary preparation for subsequent print data preparation and data filling, ensuring the accuracy and efficiency of the entire print job.
[0064] On the basis of the above embodiments, the present disclosure sets corresponding bookmarks and bookmark parsing processes for different field types. In the present disclosure, bookmarks may include first, second, and third bookmarks to be parsed, corresponding to text type, option type, and grid single character fill type. These types can basically cover the printing requirements in the file. It should be noted that in the printing template, one, two, or three of the above bookmarks may be included, and the number of bookmarks is not specifically limited.
[0065] For the first bookmark to be parsed, that is, the text type bookmark, determining the field type of the target position corresponding to each bookmark can include: segmenting the first bookmark to be parsed according to the segmentation mark to obtain the first component; when the first component consists of the field name, the number of prints and the text field type, and the number of prints is a positive integer, determining the first bookmark to be parsed as a text type bookmark.
[0066] According to the segmentation marks defined above, the first bookmark to be parsed is segmented, and each component of the first bookmark to be parsed is checked. The field name is the identifier of the bookmark, which can be used to find the corresponding value in the print data. The number of prints is the number of times the field needs to be repeated in the final printed document. This can be set as needed, for example, it can be 2, 3, 4, etc. The text field type can be realized by checking the specific mark or keyword after the field name.
[0067] By segmenting the first bookmark to be parsed and checking the content of the first component, the field name of the text type bookmark can be accurately parsed, so that the printed content can be accurately inserted into the corresponding position later. The number of prints can also be set in the bookmark, which can automatically print the same text content multiple times without manually setting the print parameters when printing, thereby improving printing efficiency.
[0068] Correspondingly, for text type bookmarks, according to the field types corresponding to each bookmark, inserting each group of print data in multiple groups of print data into the corresponding target position may include: obtaining the style of the text type bookmark, the style represents the format of the font and font size; inserting the characters to be inserted in the print data into the print position of the text type bookmark in the style.
[0069] For example, the style information of a text bookmark can be extracted from a template or bookmark definition. Such style information can usually include font type, font size, font color, bold, italic, underline and other attributes. The style can be preset when creating a template or specified when defining a bookmark. The style information can be stored in a specific part of the template file and can be associated with the bookmark through a markup language.
[0070] When inserting print data, the data can be formatted according to the extracted style information, and then the formatted data is inserted until the bookmark specifies. It should be emphasized that the insert operation can also be a replace operation, for example, replacing the original content in the bookmark with the text to be printed.
[0071] By obtaining the style information of the text type bookmark, preparing the characters to be inserted into the print data, and inserting the data into the position specified by the bookmark in the correct style, it can be ensured that the print output has a correct format and accurate content.
[0072] For the second bookmark to be parsed, that is, the option type bookmark, parsing each bookmark and determining the field type of the target position corresponding to each bookmark may include: segmenting the second bookmark to be parsed according to the segmentation mark to obtain the second component; when the second component consists of the field name, the number of prints, the check box field type and the dictionary value, and the number of prints is a positive integer, determining the second bookmark to be parsed as an option type bookmark.
[0073] The parsing process of option type bookmarks is similar to that of text type bookmarks, so we will not repeat it here. The main difference is that option type bookmarks also include check box field type and dictionary value. Check box can be a check box or a radio button. Dictionary value is used to define the specific content of the option, and dictionary value can be text, number or code, depending on the definition and usage scenario of the bookmark.
[0074] By segmenting the second bookmark to be parsed and checking the content of the second component, the field name of the option type bookmark can be accurately parsed, which facilitates the subsequent accurate insertion of the printed content into the corresponding position. The bookmark is also set with the number of prints, which can automatically print the same text content multiple times without manually setting the print parameters when printing, thereby improving printing efficiency.
[0075] Correspondingly, for option type bookmarks, according to the field types corresponding to each bookmark, inserting each group of print data in multiple groups of print data into the corresponding target position may include: obtaining the style of the option type bookmark, the style representing the format of the font and font size; wrapping the option mark characters in the print data with a circle mark; and inserting the wrapped option mark characters into the print position of the option type bookmark with the style.
[0076] The insertion process of option type bookmark is similar to that of text type bookmark, so we will not repeat it here. The main difference is that option type bookmark needs to use a circle (such as a circular circle or a square circle) to mark the option mark character of the print data, such as wrapping the symbol "√" with a square box and inserting it into the corresponding print position, or replacing the original content.
[0077] By obtaining the style information of the option type bookmark, preparing the characters to be inserted into the print data, and inserting the data into the position specified by the bookmark in the correct style, it can be ensured that the print output has a correct format and accurate content.
[0078] For the third bookmark to be parsed, that is, the grid single-character fill type bookmark, parsing each bookmark and determining the field type of the target position corresponding to each bookmark may include: segmenting the third bookmark to be parsed according to the segmentation mark to obtain the third component; when the third component consists of the field name, the number of prints, the character fill field type and the format serial number, and the number of prints and the grid serial number are both positive integers, the third bookmark to be parsed is determined to be a grid single-character fill type bookmark.
[0079] The parsing process of the single character fill type bookmark is similar to that of the text type bookmark, so I will not repeat it here. The main difference is that the single character fill type bookmark also includes the character fill field type and the format sequence number. The character fill field type indicates that this is a field type that needs to be filled with characters. It can be a specific text mark or code. The format sequence number is used to identify the specific grid position or order that needs to be filled with characters. These numbers usually correspond to the grid layout when printing or filling out forms.
[0080] By segmenting the third bookmark to be parsed and checking the content of the third component, the field name of the grid single character fill type bookmark can be accurately parsed, so that the printed content can be accurately inserted into the corresponding position of the grid single character fill type bookmark. The bookmark is also set with the number of prints, which can automatically print the same text content multiple times without manually setting the print parameters when printing, thereby improving printing efficiency.
[0081] Correspondingly, for a grid single-character fill type bookmark, according to the field types corresponding to each bookmark, inserting each group of print data in multiple groups of print data into the corresponding target position may include: obtaining the style of the grid single-character fill type bookmark, the style representing the format of the font and font size; wrapping the characters to be inserted in the print data with circle marks; and inserting the wrapped characters to be inserted into the print position of the grid single-character fill type bookmark in the style.
[0082] The insertion process of the grid single character fill type bookmark is similar to that of the option type bookmark, so I will not repeat it here. The main difference is that the grid single character fill type bookmark uses a circle (such as a round circle or a square circle) to mark the corresponding position instead of the option mark character, but the value to be filled in. For example, the number "1" is wrapped in a box and inserted into the corresponding print position, or the original content is replaced.
[0083] By obtaining the style information of the grid single character fill type bookmark, preparing the characters to be inserted into the print data, and inserting the data into the position specified by the bookmark in the correct style, it can be ensured that the print output is in the correct format and accurate in content.
[0084] In order to better understand the present disclosure, the following Figure 3~Figure 7 The application of the embodiments of the present disclosure in voucher printing is described, and the voucher may be, for example, a bank voucher. It should be emphasized that the following specific embodiments are only examples and are not intended to limit the scope of application of the present disclosure.
[0085] Banking vouchers are proof of necessary business elements that are printed in written paper form by the bank when customers handle various businesses at the bank. The existing voucher printing is provided by the voucher library system and is provided to various application-side systems as a public component. The application system must first make a voucher base plate according to the voucher library regulations, then write the printing data relationship, and then use the voucher API provided by the component to complete the printing output, but there are the following shortcomings: 1) The maintenance cost is high. When there is a change, the application side needs to coordinate with the voucher library component in advance, determine the production change time, and wait for centralized changes; 2) The configuration is relatively cumbersome, the template base plate and printing relationship parameter configuration are relatively complex, the base plate production and adjustment require professionals to complete, and the printing relationship adjustment is also relatively cumbersome and requires certain development skills to complete. For example, when configuring multiple square grids to fill and print, you need to master a certain expression language to cut and split the text content; 3) The printing effect has a large deviation. Since paper vouchers are used as the base plate, they are greatly affected by the printer settings, paper placement angle, and flatness, and it is easy for the printed content to deviate greatly from the expected printing position.
[0086] Figure 3A flowchart of a voucher printing method according to an embodiment of the present disclosure is schematically shown to solve the above-mentioned problems faced in the existing voucher printing process.
[0087] like Figure 3 As shown, the voucher printing process can be performed in the following steps:
[0088] ① The front end generates a voucher printing request, which carries necessary parameters such as "voucher category" and "data identifier". The voucher category can be regarded as the first parameter in the above text, and the data identifier can be regarded as the second parameter in the above text.
[0089] ② The background master program receives the voucher printing request. To ensure the smooth progress of subsequent printing, the necessary parameters such as "voucher type" and "data identification" can be checked to ensure that the parameters meet the requirements. If they meet the requirements, the subsequent operations are carried out.
[0090] ③ Select the corresponding print template according to the "Voucher Category" parameter. Bookmarks are preset in the print template. The print template can be copied to the file directory as the voucher output source file. The file directory can be stored separately by date. The output file name can be named in the format of "Voucher Category" + "_" + "Timestamp (yyyyMMddHHmmssSSS)". At the same time, the database is queried according to the "Data Identification" parameter to obtain the print data details.
[0091] ④ Bookmark analysis: The bookmark analysis method described above can be used to analyze the bookmarks in the template according to the rules, and determine the field type of the target position corresponding to each bookmark. This will be further described in detail below in conjunction with this embodiment.
[0092] ⑤ According to the field type corresponding to each bookmark, each group of print data in the multiple groups of print data is inserted into the corresponding target position. The details will be further explained in conjunction with the following text.
[0093] In this specific embodiment, the process may further include detecting and processing abnormal data.
[0094] When an exception occurs, the exceptions generated during the printing data query, bookmark rule parsing and processing, and bookmark printing content processing are packaged into corresponding business exceptions and returned to the front end. Other non-checked exceptions are packaged into unified technical exception responses to the front end. When there are no abnormalities, each link meets expectations, and the voucher file is output. The front end obtains the voucher file through the transaction attachment request method, and the process ends.
[0095] against Figure 3 In the voucher printing process, this embodiment designs three different types of bookmarks, including text, single choice / multiple choice, and grid single character filling. Bookmark configuration considers the following aspects:
[0096] 1. Determine the composition structure: field name + print count + field type + [dictionary value / grid number]. Dictionary value and grid number are optional. When the field type is "single choice / multiple choice", configure the dictionary value. When the field type is "grid single character fill", configure the grid number.
[0097] 2. Specify the separator. The separator must use characters allowed by bookmarks. For example, the components can be connected in the English format of "__" (double underscore). In this case, the field name and dictionary value should avoid containing "__".
[0098] 3. Set the number of prints. That is, determine the situation where the same field needs to be printed multiple times (to meet the needs of multi-copy vouchers), for example, use the number 1 for the first time, the number 2 for the second time, and so on. Configure the number format value for the number of prints.
[0099] Figure 4 A diagram schematically showing a text type bookmark structure diagram according to an embodiment of the present disclosure; Figure 5 Schematically shows an option type bookmark structure diagram according to an embodiment of the present disclosure; Figure 6 The structure diagram of a grid single-character filling type bookmark according to an embodiment of the present disclosure is schematically shown.
[0100] like Figure 4 As shown, a text bookmark may be composed of, for example, "field name", "print times", and "text", wherein UserName is the field name used to obtain the print content, and text is a characteristic value of this type.
[0101] like Figure 5 As shown, a single-select / multiple-select bookmark can be composed of "field name", "number of prints", "radio" [checkbox], and "dictionary value". Gender includes male and female. It can be assumed that 0 represents male and 1 represents female. When the value of gender is 0, the option "male" is selected (checked), and radio [checkbox] is the characteristic value of this type. It should be noted that the number of bookmarks configured for the same field of "single-select / multiple-select" type is the same as the number of dictionary values.
[0102] like Figure 6 As shown, the single-character filling bookmarks in the grid can be composed of "field name", "number of prints", "split", and "grid serial number". IdCard (identity card number) consists of 18 digits or letters, and 18 bookmarks need to be configured, namely: IdCard__1__split__1, IdCard__1__split__2...IdCard__1__split__18.
[0103] Figure 7 The flowchart of bookmark parsing according to an embodiment of the present disclosure is schematically shown.
[0104] like Figure 7 As shown, for the above bookmark types, bookmark parsing during voucher printing can be performed in the following steps:
[0105] ① Read the print template in editable document format. For example, you can use the open source software apache-poi to read and write print templates, copy the template file from the original template to the file in the target path, and form an XWPFDocument object instance.
[0106] ②Traverse the bookmarks in the paragraph. For example, you can use the API provided by poi to obtain all paragraphs in the document (XWPFParagraph), traverse all paragraphs, and obtain bookmarks.
[0107] ③Traverse the bookmarks in the table. For example, get all the tables in the document (XWPFTable) through the API provided by poi, traverse the rows of each table (XWPFTableRow), then traverse the cells of each table row (XWPFTableRCell), then get all the paragraphs in the cell, traverse all the paragraphs, and get the bookmarks. When there is a subtable in the cell, this step ③ can be recursively processed.
[0108] ④ Bookmark parsing: First, the bookmark name can be segmented (for example, double underscores) and the configuration norms of the components can be checked.
[0109] In the above Figure 4~Figure 6 In the provided bookmark, the third part (field type) after segmentation should be one of text, radio, checkbox, split. The requirements for different types are as follows:
[0110] Text type bookmark: It consists of three parts, namely field name, print count, and text, where the print count is a positive integer.
[0111] Single-select / multiple-select bookmark: It consists of four parts, namely field name, print count, radio / checkbox, and dictionary value, where the print count is a positive integer.
[0112] Grid single character fill type bookmark: It consists of 4 parts, namely field name, print times, split, and grid number, where the print times and grid number are positive integers.
[0113] ⑤ Bookmark content replacement processing. After the bookmark configuration check is passed, the print content is inserted into the bookmark position using the corresponding method according to different field types. The process of inserting the print content has been described in detail in the previous article, so it will not be repeated here.
[0114] ⑥When an exception occurs, record the log.
[0115] ⑦ Save the editable document. When there are no abnormalities in the above steps, call the API provided by poi to save the editable document. The process ends here.
[0116] This embodiment applies the printing method to voucher printing, and sets up a set of bookmarks that are suitable for diversified requirements. The field types supported by the bookmarks may include text, single choice / multiple choice, and single character filling in a grid. At the same time, the bookmark supports printing the same field multiple times to meet the "multi-copy" printing requirements of business vouchers (such as two copies, a copy retained by the bank, and a copy for the customer). For the different types of bookmarks set, through the supporting rule parsing and exception handling mechanisms, it can support the use of target content for replacement operations at the bookmark position. In addition to supporting simple text replacement, it also supports single choice / multiple choice "tick" selection processing, single character value grid wrapping effects, etc. Compared with the voucher printing of the prior art, the voucher printing method of this embodiment: low maintenance cost, no need to coordinate with other components, bookmark configuration can take effect after modification; printing configuration is flexible and simple, only bookmarking operations need to be performed on the printing template; printing placement is relatively accurate, and the printing content can still be adjusted before printing.
[0117] Based on the above printing method, the present disclosure also provides a printing device. Figure 8 The device is described in detail.
[0118] Figure 8 The structure block diagram of a printing device according to an embodiment of the present disclosure is schematically shown.
[0119] like Figure 8 As shown, the printing device 800 of this embodiment includes a first acquisition module 810 , a second acquisition module 820 , a parsing module 830 and an inserting module 840 .
[0120] The first acquisition module 810 is used to acquire a first parameter and a second parameter in the received print request, wherein the first parameter is used to indicate the file category of the file to be printed, and the second parameter is used to indicate multiple sets of print data in the file to be printed. In one embodiment, the first acquisition module 810 can be used to perform the operation S210 described above, which will not be described in detail here.
[0121] The second acquisition module 820 is used to acquire a printing template that matches the file category, at least one target position in the printing template is configured with a bookmark, the bookmark is used to indicate the field type corresponding to the target position, the field type includes one of a text type, an option type, and a grid single character fill type, and each of the bookmarks is provided with at least one segmentation mark, the segmentation mark is used to segment the corresponding bookmark into different components, the components are used to characterize at least the field name and field type of the bookmark. In one embodiment, the second acquisition module 820 can be used to perform the operation S220 described above, which will not be repeated here.
[0122] The parsing module 830 is used to parse each bookmark according to the segmentation mark, and determine the field type of the target position corresponding to each bookmark. In one embodiment, the parsing module 830 can be used to perform the operation S230 described above, which will not be repeated here.
[0123] The inserting module 840 is used to insert each set of print data in the plurality of sets of print data into a corresponding target position according to the field type corresponding to each bookmark. In one embodiment, the inserting module 840 can be used to perform the operation S240 described above, which will not be described in detail here.
[0124] According to an embodiment of the present disclosure, any multiple modules of the first acquisition module 810, the second acquisition module 820, the parsing module 830 and the insertion module 840 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first acquisition module 810, the second acquisition module 820, the parsing module 830 and the insertion module 840 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the first acquisition module 810 , the second acquisition module 820 , the parsing module 830 , and the inserting module 840 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0125] Fig. 9 A block diagram of an electronic device suitable for implementing a printing method according to an embodiment of the present disclosure is schematically shown.
[0126] like Fig. 9As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 to a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0127] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0128] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the input / output (I / O) interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.
[0129] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0130] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0131] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the printing method provided by the embodiment of the present disclosure.
[0132] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 901. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0133] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0134] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0135] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0136] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0138] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A printing method, characterized in that: include: Acquire a first parameter and a second parameter in the received print request, wherein the first parameter is used to indicate a file category of a file to be printed, and the second parameter is used to indicate multiple groups of print data in the file to be printed; Acquire a printing template matching the file category, wherein at least one target position in the printing template is configured with a bookmark, wherein the bookmark is used to indicate a field type corresponding to the target position, wherein the field type includes one of a text type, an option type, and a grid single character fill type, and each of the bookmarks is provided with at least one segmentation mark, wherein the segmentation mark is used to segment the corresponding bookmark into different components, wherein the components are used to at least characterize a field name and a field type of the bookmark; According to the segmentation mark, each of the bookmarks is parsed to determine the field type of the target position corresponding to each bookmark; Each group of print data in the plurality of groups of print data is inserted into a corresponding target position according to the field type corresponding to each bookmark.
2. The printing method according to claim 1, characterized in that: The printing template is in an editable document format; before parsing each of the bookmarks, the printing template further includes: Loading a print template in an editable document format, and obtaining an object instance of the print template; In the object instance, the paragraphs and / or tables of the printing template are traversed to obtain each of the bookmarks.
3. The printing method according to any one of claims 1 or 2, characterized in that: The step of parsing each of the bookmarks according to the segmentation mark to determine the field type of the target position corresponding to each bookmark includes: Identify segmentation marks in the bookmarks and determine the components of each of the bookmarks; The characteristic information of each component is checked to determine the field type of each bookmark.
4. The printing method according to claim 3, characterized in that: The bookmarks include a first bookmark to be parsed; The step of parsing each of the bookmarks to determine the field type of the target location corresponding to each bookmark includes: Segment the first bookmark to be parsed according to the segmentation mark to obtain a first component; When the first component consists of a field name, a printing number, and a text field type, and the printing number is a positive integer, the first bookmark to be parsed is determined to be a text type bookmark.
5. The printing method according to claim 4, characterized in that: The inserting each set of print data in the plurality of sets of print data into the corresponding target position according to the field type corresponding to each bookmark comprises: Acquire the style of the text type bookmark, where the style represents the format of the font and font size; The characters to be inserted of the print data are inserted into the print position of the text type bookmark in the style.
6. The printing method according to claim 3, characterized in that: The bookmarks include a second bookmark to be parsed; and the parsing of each of the bookmarks to determine the field type of the target position corresponding to each bookmark includes: Segment the second to-be-parsed bookmark according to the segmentation mark to obtain a second component; When the second component consists of a field name, a printing number, a check box field type, and a dictionary value, and the printing number is a positive integer, the second bookmark to be parsed is determined to be an option type bookmark.
7. The printing method according to claim 6, characterized in that: The inserting each set of print data in the plurality of sets of print data into the corresponding target position according to the field type corresponding to each bookmark comprises: Obtaining the style of the option type bookmark, wherein the style represents the format of the font and the font size; Enclosing the option mark characters in the print data with a circle mark; The wrapped option mark characters are inserted into the print position of the option type bookmark in the style.
8. The printing method according to claim 3, characterized in that: The bookmarks include a third bookmark to be parsed; the parsing of each of the bookmarks to determine the field type of the target position corresponding to each bookmark includes: Segment the third bookmark to be parsed according to the segmentation mark to obtain a third component; When the third component consists of a field name, a printing number, a character filling field type and a format serial number, and the printing number and the grid serial number are both positive integers, the third bookmark to be parsed is determined to be a grid single character filling type bookmark.
9. The printing method according to claim 8, characterized in that: The inserting each set of print data in the plurality of sets of print data into the corresponding target position according to the field type corresponding to each bookmark comprises: Obtaining the style of the grid single character fill type bookmark, wherein the style represents the format of the font and the font size; Wrap the characters to be inserted in the print data with a circle mark; The wrapped characters to be inserted are inserted into the printing position of the grid single character filling type bookmark in the style.
10. A printing device, characterized in that: include: A first acquisition module, used for acquiring a first parameter and a second parameter in a received print request, wherein the first parameter is used for indicating a file category of a file to be printed, and the second parameter is used for indicating a plurality of groups of print data in the file to be printed; A second acquisition module is used to acquire a printing template that matches the file category, wherein at least one target position in the printing template is configured with a bookmark, and the bookmark is used to indicate a field type corresponding to the target position, and the field type includes one of a text type, an option type, and a grid single character filling type, and each of the bookmarks is provided with at least one segmentation mark, and the segmentation mark is used to segment the corresponding bookmark into different components, and the components are used to at least represent the field name and field type of the bookmark; A parsing module, used to parse each of the bookmarks according to the segmentation mark, and determine the field type of the target position corresponding to each bookmark; The inserting module is used for inserting each group of printing data in the plurality of groups of printing data into a corresponding target position according to the field type corresponding to each bookmark.
11. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 2 or 4 to 9.
12. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 2 or 4 to 9 are implemented.
13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 2 or 4 to 9 are implemented.
Citation Information
Patent Citations
Data printing method and system
CN103955345A
Certificate printing control method and certificate template setting method and system
CN105302507A
Printing method, equipment and device based on adaptation, and computer readable storage medium
CN111176590A
Word template dynamic exporting method and device and storage medium
CN111626032A
Printing analysis method, device and apparatus based on JSON and printing system
CN112035076A
Cited By
Template control method for simplifying certificate printing
CN120179193A