CN115617283A - Data source printing method and device, electronic equipment and storage medium - Google Patents
Data source printing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115617283A CN115617283A CN202211253317.7A CN202211253317A CN115617283A CN 115617283 A CN115617283 A CN 115617283A CN 202211253317 A CN202211253317 A CN 202211253317A CN 115617283 A CN115617283 A CN 115617283A
- Authority
- CN
- China
- Prior art keywords
- printing
- printed
- page
- data
- record
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
- G06F3/1208—Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
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)
- Quality & Reliability (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
The application provides a data source printing method, a data source printing device, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving data to be printed sent by request equipment; determining target printing page number identifiers of all records according to the paging configuration information of the request equipment and the data to be printed; splitting data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of each printing page; and printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed. The data to be printed is paged according to the paging configuration information, so that pages to be printed of different formats can be paged from the data to be printed, the pages to be printed after paging are printed, and the printed pages can meet the requirements of different formats of different pages.
Description
Technical Field
The application relates to the technical field of medical software, in particular to a data source printing method and device, electronic equipment and a storage medium.
Background
The printing system sometimes requires double-sided printing in order to save printing cost by transmitting a printing data source stored on a computer to a printing apparatus and printing the printing data source on the printing apparatus, and the printed data is required to conform to a bookbinding format, requires independent page formation for a data source where a special field exists, and is different from other data source formats.
In the prior art, based on the condition of a single-sided printer, only one type of printing template can be set for one data source, and for the printing of the data source with a special field, the data source needs to be printed through multiple times of filtering and then is printed in multiple times at present, so that the existing printing steps are complex, and the problem of omission and unqualified checking is easily caused.
Disclosure of Invention
The present application aims to provide a data source printing method, apparatus, electronic device and storage medium, which can realize printing of different pages and formats and simplify the printing steps, in view of the above-mentioned deficiencies in the prior art.
In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
in a first aspect, an embodiment of the present application provides a data source printing method, where the method includes:
receiving data to be printed sent by request equipment, wherein the data to be printed comprises a plurality of records;
determining target printing page number identifiers of all records according to the paging configuration information of the request device and the data to be printed, wherein the target printing page number identifiers are used for indicating page numbers of pages where the records are printed, and the page numbers comprise: odd page numbers and even page numbers, wherein the paging configuration information comprises parity configuration information and special configuration information;
splitting the data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of the pages to be printed;
and printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed.
Optionally, the determining, according to the paging configuration information of the requesting device and the data to be printed, a target print page number identifier of each record includes:
determining an initial printing page number identifier of each record according to parity configuration information of the request device and the data to be printed, wherein the parity configuration information is used for indicating the number of records in each printed page;
and if the special configuration information of the request equipment exists, adjusting the initial printing page number identification of at least one record according to the special configuration information to obtain the target printing page number identification of each record, wherein the target printing page number identification of the adjusted record comprises a special printing mark.
Optionally, the determining, according to the parity configuration information of the request device and the data to be printed, the initial printing page number identifier of each record includes:
determining the total record number of the data to be printed;
calculating the ratio of the total record number to the record number of each page in the paging configuration information to obtain the total page number and the odd pages and the even pages of the data to be printed;
and according to the odd pages and the even pages, marking initial printing page number identifications of all record marks of the data to be printed.
Optionally, the splitting the data to be printed according to the target printing page number identifier of each record to obtain a plurality of pages to be printed and the printing identifier of each page to be printed, includes:
splitting a plurality of records with the same target printing page number identifier from the data to be printed, and combining the plurality of records into a page to be printed;
and obtaining the printing identifier of the page to be printed according to the target printing page number identifier of each record in the page to be printed.
Optionally, the obtaining, according to the target printing page number identifier of each record in the page to be printed, the printing identifier of the page to be printed includes:
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an odd page number, determining that the printing mark of the page to be printed is an odd number and the special printing mark;
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing mark of the page to be printed is an even number and the special printing mark;
if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an odd number of pages, determining that the printing identification of the page to be printed is an odd number printing identification;
and if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing identification of the page to be printed is an even number printing identification.
Optionally, the printing the pages to be printed according to the page number printing configuration information of the request device and the printing identifier of each page to be printed includes:
determining a printing template corresponding to each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed;
and printing the page to be printed based on the printing template.
Optionally, the printing the page to be printed based on the printing template includes:
printing the page to be printed with the odd printing identification and the odd and special printing identifications based on the printing template;
and printing the page to be printed with the even printing identification and the even and special printing identification based on the printing template.
In a second aspect, an embodiment of the present application further provides a data source printing apparatus, where the apparatus includes:
the receiving module is used for receiving data to be printed sent by request equipment, and the data to be printed comprises a plurality of records;
a determining module, configured to determine a target printing page identifier of each record according to the paging configuration information of the requesting device and the data to be printed, where the target printing page identifier is used to indicate a page number of a page where the record is printed, and the page number includes: odd page numbers and even page numbers, wherein the paging configuration information comprises parity configuration information and special configuration information;
the splitting module is used for splitting the data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of the pages to be printed;
and the printing module is used for printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed.
Optionally, the determining module is specifically configured to:
determining an initial printing page number identifier of each record according to parity configuration information of the request device and the data to be printed, wherein the parity configuration information is used for indicating the number of records in each printed page;
and if the special configuration information of the request equipment exists, adjusting the initial printing page number identification of at least one record according to the special configuration information to obtain the target printing page number identification of each record, wherein the target printing page number identification of the adjusted record comprises a special printing mark.
Optionally, the determining module is specifically configured to:
determining the total record number of the data to be printed;
calculating the ratio of the total record number to the record number of each page in the paging configuration information to obtain the total page number and the odd pages and the even pages of the data to be printed;
and according to the odd pages and the even pages, marking initial printing page number identifications of all record marks of the data to be printed.
Optionally, the splitting module is specifically configured to:
splitting a plurality of records with the same target printing page number identification from the data to be printed, and combining the plurality of records into a page to be printed;
and obtaining the printing identification of the page to be printed according to the target printing page number identification of each record in the page to be printed.
Optionally, the splitting module is specifically configured to:
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an odd page number, determining that the printing mark of the page to be printed is an odd number and the special printing mark;
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing mark of the page to be printed is an even number and the special printing mark;
if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an odd number of pages, determining that the printing identification of the page to be printed is an odd number printing identification;
and if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing identification of the page to be printed is an even number printing identification.
Optionally, the printing module is specifically configured to:
determining a printing template corresponding to each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed;
and printing the page to be printed based on the printing template.
Optionally, the printing module is specifically configured to:
printing the page to be printed with the odd printing identification and the odd and special printing identifications based on the printing template;
and printing the page to be printed with the even printing identification and the even and special printing identification based on the printing template.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the printing system comprises a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, when an application program runs, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to execute the steps of the data source printing method of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program is read and executes the steps of the data source printing method according to the first aspect.
The beneficial effect of this application is:
according to the data source printing method and device, the electronic equipment and the storage medium, the data to be printed sent by the request equipment is received; determining target printing page number identifiers of all records according to the paging configuration information of the request equipment and the data to be printed; splitting data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of each printing page; and printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed. The data to be printed is paged according to the paging configuration information, so that pages to be printed of different formats can be paged from the data to be printed, the pages to be printed after paging are printed, and the printed pages can meet the requirements of different formats of different pages.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart of a data source printing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of determining an initial print page number identifier according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an exemplary method for identifying a target print page number according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another data source paging printing method according to an embodiment of the present application;
fig. 5 is a schematic diagram of splitting data to be printed according to an embodiment of the present application;
fig. 6 is a schematic apparatus diagram of a data source printing method according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are only for illustration and description purposes and are not used to limit the protection scope of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
The method in the embodiment of the application is applied to a printing system, which may include a request device and a printing device, where the request device may be, for example, an electronic device such as a notebook computer or a desktop computer, the request device is connected to the printing device and sends data to be printed to the printing device, the printing device prints the data to be printed according to the received data to be printed by using the method provided in the embodiment of the application, and the request device may be one or more request devices.
Fig. 1 is a schematic flowchart of a data source printing method provided in an embodiment of the present application, and an execution main body may be, for example, the printing apparatus described above. As shown in fig. 1, the method includes:
and S101, receiving data to be printed sent by the request equipment.
Alternatively, the data to be printed may include a plurality of records indicating a plurality of lines of data, and the data to be printed may include a data source name, a data source description, a primary key ID and name, a core field ID and name, a printing order, and the like. Wherein, the name of the data source indicates the name of the source of the data to be printed, for example, the source of the printing data is the department of anesthesia; the data source description indicates a specific description of the data to be printed, for example, the data to be printed is a narcotic; the primary key ID and name indicate that each record of the print data can be found by the primary key; the core field ID and the name indicate that the data to be printed can be determined through the core field, for example, if the core field is a certain name, the data to be printed is all the medicine data used by the name; the print order may indicate a print priority order of the data to be printed.
S102, determining target printing page number identification of each record according to the paging configuration information of the request device and the data to be printed.
The target printing page number identification is used for indicating the page number of the page where each record is printed.
Alternatively, the above-described paging configuration information may be configured in advance on the printing apparatus for each requesting apparatus. The same paging configuration information may be applied to one requesting device or may be applied to a plurality of requesting devices. The paging configuration information of the requesting device may include parity configuration information as well as special configuration information.
The parity configuration information may be the number of records for pages of odd and even pages, for example, the number of records for pages of odd and even pages is set to 25 records, that is, the number of rows of each page is set to 25 rows, and the special configuration information may be a primary key value of a special field preset in the requesting device and the number of records in a special page after printing preset, where the records including the special field can be found by the primary key value of the special field, and if the primary key values corresponding to different special fields are different, the special printing flags of the records including different special fields are different, for example, for special field 1, the special printing flag of the record including special field 1 may be set to special 1; for special field 2, the special print flag of the record containing special field 2 may be set to special 2.
Optionally, before determining the target printing page identifier of each record according to the paging configuration information of the requesting device and the data to be printed, it is further required to determine whether to pre-configure template data according to the configuration information of the template, where the configuration information of the template includes parity page template configuration data and special page configuration data, and if the configuration information of the template exists, the target printing page identifier of each record may be determined according to the paging configuration information and the data to be printed.
S103, splitting the data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and the printing identification of each printing page.
Wherein each page to be printed may include a plurality of records therein.
Alternatively, the print identifier may include a page number mark, a parity mark, and a special mark, and the print identifier may be, for example, a normal odd identifier, a normal even identifier, a special odd identifier, and a special even identifier, where the normal odd identifier and the normal even identifier indicate identifiers of records that do not include the special field, and the special odd identifier and the special even identifier indicate identifiers of records that include the special field.
And S104, printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed.
Alternatively, the page number printing configuration information may be configured in advance on the printing apparatus for each requesting apparatus. The same page number printing configuration information may be applied to one requesting device, or may be applied to a plurality of requesting devices.
Optionally, the page number printing configuration information may include configuration information of the printing template, and may include an odd-even page template and a special page template, where the odd-even page template includes an odd page template and an even page template, and the special page template indicates a special page template corresponding to the special field. Illustratively, for the requesting device a, page number printing configuration information is configured for the requesting device a in advance. The page number printing configuration information includes: the common odd pages are printed by using a printing template 1, the common even pages are printed by using a printing template 3, the special odd pages are printed by using a printing template 2, and the special even pages are printed by using a printing template 4. Accordingly, when printing, the ordinary odd pages are printed in the format of the printing template 1, the ordinary even pages are printed in the format of the printing template 3, and so on.
In the embodiment, the data to be printed sent by the request equipment is received; determining target printing page number identifiers of all records according to the paging configuration information of the request equipment and the data to be printed; splitting data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of each printing page; and printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed. The data to be printed is paged according to the paging configuration information, so that pages to be printed of different formats can be paged from the data to be printed, the pages to be printed after paging are printed, and the printed pages can meet the requirements of different formats of different pages.
Optionally, the determining, in step S102, the target print page number identifier of each record according to the paging configuration information of the requesting device and the data to be printed may include:
optionally, determining an initial printing page number identifier of each record according to parity configuration information of the requesting device and data to be printed, where the parity configuration information is used to indicate the number of records in each page after printing, that is, the number of rows in each page; specifically, the data to be printed is subjected to first paging according to the parity configuration information of the requesting device and the data to be printed by using a preset method, and an initial printing page number identifier of each record can be determined, where the initial printing page number identifier may include a page number tag and a parity tag of a page in which each record is subjected to paging.
Optionally, after the first paging, if there is special configuration information of the requesting device, adjusting the initial printing page number identifier of at least one record according to the special configuration information to obtain a target printing page number identifier of each record, where the target printing page number identifier of the adjusted record includes a special printing mark, and the indication in the adjusted at least one record is that the record includes a special field.
The special page template is optional, if special configuration information of the requesting device exists, the initial printing page number identifier of at least one record is adjusted according to the special configuration information to obtain a target printing page number identifier of each record, specifically, each record in the data to be printed containing the special field can be found according to a preset primary key value of the special field, the records in the data to be printed are sequenced, the records not containing the special field are sequenced in the front, the records containing the special field are sequenced in the back, the records containing the special field are adjusted again, and specifically, parity marks of the records containing the special field are adjusted.
Illustratively, if the number of records in each page in the parity configuration information is 25, according to the parity configuration information and the data to be printed, the initial printing page number identifiers of the determined records are 1 and a normal odd number mark, the initial page number identifiers of 1-25 records are 1 and a normal even number mark, and the initial page number identifiers of 26-50 records are 2 and a normal even number mark, as shown in fig. 2, fig. 2 is a schematic diagram for determining the initial printing page number identifier provided by the embodiment of the present application; if special configuration information exists and special fields are contained in the 2 nd record and the 3 rd record, the 2 nd record and the 3 rd record are sequentially ordered after the rest of the records without the special fields, the target printing page number identifications of the 1 st record and the 4 th to 27 th records in the data to be printed are adjusted to 1 and normal odd marks, the target printing page number identifications of the 28 th to 52 th records are adjusted to 2 and normal even marks, and parity marks in the initial printing page number identifications of the 2 nd record and the 3 rd record are adjusted for the 2 nd record and the 3 rd record, if each record with the special fields in the special configuration information is separately paged and the 2 nd record is not the same as the special fields contained in the 3 rd record, the target printing page number identification of the 2 nd record is adjusted to an odd page and includes special printing marks, such as odd and special 1, odd and special 1 are identified as odd marks, the target printing page number identification of the 3 rd record is adjusted to a page and includes special printing marks, such as odd and even printing marks, the target printing page identification of the special page identification and the special page identification of the even and the special page identification of the 3 is provided as an example in the present application, and schematic diagram, which is provided.
Optionally, before determining the initial printing page number identifier of each record according to the parity configuration information of the requesting device and the data to be printed, the method may further include: judging whether parity page configuration template data of the request equipment exists or not, and if the parity page configuration template data exists, indicating that the data to be printed needs to be subjected to page division calculation according to the parity pages; if no parity page configuration template data exists, it can be continuously determined whether the requesting device has special page template configuration data.
Optionally, after the first paging calculation, that is, after the odd-even paging calculation, it may be continuously determined whether the special page template configuration data of the requesting device exists, specifically, whether the special page template configuration data exists in the preset configuration table may be retrieved, and if the special page template configuration data exists, it is determined that the data to be printed includes a special field and needs a second paging; if no special page template configuration data exists, the printing data does not include a special field, the data to be printed after the first paging does not need to be paged for the second time, and the data to be printed can be directly printed according to the initial printing page number identification after the first paging.
Optionally, if there is no odd-even page configuration template data, it is continuously determined whether there is special page template configuration data for the requesting device, and at this time, if there is special page template configuration data, special paging calculation may be performed on the data to be printed; if the special page template configuration data does not exist, the fact that the data to be printed does not need to be subjected to odd-even page paging calculation and special page paging calculation is not needed is shown, and the data to be printed can be printed by matching with a default common template.
In order to more clearly show the implementation steps of the foregoing embodiment, the steps in the foregoing embodiment are described with reference to fig. 4, and fig. 4 is a schematic flow chart of another data source paging printing method provided in the embodiment of the present application, as shown in fig. 4:
s201, receiving data to be printed sent by the request equipment.
S202, it is determined whether or not there is an odd-even page template arrangement, and if there is an odd-even page template arrangement, the following step S203 is executed, and if not, the following step S204 is executed.
Specifically, whether parity page template configuration exists or not can be determined by searching whether parity page template configuration data exists in a configuration table, the parity page template configuration data is preset in the template configuration, if the parity page template configuration data is preset, paging calculation of parity pages is required, and if the parity page template configuration data is not preset, paging calculation of parity pages is not required.
And S203, performing page division calculation of odd and even pages on the data to be printed.
Optionally, after performing odd-even page paging calculation on the data to be printed, continuing to determine whether there is a special page template configuration, and then executing S204.
S204, judging whether special page template configuration exists or not, and if the special page template configuration exists, executing the following step S205; if there is an odd-even page configuration and there is no special page template configuration, go to S206; if there is no parity page template arrangement and no special page template arrangement, the following step S207 is performed.
Specifically, whether special page template configuration exists or not can be judged by searching whether special page template configuration data exists in a configuration table or not, the special page template configuration data is preset in the template configuration, if the special page template configuration data is preset, paging calculation of the special page is required, and if the special page template configuration data is not preset, paging calculation of the special page is not required.
Optionally, if there is no parity page allocation in step S202, executing step S204 to determine whether there is a special page allocation, if there is a special page allocation, executing step S205 to perform a special page paging calculation on the data to be printed, that is, only the special page paging calculation is required on the data to be printed, and printing the data to be printed after the special page paging; if no special page configuration exists, the data to be printed does not have odd-even page configuration, and no special page configuration exists, and the data to be printed is directly matched with the default printing template to be printed, namely, odd-even page paging calculation and special page paging calculation are not performed.
Optionally, if the odd-even page configuration exists in step S202, that is, if the special page configuration exists after S203 is executed, step S204 is executed to determine whether the special page configuration exists, then if the special page configuration exists, step S205 is executed, that is, after the odd-even page paging calculation is performed on the data to be printed, another special paging calculation needs to be performed again to obtain the data to be printed after two paging calculations, and the data to be printed after two paging calculations is printed; if no special page configuration exists, the data to be printed after odd-even page calculation paging in S203 is directly printed.
And S205, performing paging calculation of special pages on the data to be printed.
And S206, matching the paged data to be printed with a corresponding printing template and printing.
Optionally, if parity page configuration exists and special page configuration does not exist, printing the data to be printed after being paged in S203; if the odd-even page configuration does not exist, the special page configuration exists, and the data to be printed after the special paging in S205 is printed; and if the odd-even page configuration and the special page configuration exist, printing the data to be printed after the two-time paging calculation.
And S207, matching the data to be printed with a default printing template and printing.
Optionally, if there is no odd-even page configuration and no special page configuration, a default printing template is allocated to the data to be printed and the data is printed.
In this embodiment, the paging calculation, the odd-even paging calculation, and the special paging calculation are performed on the data to be printed, so that each record of the data to be printed can be paged, and each page to be printed has one data format, and the data to be printed is paged into a plurality of pages to be printed with different formats.
Optionally, the determining the initial printing page number identifier of each record according to the parity configuration information of the requesting device and the data to be printed may include:
optionally, the total number of records of the data to be printed is determined, and a ratio of the total number of records to the number of records of each page in the paging configuration information is calculated to obtain the total number of pages.
Illustratively, if the total number of records of the data to be printed is 100 and the number of records per page in the page allocation information is 25, the calculated total number of pages is 4, which are the first page, the second page, the third page, and the fourth page, respectively.
Optionally, the initial printing page number identifiers are marked for each record of the data to be printed according to odd pages and even pages, specifically, if the total number of records of the data to be printed is 100, and the total number of pages obtained after the pagination calculation is 4 pages, the initial printing identifiers of 1 to 25 records are 1 and a common odd number identifier, the initial printing identifiers of 25 to 50 records are 2 and a common even number identifier, the initial printing identifiers of 50 to 75 records are 3 and a common odd number identifier, and the initial printing identifiers of 75 to 100 records are 4 and a common even number identifier.
Optionally, the splitting the data to be printed according to the target printing identifier of each record to obtain a plurality of pages to be printed and the printing identifier of each page to be printed may include:
optionally, splitting multiple records with the same target printing page number identifier from the data to be printed, combining the multiple records into one page to be printed, and in the composition process, combining the multiple records according to the parity configuration information and the special configuration information, for example, for each record without a special field, combining each record without a special field into one page to be printed according to the record number of each page in the parity configuration information; and for each record containing the special fields, combining the records containing the special fields into one page to be printed according to the number of records of each page in the special configuration information.
Illustratively, a schematic diagram of splitting data to be printed is shown by fig. 5, as shown in fig. 5, if a target printing page number of 25 records included in each record without a special field is an ordinary odd page number identifier, a target printing page number of 25 records is an ordinary even page number identifier, and the number of records of each page in the parity configuration information is 25, combining the 25 records with the target printing page number being the ordinary odd identifier in one page to be printed, and combining the 25 records with the target printing page number being the ordinary even identifier in one page to be printed.
If there are 2 records containing special fields, the target printing identifications of the 2 records are respectively odd and special 1, even and special 2, wherein the special 1 and special 2 are used for indicating that the special fields in the 2 records are different and are determined according to the primary key values of the special fields contained in the records; and each record containing the special field in the special configuration information is set to be independent into pages, namely the number of records per page is 1, the records with the target printing page numbers marked as odd and special 1 are used as the records in one page to be printed, and the records with the target printing page numbers marked as even and special 2 are used as the records in one page to be printed.
Optionally, the printing identifier of the page to be printed is obtained according to the target printing page number identifier of each record in each page to be printed.
In this embodiment, by combining a plurality of records having the same target print page number identifier into one page to be printed, each page to be printed can have one print format, and the formats of different pages to be printed can be different, thereby realizing independent page formation of different formats and special data of odd-even pages.
Optionally, the obtaining the print identifier of the page to be printed according to the target print page number identifier of each record in each page to be printed may include:
optionally, if the target printing page number identifier of the record in the page to be printed includes the special printing mark and the target printing page number identifier is used to indicate an odd page number, it is determined that the printing mark of the page to be printed is an odd number and the special printing mark, and for example, as the target printing page number identifiers of the above odd and special 1, the printing mark of the page to be printed is odd and special 1.
Optionally, if the target print page number identifier of the record in the page to be printed includes the special print flag and the target print page number identifier is used to indicate an even page number, it is determined that the print flag of the page to be printed is an even number and the special print flag, and for example, as the target print page number identifier of even and special 2, the print flag of the page to be printed is even and special 2.
Optionally, if the target printing page number identifier of the record in the page to be printed does not include the special printing mark and the target printing page number identifier is used to indicate an odd number page number, it is determined that the printing identifier of the page to be printed is the ordinary odd number printing identifier.
Optionally, if the target printing page number identifier of the record in the page to be printed does not include the special printing mark and the target printing page number identifier is used to indicate an even number page number, it is determined that the printing identifier of the page to be printed is a normal even number printing identifier.
Optionally, the printing the pages to be printed according to the page number printing configuration information of the requesting device and the printing identifier of each page to be printed may include:
according to the page number printing configuration information of the request device and the printing identification of each page to be printed, determining the printing template corresponding to each page to be printed, exemplarily, as shown in fig. 5, if the printing identification of the page to be printed is an odd number and a special printing mark, and the printing templates corresponding to different pages to be printed with special printing marks are also different, the printing template corresponding to the page to be printed with the special odd number identification of odd and special 1 may be the printing template 2; if the printing identification of the page to be printed is the special even identification of the even and special 2, the printing template corresponding to the page to be printed can be a printing template 4; if the printing identification of the page to be printed is a common odd number, the printing template corresponding to the page to be printed is a printing template 1; if the printing mark of the page to be printed is a common even number, the printing template corresponding to the page to be printed is the printing template 3.
Optionally, the page to be printed is printed based on the printing template.
In this embodiment, the printing templates corresponding to the pages to be printed are determined according to the printing identifiers of the pages to be printed, so that the pages to be printed with different formats can be accurately printed according to the corresponding printing templates, the printing templates can be flexibly configured according to the pages, the printing templates can be matched with the pages in batches, and subsequent printing operation steps are simplified.
Optionally, the printing the page to be printed based on the printing template may include:
optionally, the page to be printed with the odd print identifier and the odd and special print identifiers is printed based on the print template, and the page to be printed with the even print identifier and the even and special print identifiers is printed based on the print template.
Optionally, for the front-back printing of the single-sided printer, the odd printing identifier and the pages to be printed of the odd and special printing identifiers may be printed first, after the batch printing is completed, the printer may prompt the user to turn over and feed paper, and after the user turns over and feeds paper and confirms to continue printing, the pages to be printed with the even printing identifier and the even and special printing identifiers are printed.
In this embodiment, through treating to print the page and print in batches and two-sided printing according to different printing signs, can realize satisfying under the requirement that different page printing different formats, can also realize simplifying printing operation step and avoid the risk of printing the content by mistake and neglecting.
Fig. 6 is a schematic diagram of an apparatus for a data source printing method according to an embodiment of the present application, and as shown in fig. 6, the apparatus includes:
a receiving module 301, configured to receive data to be printed sent by a requesting device, where the data to be printed includes multiple records;
a determining module 302, configured to determine, according to the paging configuration information of the requesting device and the data to be printed, a target printing page identifier of each record, where the target printing page identifier is used to indicate a page number of a page where the record is printed, and the page number includes: odd page numbers and even page numbers, wherein the paging configuration information comprises parity configuration information and special configuration information;
the splitting module 303 is configured to split the data to be printed according to the target printing page number identifier of each record, so as to obtain multiple pages to be printed and printing identifiers of the pages to be printed;
and the printing module 304 is configured to print each page to be printed according to the page number printing configuration information of the requesting device and the printing identifier of each page to be printed.
Optionally, the determining module 302 is specifically configured to:
determining an initial printing page number identifier of each record according to parity configuration information of the request device and the data to be printed, wherein the parity configuration information is used for indicating the number of records in each printed page;
and if the special configuration information of the request equipment exists, adjusting the initial printing page number identification of at least one record according to the special configuration information to obtain the target printing page number identification of each record, wherein the target printing page number identification of the adjusted record comprises a special printing mark.
Optionally, the determining module 302 is specifically configured to:
determining the total record number of the data to be printed;
calculating the ratio of the total record number to the record number of each page in the paging configuration information to obtain the total page number and the odd pages and the even pages of the data to be printed;
and according to the odd pages and the even pages, marking initial printing page number identifications of all record marks of the data to be printed.
Optionally, the splitting module 303 is specifically configured to:
splitting a plurality of records with the same target printing page number identification from the data to be printed, and combining the plurality of records into a page to be printed;
and obtaining the printing identification of the page to be printed according to the target printing page number identification of each record in the page to be printed.
Optionally, the splitting module 303 is specifically configured to:
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an odd page number, determining that the printing mark of the page to be printed is an odd number and the special printing mark;
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing mark of the page to be printed is an even number and the special printing mark;
if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an odd number page number, determining that the printing identification of the page to be printed is an odd number printing identification;
and if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing identification of the page to be printed is an even number printing identification.
Optionally, the printing module 304 is specifically configured to:
determining a printing template corresponding to each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed;
and printing the page to be printed based on the printing template.
Optionally, the printing module 304 is specifically configured to:
printing the page to be printed with the odd printing identification and the odd and special printing identifications based on the printing template;
and printing the page to be printed with the even printing identification and the even and special printing identification based on the printing template.
Fig. 7 is a block diagram of an electronic device 700 according to an embodiment of the present disclosure, and as shown in fig. 5, the electronic device may include: a processor 401, a memory 402.
Optionally, a bus 403 may be further included, wherein the memory 402 is configured to store machine-readable instructions executable by the processor 401 (for example, execution instructions corresponding to the receiving module, the determining module, the splitting module, the printing module, and the like in the apparatus in fig. 4), when the electronic device 400 runs, the processor 401 and the memory 402 store and communicate with each other through the bus 403, and when the machine-readable instructions are executed by the processor 401, the method steps in the foregoing method embodiments are performed.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program executes the method steps in the data source printing method embodiment.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall cover the scope of the present application.
Claims (10)
1. A method of data source printing, the method comprising:
receiving data to be printed sent by request equipment, wherein the data to be printed comprises a plurality of records;
determining target printing page number identifiers of all records according to the paging configuration information of the request device and the data to be printed, wherein the target printing page number identifiers are used for indicating page numbers of pages where the records are printed, and the page numbers comprise: odd page numbers and even page numbers, wherein the paging configuration information comprises parity configuration information and special configuration information;
splitting the data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of the pages to be printed;
and printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed.
2. The data source printing method according to claim 1, wherein determining the target printing page number identifier of each record according to the paging configuration information of the requesting device and the data to be printed comprises:
determining an initial printing page number identifier of each record according to parity configuration information of the request device and the data to be printed, wherein the parity configuration information is used for indicating the number of records in each printed page;
and if the special configuration information of the request equipment exists, adjusting the initial printing page number identification of at least one record according to the special configuration information to obtain the target printing page number identification of each record, wherein the target printing page number identification of the adjusted record comprises a special printing mark.
3. The data source printing method according to claim 2, wherein the determining the initial printing page number identifier of each record according to the parity configuration information of the requesting device and the data to be printed comprises:
determining the total record number of the data to be printed;
calculating the ratio of the total record number to the record number of each page in the paging configuration information to obtain the total page number and the odd pages and the even pages of the data to be printed;
and according to the odd pages and the even pages, marking initial printing page number identifications of all record marks of the data to be printed.
4. The data source printing method according to claim 2, wherein splitting the data to be printed according to the target printing page number identifier of each record to obtain a plurality of pages to be printed and the printing identifier of each page to be printed, comprises:
splitting a plurality of records with the same target printing page number identification from the data to be printed, and combining the plurality of records into a page to be printed;
and obtaining the printing identification of the page to be printed according to the target printing page number identification of each record in the page to be printed.
5. The data source printing method according to claim 4, wherein obtaining the printing identifier of the page to be printed according to the target printing page number identifier of each record in the page to be printed comprises:
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an odd page number, determining that the printing mark of the page to be printed is an odd number and the special printing mark;
if the target printing page number identification of the record in the page to be printed comprises a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing mark of the page to be printed is an even number and the special printing mark;
if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an odd number of pages, determining that the printing identification of the page to be printed is an odd number printing identification;
and if the target printing page number identification of the record in the page to be printed does not comprise a special printing mark and the target printing page number identification is used for indicating an even number page number, determining that the printing identification of the page to be printed is an even number printing identification.
6. The data source printing method according to claim 1, wherein the printing each page to be printed according to the page number printing configuration information of the requesting device and the printing identifier of each page to be printed comprises:
determining a printing template corresponding to each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed;
and printing the page to be printed based on the printing template.
7. The data source printing method according to claim 6, wherein the printing the page to be printed based on the printing template comprises:
printing the page to be printed with the odd printing identification and the odd and special printing identifications based on the printing template;
and printing the page to be printed with the even printing identification and the even and special printing identification based on the printing template.
8. A data source printing apparatus, comprising:
the receiving module is used for receiving data to be printed sent by request equipment, and the data to be printed comprises a plurality of records;
a determining module, configured to determine a target printing page identifier of each record according to the paging configuration information of the requesting device and the data to be printed, where the target printing page identifier is used to indicate a page number of a page where the record is printed, and the page number includes: odd page numbers and even page numbers, wherein the paging configuration information comprises parity configuration information and special configuration information;
the splitting module is used for splitting the data to be printed according to the target printing page number identification of each record to obtain a plurality of pages to be printed and printing identifications of the pages to be printed;
and the printing module is used for printing each page to be printed according to the page number printing configuration information of the request equipment and the printing identification of each page to be printed.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor implements the steps of the data source printing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data source printing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211253317.7A CN115617283A (en) | 2022-10-13 | 2022-10-13 | Data source printing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211253317.7A CN115617283A (en) | 2022-10-13 | 2022-10-13 | Data source printing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115617283A true CN115617283A (en) | 2023-01-17 |
Family
ID=84861940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211253317.7A Pending CN115617283A (en) | 2022-10-13 | 2022-10-13 | Data source printing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115617283A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116260681A (en) * | 2023-05-15 | 2023-06-13 | 北京一起教育科技发展有限公司 | Shop code printing gateway |
CN117234442A (en) * | 2023-11-09 | 2023-12-15 | 金蝶征信有限公司 | Data printing method, device, computer equipment and computer readable storage medium |
-
2022
- 2022-10-13 CN CN202211253317.7A patent/CN115617283A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116260681A (en) * | 2023-05-15 | 2023-06-13 | 北京一起教育科技发展有限公司 | Shop code printing gateway |
CN116260681B (en) * | 2023-05-15 | 2023-07-21 | 北京一起教育科技发展有限公司 | Shop code printing gateway |
CN117234442A (en) * | 2023-11-09 | 2023-12-15 | 金蝶征信有限公司 | Data printing method, device, computer equipment and computer readable storage medium |
CN117234442B (en) * | 2023-11-09 | 2024-04-19 | 金蝶征信有限公司 | Data printing method, device, computer equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115617283A (en) | Data source printing method and device, electronic equipment and storage medium | |
CN105930109B (en) | Document printing method, system and terminal | |
CN110399108B (en) | Voucher printing processing method and device | |
US8045198B2 (en) | System and method for processing a change history of a PDF file | |
US20010011288A1 (en) | Method and apparatus to facilitate creation of documents from individual pages | |
CN102768656A (en) | Method, system and device for processing reading record | |
CN103309879B (en) | Method and device for managing marks in WORD document | |
CN101840316B (en) | Print management apparatus, and printer system | |
US8223391B2 (en) | System and method for producing print instruction information to be transmitted to a printing device | |
CN103488440A (en) | Bill printing device and bill printing method | |
CN117174231A (en) | Intelligent medical record management system | |
US6657739B1 (en) | Double-sided printing configuration utility | |
CN110717795A (en) | Printing charging method and device and electronic equipment | |
CN101963892B (en) | Method and device for printing table data | |
CN113947066A (en) | Text comparison method and device based on ASR, electronic equipment and storage medium | |
CN103092859A (en) | Method and device for acquiring music file information | |
CN111552447A (en) | Printing method and system | |
JP2009140063A (en) | File management module, printing device, file management method, file management program | |
US8411305B2 (en) | System and method for identifying a record template within a file having reused objects | |
US12099764B1 (en) | Methods and systems for encoding information about variable data print files | |
CN111258515A (en) | Data processing method, device and equipment | |
CN113672565B (en) | File marking method and device, electronic equipment and storage medium | |
CN113448522B (en) | Variable data printing output method and device, terminal equipment and readable storage medium | |
CN115756443B (en) | Script generation method and device, electronic equipment and readable storage medium | |
CN112818087B (en) | Printer instruction head-tail analysis method and device, equipment and storage medium |
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 |