[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117453158A - Custom generation method, equipment and storage medium for bill - Google Patents

Custom generation method, equipment and storage medium for bill Download PDF

Info

Publication number
CN117453158A
CN117453158A CN202311063588.0A CN202311063588A CN117453158A CN 117453158 A CN117453158 A CN 117453158A CN 202311063588 A CN202311063588 A CN 202311063588A CN 117453158 A CN117453158 A CN 117453158A
Authority
CN
China
Prior art keywords
html page
bill
adjustment
page
preset
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
Application number
CN202311063588.0A
Other languages
Chinese (zh)
Inventor
徐约可
谢国斌
马明
高铸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dadaoyun Technology Co ltd
Original Assignee
Shenzhen Dadaoyun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dadaoyun Technology Co ltd filed Critical Shenzhen Dadaoyun Technology Co ltd
Priority to CN202311063588.0A priority Critical patent/CN117453158A/en
Publication of CN117453158A publication Critical patent/CN117453158A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1242Image or content composition onto a page
    • G06F3/1243Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • G06F3/1246Job translation or job parsing, e.g. page banding by handling markup languages, e.g. XSL, XML, HTML
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1254Automatic configuration, e.g. by driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07GREGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
    • G07G5/00Receipt-giving machines
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The invention relates to the field of bill printing, and discloses a bill customization generation method, bill customization generation equipment and a storage medium. The method comprises the following steps: calling a LOOP component, and rendering and generating an HTML page based on the length and the width of the preset page by using the LOOP component; receiving an adjustment instruction of a user, and adjusting the HTML page according to the adjustment instruction to generate an adjusted HTML page; when a JS printing instruction is received, converting the HTML page to generate JSON format data, and sending the JSON format data to a preset printer so that the printer can perform bill printing based on the JSON format data; when a picture printing instruction is received, converting the HTML page into a picture format, generating a bill picture, and sending the bill picture to a preset printer so that the printer can perform bill printing based on the bill picture. In the embodiment of the invention, the technical problem that the current receipt generation mode cannot be customized and generated is solved.

Description

Custom generation method, equipment and storage medium for bill
Technical Field
The present invention relates to the field of bill printing, and in particular, to a method, an apparatus, and a storage medium for custom generating a bill.
Background
In the traditional sales mode, the receipt templates are generally provided by a sales system or carried by a POS machine, and the receipt templates are relatively single and cannot meet the receipt customization demands generated by the diversity of merchants and orders.
Under the sales mode of the SASS platform, the SASS platform manufacturer can generally set the content of the receipt in a customized mode like a beauty group, but the format of the receipt is fixed, only the display hiding or style of a certain element of the receipt can be set, after the receipt template is set, the receipt is printed out by matching with a cloud printer, and the printing effect expected by the manufacturer can not be achieved by setting the receipt template mode. Therefore, a technology is needed to solve the problem of custom generation of the current receipt, aiming at the technical problem that the current receipt generation mode cannot be custom generated.
Disclosure of Invention
The invention mainly aims to solve the technical problem that the current receipt generation mode cannot be customized and generated.
The first aspect of the present invention provides a method for customizing and generating a ticket, where the method for customizing and generating a ticket includes:
calling a LOOP component, and rendering and generating an HTML page based on the length and the width of a preset page by using the LOOP component;
receiving an adjustment instruction of a user, and performing adjustment processing on the HTML page according to the adjustment instruction to generate an adjustment HTML page;
when a JS printing instruction is received, converting the adjustment HTML page to generate JSON format data, and sending the JSON format data to a preset printer so that the printer can print notes based on the JSON format data;
when a picture printing instruction is received, converting the adjustment HTML page into a picture format, generating a bill picture, and sending the bill picture to a preset printer so that the printer can perform bill printing based on the bill picture.
Optionally, in a first implementation manner of the first aspect of the present invention, using the LOOP component, rendering and generating the HTML page based on the preset page length and width includes:
writing the length and width of a preset page and the setting of a preset font into the LOOP assembly to generate the LOOP assembly with bill format data;
and calling a print function, and printing and processing the LOOP component with the bill format data to generate an HTML page.
Optionally, in a second implementation manner of the first aspect of the present invention, the converting the adjustment HTML page into a picture format, and generating a ticket picture includes:
and converting the adjustment HTML page into a picture format according to a preset HTML2CANVAS plug-in, and generating a bill picture.
Optionally, in a third implementation manner of the first aspect of the present invention, the call LOOP component includes:
calling getLodop in a preset print event function to acquire an object variable of the LOOP component.
Optionally, in a fourth implementation manner of the first aspect of the present invention, after the call LOOP component, the LOOP component renders and generates the HTML page based on the preset page length and width, and after the receiving an adjustment instruction of the user, according to the adjustment instruction, performs adjustment processing on the HTML page, and before generating the adjusted HTML page, the method further includes:
performing blank recognition processing on the HTML page according to a preset neural network recognition algorithm to obtain a blank interface;
and according to the preset watermark setting, carrying out watermark modification processing on the blank interface to generate an HTML page with watermark.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the adjusting the HTML page according to the adjustment instruction, and generating an adjusted HTML page includes:
clearing watermark fields on the adjustment HTML page;
performing blank recognition processing on the adjustment HTML page according to a preset neural network recognition algorithm to obtain an adjustment blank interface;
and according to the preset watermark setting, carrying out watermark modification processing on the adjustment blank interface to generate an HTML page with watermark.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the converting the adjustment HTML page into a picture format, and generating a ticket picture includes:
based on an AJAX request, calling a document. QuerySelect to traverse and read the root element and the sub-element of the adjustment HTML page to obtain a page element set;
analyzing each element attribute in the page element set to obtain an element attribute set corresponding to the page element set;
and performing virtual printing processing on the page element set according to the element attribute set to generate a bill picture.
Optionally, in a seventh implementation manner of the first aspect of the present invention, the receiving an adjustment instruction of the user includes:
based on TCP/IP protocol, receiving adjustment instruction of remote user.
The second aspect of the present invention provides a bill customization generating device, including: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the bill customization generating device to execute the bill customization generating method described above.
A third aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of customising a document as described above.
In the embodiment of the invention, the HTML page after adjustment is generated by carrying out the visual display and adjustment of the HTML on the bill, and the HTML page is accurately sent to the POS machine for printing by utilizing the JS format or the picture format, so that the user can randomly adjust the data of the bill needing to be printed, and the technical problem that the current bill generation mode cannot be customized and generated is solved.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of a method for customizing a ticket according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of 101 steps of a method for custom generating a ticket according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of a method for custom generating a ticket according to an embodiment of the present invention, after step 101 and before step 102;
FIG. 4 is a schematic diagram of an embodiment of a method for custom generating a ticket after step 102 according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of one embodiment of step 104 of the method for custom generation of notes in an embodiment of the invention;
FIG. 6 is a schematic diagram of an embodiment of a bill customization generating device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a bill customization generation method, bill customization generation equipment and a storage medium.
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the present disclosure has been illustrated in the drawings in some form, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and examples of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
In describing embodiments of the present disclosure, the term "comprising" and its like should be taken to be open-ended, i.e., including, but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first," "second," and the like, may refer to different or the same object. Other explicit and implicit definitions are also possible below.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and one embodiment of a method for customizing generation of a ticket in an embodiment of the present invention includes:
101. calling a LOOP component, and rendering and generating an HTML page based on the length and the width of a preset page by using the LOOP component;
in this embodiment, before the system uses the proposal that the receipt template can be customized and the receipt can be automatically printed, after logging in for the first time, the system needs to click the download link to download the LODOP printing control according to the system direction, install the LODOP printing control, and set a default POS printer.
And after the calling object of the LOOP component is set, directly pulling the LOOP component to call the page length and width from the link set in the program after the program is started, and generating the HTML page based on the page length and width rendering.
Further, the "invoke LOOP component" may perform the following steps:
1011. calling getLodop in a preset print event function to acquire an object variable of the LOOP component.
In this embodiment, the manner of setting the LOOP object variable may be as follows:
const LODOP=getLodop();
const pageWidth=LODOP.GET_PRINTER_NAME(‘-1:PaperWidth’);
const pageHeight=$(“#batchPrintBox”).height();
and calling the getLodop to acquire the object variable data of the LOOP component by the print event function, thereby realizing the data input control of the LOOP component.
Further, referring to fig. 2, fig. 2 is an embodiment of a step 101 of a method for customizing a ticket in an embodiment of the present invention, "using the LOOP component, rendering and generating an HTML page based on a preset page length and width" may execute the following steps:
1012. writing the length and width of a preset page and the setting of a preset font into the LOOP assembly to generate the LOOP assembly with bill format data;
1013. and calling a print function, and printing and processing the LOOP component with the bill format data to generate an HTML page.
In steps 1012-1013, the page length and width are entered using the following code:
const pageWidth=LODOP.GET_PRINTER_NAME(‘-1:PaperWidth’);
const pageHeight=$(“#batchPrintBox”).height();
the LOOP component writes page fonts using the following code:
Const$printTicketBox=$(‘print_ticket_box’);
LODP.PRINT_INITA(0,0,pageWidth,pageHeight,“X”);
LODOP.SET_PRINT_STYLEA(0,“FontSize”,9);
LODOP.SET_PRINT_STYLEA(0,“LineSpacing”,-5);
the print processing is performed after the predetermined page font setting and page length and width are written into the LOOP module, and then, the print job=lodop. And performing LOOP component printing to generate an HTML page.
Further, referring to fig. 3, fig. 3 is an embodiment of a method for customizing a ticket according to an embodiment of the present invention, after 101, before 102, the following steps may be further performed:
1014. performing blank recognition processing on the HTML page according to a preset neural network recognition algorithm to obtain a blank interface;
1015. and according to the preset watermark setting, carrying out watermark modification processing on the blank interface to generate an HTML page with watermark.
In 1014-1015 steps, the neural network recognition algorithm may use YOLO algorithm to perform blank recognition processing on the HTML page to obtain a blank interface, and then perform watermark modification on the blank interface with preset merchant trademark logo and other contents, that is, adding a watermark description text field to the HTML page code layer to generate the HTML page with watermark.
102. Receiving an adjustment instruction of a user, and performing adjustment processing on the HTML page according to the adjustment instruction to generate an adjustment HTML page;
in this embodiment, some adjustment instructions such as a drag instruction, a text box adding instruction, a text input instruction and the like of a user are received, and the HTML page is adjusted to change the content, so as to obtain an adjusted HTML page. This step is a process for customer to visually customize the contents of the ticket desired by the customer, and the customer makes easy visual development based on the needs of the customer.
Further, referring to fig. 4, fig. 4 is an embodiment of a method for customizing a ticket according to an embodiment of the present invention after step 102, the following steps may be further performed:
1021. clearing watermark fields on the adjustment HTML page;
1022. performing blank recognition processing on the adjustment HTML page according to a preset neural network recognition algorithm to obtain an adjustment blank interface;
1023. and according to the preset watermark setting, carrying out watermark modification processing on the adjustment blank interface to generate an HTML page with watermark.
In 1021-1023 steps, in order to automatically print the watermark required by the customer, the watermark field on the adjustment HTML page is removed when the HTML page is adjusted each time, then blank recognition processing is carried out on the adjustment HTML page by using a YOLO algorithm still to obtain an adjustment blank interface (coordinate data), and then the watermark setting is filled in the adjustment blank interface (coordinate data) to realize watermark data modification of the HTML page, so that the HTML page with the watermark is generated.
Specifically, the "receiving the adjustment instruction of the user" may perform the following steps:
1024. based on TCP/IP protocol, receiving adjustment instruction of remote user.
In this embodiment, the control HTML page modification may be remotely performed on the network using the TCP/IP protocol, which is mainly used to adapt to the discussion of the current online conference and the modification presentation of the remote conference, so as to satisfy the requirements of not only the offline clients, but also the remote clients.
103. When a JS printing instruction is received, converting the adjustment HTML page to generate JSON format data, and sending the JSON format data to a preset printer so that the printer can print notes based on the JSON format data;
in this embodiment, when the received print instruction is a JS print instruction, the HTML page is directly converted into JSON format data, and the conversion algorithm is an existing algorithm, which is not described herein. And then the JSON format data is sent to the printer which is already bound, and the printer is used for realizing bill printing.
104. When a picture printing instruction is received, converting the adjustment HTML page into a picture format, generating a bill picture, and sending the bill picture to a preset printer so that the printer can perform bill printing based on the bill picture.
In this embodiment, screenshot conversion is performed on the adjusted HTML page to generate a ticket picture, and then the ticket picture is sent to a printer, so that the printer performs ticket printing based on the ticket picture.
Further, referring to fig. 5, fig. 5 is an embodiment of step 104 of the method for generating a ticket customization in an embodiment of the present invention, "converting the HTML page to a picture format, and generating a ticket picture" may further execute the following steps:
1041. based on an AJAX request, calling a document. QuerySelect to traverse and read the root element and the sub-element of the adjustment HTML page to obtain a page element set;
1042. analyzing each element attribute in the page element set to obtain an element attribute set corresponding to the page element set;
1043. and performing virtual printing processing on the page element set according to the element attribute set to generate a bill picture.
In 1041-1043 steps, obtaining HTML content of the receipt page: the HTML content of the receipt page is acquired by JavaScript, and can be obtained by DOM operation or AJAX request. For example, the root element of the ticket page may be obtained using a document. Getelentbyid or document. Queryselector. All HTML elements of the receipt page are traversed using a recursive or circular manner. The root element is traversed first, then the child element is traversed, and so on. The child node list of the element may be obtained using the element.child nodes attribute and the node type may be determined using the element.nodeType. And analyzing the content, the position, the size, the width, the height and other attributes of each traversed element. The corresponding information may be acquired using attributes of the element (e.g., element. Textcontent, element. Offsetwidth, element. Offsetheight). In addition, if it is necessary to acquire the absolute position of an element in a page, an element. And generating a corresponding printing control instruction according to the attribute of each element. The specific instruction format generated depends on the type of print control and the printing protocol used. For example, for some common printer controls, ticket pictures may be generated using ESC/POS commands, ZPL commands, or the like.
Further, "convert the adjustment HTML page into a picture format, generate a ticket picture" may further execute the following steps:
1044. and converting the adjustment HTML page into a picture format according to a preset HTML2CANVAS plug-in, and generating a bill picture.
In step 1044, using HTML2Canvas plug-in, the functions of capturing a screenshot in a web page, generating a poster, implementing print preview, etc. can be implemented, and the HTML page screenshot will be adjusted to generate a ticket picture.
In the embodiment of the invention, the HTML page after adjustment is generated by carrying out the visual display and adjustment of the HTML on the bill, and the HTML page is accurately sent to the POS machine for printing by utilizing the JS format or the picture format, so that the user can randomly adjust the data of the bill needing to be printed, and the technical problem that the current bill generation mode cannot be customized and generated is solved.
Fig. 6 is a schematic structural diagram of a custom generating device for tickets, where the custom generating device 600 for tickets may generate relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing applications 633 or data 632 according to an embodiment of the present invention. Wherein the memory 620 and the storage medium 630 may be transitory or persistent storage. The program stored on the storage medium 630 may include one or more modules (not shown), each of which may include a series of instruction operations in the custom generation device 600 for tickets. Still further, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the ticket customization generating device 600.
The ticket-based customization generation device 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input/output interfaces 660, and/or one or more operating systems 631, such as Windows Server, mac OS X, unix, linux, free BSD, and the like. It will be appreciated by those skilled in the art that the bill-based custom generating apparatus structure shown in fig. 6 does not constitute a limitation of the bill-based custom generating apparatus, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions are executed on a computer, cause the computer to perform the steps of the method for customizing generation of a ticket.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CDROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Moreover, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (10)

1. The bill customization generating method is characterized by comprising the following steps:
calling a LOOP component, and rendering and generating an HTML page based on the length and the width of a preset page by using the LOOP component;
receiving an adjustment instruction of a user, and performing adjustment processing on the HTML page according to the adjustment instruction to generate an adjustment HTML page;
when a JS printing instruction is received, converting the adjustment HTML page to generate JSON format data, and sending the JSON format data to a preset printer so that the printer can print notes based on the JSON format data;
when a picture printing instruction is received, converting the adjustment HTML page into a picture format, generating a bill picture, and sending the bill picture to a preset printer so that the printer can perform bill printing based on the bill picture.
2. The method for customizing a ticket according to claim 1, wherein the generating an HTML page based on a preset page length and width by using the LOOP component comprises:
writing the length and width of a preset page and the setting of a preset font into the LOOP assembly to generate the LOOP assembly with bill format data;
and calling a print function, and printing and processing the LOOP component with the bill format data to generate an HTML page.
3. The method for customizing a ticket according to claim 1, wherein said converting the adjusted HTML page into a picture format, generating a ticket picture comprises:
and converting the adjustment HTML page into a picture format according to a preset HTML2CANVAS plug-in, and generating a bill picture.
4. The method of claim 1, wherein the invoking LOOP component comprises:
calling getLodop in a preset print event function to acquire an object variable of the LOOP component.
5. The method for customizing a ticket according to claim 1, wherein after the call LOOP module, the LOOP module renders and generates an HTML page based on a preset page length and width, the method further comprises, after receiving an adjustment instruction from a user, performing adjustment processing on the HTML page according to the adjustment instruction, and before generating an adjusted HTML page:
performing blank recognition processing on the HTML page according to a preset neural network recognition algorithm to obtain a blank interface;
and according to the preset watermark setting, carrying out watermark modification processing on the blank interface to generate an HTML page with watermark.
6. The method for customizing a ticket according to claim 5, wherein after said adjusting the HTML page according to the adjustment command to generate an adjusted HTML page, further comprising:
clearing watermark fields on the adjustment HTML page;
performing blank recognition processing on the adjustment HTML page according to a preset neural network recognition algorithm to obtain an adjustment blank interface;
and according to the preset watermark setting, carrying out watermark modification processing on the adjustment blank interface to generate an HTML page with watermark.
7. The method for customizing a ticket according to claim 1, wherein said converting the adjusted HTML page into a picture format, generating a ticket picture comprises:
based on an AJAX request, calling a document. QuerySelect to traverse and read the root element and the sub-element of the adjustment HTML page to obtain a page element set;
analyzing each element attribute in the page element set to obtain an element attribute set corresponding to the page element set;
and performing virtual printing processing on the page element set according to the element attribute set to generate a bill picture.
8. The method for customized generation of tickets according to claim 1, wherein receiving the adjustment instruction of the user comprises:
based on TCP/IP protocol, receiving adjustment instruction of remote user.
9. A bill customization generation device, characterized in that the bill customization generation device comprises: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the custom generation device of the ticket to perform the custom generation method of a ticket as claimed in any of claims 1 to 8.
10. A computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the method of customising generation of notes according to any one of claims 1 to 8.
CN202311063588.0A 2023-08-22 2023-08-22 Custom generation method, equipment and storage medium for bill Pending CN117453158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311063588.0A CN117453158A (en) 2023-08-22 2023-08-22 Custom generation method, equipment and storage medium for bill

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311063588.0A CN117453158A (en) 2023-08-22 2023-08-22 Custom generation method, equipment and storage medium for bill

Publications (1)

Publication Number Publication Date
CN117453158A true CN117453158A (en) 2024-01-26

Family

ID=89578843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311063588.0A Pending CN117453158A (en) 2023-08-22 2023-08-22 Custom generation method, equipment and storage medium for bill

Country Status (1)

Country Link
CN (1) CN117453158A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012076393A (en) * 2010-10-04 2012-04-19 Seiko Epson Corp Printer, print controller, print control method and program for printer
CN115098047A (en) * 2022-05-24 2022-09-23 上海纽酷信息科技有限公司 Printing platform based on Word template and functional plug-in
CN116051346A (en) * 2022-12-08 2023-05-02 东软集团股份有限公司 Watermark generation method, watermark generation device, watermark generation medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012076393A (en) * 2010-10-04 2012-04-19 Seiko Epson Corp Printer, print controller, print control method and program for printer
CN115098047A (en) * 2022-05-24 2022-09-23 上海纽酷信息科技有限公司 Printing platform based on Word template and functional plug-in
CN116051346A (en) * 2022-12-08 2023-05-02 东软集团股份有限公司 Watermark generation method, watermark generation device, watermark generation medium and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HELLO_WORLD_QWP: "lodop 使用教程之图文详解 + 详细方法/参数的配置说明", pages 1 - 30, Retrieved from the Internet <URL:https://blog.csdn.net/hello_world_qwp/article/details/78125642> *
周陆啦: "lodop 小票排版_lodop+art-template实现web端漂亮的小票样式打印", pages 1 - 5, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_33946174/article/details/111956511> *
煮熟的鸭子会飞: "简单有效的使用lodop打印小票功能", pages 1 - 3, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_46367300/article/details/118307972> *

Similar Documents

Publication Publication Date Title
JP6384571B2 (en) Terminal control method
JP6433339B2 (en) Information processing system, server device, control method, and program
US6396593B1 (en) Postscript to bitmap conversion of graphic image files
US6791707B2 (en) Automated, hosted prepress applications
CN106528006A (en) Page printing method and device
US20150193387A1 (en) Cloud-based font service system
US9117314B2 (en) Information output apparatus, method, and recording medium for displaying information on a video display
JP6508978B2 (en) INFORMATION PROCESSING SYSTEM, SERVER, CONTROL METHOD, AND COMPUTER PROGRAM
US8582164B2 (en) Generating merged documents
US6633890B1 (en) Method for washing of graphic image files
CN108628812A (en) Method, apparatus, electronic equipment and the readable storage medium storing program for executing of self-defined face single mode plate
US20020191199A1 (en) Printing system
US7203898B2 (en) Document processing method and apparatus
JP2016162184A (en) Information processing system, information processing device, control method and computer program
JP6632424B2 (en) Information processing apparatus, program and control method
JP2015225481A (en) Program for efficiently editing print setting information
CN117453158A (en) Custom generation method, equipment and storage medium for bill
CN110196697B (en) Information processing apparatus, information processing method, and storage medium
US9626131B2 (en) Print data processing method, print data processing apparatus, and storage medium for processing print data according to print setting information in the print data
US20070180353A1 (en) Systems and methods for generating documents using multimedia data gathering tools
JP6234417B2 (en) Information processing apparatus, control method therefor, and program
US10481844B2 (en) Data communication method and information processing apparatus having multiple print settings
JP2019053606A (en) Control program
CN116795243A (en) Label printing method and system, computer equipment and medium
CN112926294A (en) Template file generation method and device

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