CN112596688A - Web end custom printing method based on TinyMCE rich text - Google Patents

Web end custom printing method based on TinyMCE rich text Download PDF

Info

Publication number
CN112596688A
CN112596688A CN202011559941.0A CN202011559941A CN112596688A CN 112596688 A CN112596688 A CN 112596688A CN 202011559941 A CN202011559941 A CN 202011559941A CN 112596688 A CN112596688 A CN 112596688A
Authority
CN
China
Prior art keywords
template
warehousing
user
printing
rich text
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.)
Withdrawn
Application number
CN202011559941.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.)
Baizhuo Network Technology Co ltd
Original Assignee
Baizhuo Network 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 Baizhuo Network Technology Co ltd filed Critical Baizhuo Network Technology Co ltd
Priority to CN202011559941.0A priority Critical patent/CN112596688A/en
Publication of CN112596688A publication Critical patent/CN112596688A/en
Withdrawn legal-status Critical Current

Links

Images

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/1204Improving or facilitating administration, e.g. print management resulting in reduced user or operator actions, e.g. presetting, automatic actions, using hardware token storing data
    • 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/1257Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles
    • 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/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server

Abstract

A method for printing on a web end based on a TinyMCE rich text comprises the following steps that 1) a user selects a document type required by the user at the web end to support 13 document types, and then a template format required by the user is set in the TinyMCE rich text and covers the existing main template format; 2) the user selects the document type in the detail page or list page to be printed, clicks and prints, provides a template selection function, selects a template set by the user, and clicks and prints; 3) the html structure and the dependent css3 file which are analyzed and processed are placed in the newly generated iframe, the web-side custom printing function is achieved through the front-end script language JavaScript, cross-platform printing including window support, an Os system and the like can be achieved due to the fact that custom printing is conducted through the browser, and the browser can operate as long as the browser can operate.

Description

Web end custom printing method based on TinyMCE rich text
Technical Field
The invention relates to the technical field of front-end development of computer engines and development platforms.
Background
To complete a software platform with Saas, the product as developed is a Saas-type internet product that manages inventory for various types of businesses. Because the method is related to daily document management of enterprises, related printing functions are required, ordinary page printing does not meet the requirements of users of products of companies, and the requirements of custom printing functions are met.
For example, the types of documents of managed products are more, however, users have more custom requirements for printing of business documents, the requirement of the users cannot be met by the simple and direct function of directly printing through web pages, and for the business documents, the users often need to export data and then adjust and process data display formats through other document editing software, so that the experience of the users is not good, and the requirement of the users is met as a first requirement for the products.
To solve this pain point, none of the existing implementations basically solves the current problems. Early self-defined printing was based on Java, and the printing module of calling the computer through the rear end carries out self-defined printing, but the browser type that supports is few, except early Ie8, later google and fire fox browser do not support, and the interface is laggard. Or a small plug-in installation is downloaded, the printing can be customized later, and most of the system requirements are met, such as the compatibility of win10, macOS and the like. Or the function is available, the requirements on the system are more moderate, but the charging price is higher. To solve the problem, a compatible method is adopted, and the best compatible method is to develop the problem through a cross-platform language and have compatibility to various environments. Then, the function development is carried out on the browser through JavaScript, so that the functionality can be met, various systems can be compatible, and the performance is also sufficiently ensured. In this case, development of a web-side printing function based on TinyMCE rich text is started.
Tinymce is a rich text editor, is a comprehensive and easy-to-use rich text editor, and has the functions of: and modifying the background default editor to be Tinymce, and if the plug-in is used, please disable other editor plug-ins. And Nodejs is a JavaScript running environment based on a Chrome V8 engine, a development platform for running the JavaScript on a server side can be used for conveniently building network application with high response speed and easy expansion. Js is an indispensable tool for front-end workers. Js occupies a place in most fields, especially in an I/O intensive type. Such as Web development, microservices, front-end construction, etc. Node.js is used as a background development language in many large-scale websites, and most of the large-scale websites are used for front-end rendering and architecture optimization. Js was also developed using node, e.g., Webpack is a powerful packager, and fact/Vue is a mature front-end componentization framework. nodejs collocates bai MongoDB as a back end; nodejs is matched with 'terminal du' to be used as a zhi compiling tool at the front end for dao; some founder zhuman instruments were edited. But there is no precedent for application on printing.
Disclosure of Invention
In order to solve the problems in the prior art, the invention aims to realize the function of self-defining a printing template through front-end language (JavaScript), and particularly to complete the improvement of the software platform of Saas on the daily document management and printing functions of an enterprise.
The technical scheme of the invention is that a method for printing a web end based on a TinyMCE rich text is characterized by comprising the following steps: step 1: the method comprises the steps that a user selects document types required by the user at a web end, supports 13 document types including purchasing storage, selling return, other storage, checking storage, transferring storage, production storage, internal reception, checking delivery, selling delivery, purchasing return, other delivery, transferring delivery, purchasing orders and selling orders, sets template formats required by the user in a TinyMCE rich text (covering the existing main template formats), including font sizes and paper sizes to be printed (A3-A6 and the like), sets templates, classifies the page templates through nodes, and stores the page templates in a storage module;
step 2: the user selects the document type in the detail page or list page to be printed, clicks and prints, provides a template selection function, selects a template set by the user, and clicks and prints; analyzing and classifying the obtained data by acquiring the detail data of the template, performing Base64 bit processing on the picture, setting the length and width style of canvas by creating a canvas object, performing character string splitting on the picture by the drawing picture attribute of the canvas, and performing 64 bit processing on the picture; matching and classifying fields set in the template and data given by a rear end, and carrying out one-to-one classification processing on the data in the form;
and 3, putting the parsed html structure and the dependent css3 file into a newly generated iframe, and then calling window.
The tag elements of HTML are the elements nodes of the DOM, which provide the structure of a document. But the document itself does not contain anything, so the element node may contain other nodes.
For fields that need special handling, such as time, picture field. And adding page dom elements after analyzing the styles one by one.
The cs 3 file refers to a Cascading Style sheet (english full name: Cascading Style Sheets), which is a computer language used to represent file styles such as HTML (an application of standard general markup language) or XML (a subset of standard general markup language).
According to the web-side printing method based on the TinyMCE rich text, the set template format required by the user specifically comprises 12 functional templates, and each functional module depends on each other.
Beneficial effect, compare with prior art, its apparent advantage:
(1) the invention realizes the self-defined printing function of the web end through the JavaScript of the front-end script language, can realize cross-platform printing because of self-defined printing through a browser, comprises supporting windows, MacOs systems and the like, has not strict requirements on the environment, can realize the self-defined printing function as long as the browser can run, is efficient and convenient, and is greatly convenient for users to use.
(2) Because the middleware is made by the node, the method has extremely high advantages of system compatibility and adaptability to different environments, the software sensitivity is kept forever in the operation of the system, the node bottom layer is written based on c + +, and the single-core flow is operated. Although multi-core has speed advantage in high-concurrency projects, under a single-core application scenario in single-core flow operation, more cores in a single core have inherent speed advantage.
Drawings
Fig. 1 is a schematic structural diagram of a node request system in an embodiment of the present invention.
Fig. 2 is a flow chart of data analysis with the node core module.
FIG. 3 is a flow diagram illustrating one embodiment of a custom print template.
Detailed Description
FIG. 1 is a schematic diagram of a system architecture for implementing a template customizing method in the embodiment of the present invention
Front end module group: the module is mainly implemented in the module by releasing some scripts at the front end, providing triggers for various functions, providing access to user experience functions, and embodying styles and interactions including UIs.
Setting a template, classifying the page template through a node, and then storing the page template in a database; the flow of how to work is as follows: in the Node core module group, the Node module mainly processes some processing of the backend data, including request type, data format, and the size of the discourse structure, and is a core area for processing and calculation, and a module generated for better serving the data to the front-end module group. The method comprises the steps of acquiring which type of document is currently transmitted data according to the summarized data transmitted to a node core module by a page, matching the document type to a dictionary model with the node core module, performing one-to-one matching classification on document fields after acquiring a matching model, processing and combining the document fields, and storing the document fields in a storage module.
A common printing model: the printing module is mainly used for displaying and processing the self-contained printing module of the web browser, and the basic printing function is realized through window print () calling.
Self-defining a printing model: the generated template is printed in and out of the front-end module group mainly through processing of the front-end module group and analysis of data by the node core module, the type of the currently transmitted data is obtained according to the summarized data transmitted to the node core module from the page, the data stored in the database is obtained according to the type of the document, the document field is subjected to reverse matching classification after the matching model is obtained, and the data structure which can be processed by the front end is processed. Performing Base64 bit processing on the picture, setting the length and width style of the canvas through creating the canvas object, performing character string splitting on the picture through the drawing picture attribute of the canvas, and performing 64 bit processing on the picture. And finally, realizing the function of self-defining the printing module.
And 3, putting the parsed html structure and the dependent css3 file into a newly generated iframe, and then calling window. An iframe is an HTML tag that acts as a document within a document, or a floating FRAME (FRAME). The iframe element creates an inline frame (i.e., inline frame) that contains another document.
According to the web-side printing method based on the TinyMCE rich text, the set required template format specifically comprises 12 functional templates and 12 functional templates which are respectively a purchasing warehousing template, a selling returning template, other warehousing templates, checking warehousing template, transferring warehousing template, a production warehousing template, an internal utilization template, a checking ex-warehouse template, a selling ex-warehouse template, a purchasing returning template, other ex-warehouse templates, transferring ex-warehouse template, a purchasing order template and a selling order template, and all the functional modules depend on one another. These modules complement each other and cooperate with each other, and each module is of no more importance. The flow of data analysis with the node core module is shown in fig. 2, and the self-set template can be selected, how to acquire detailed data of the template, the acquired data is analyzed and classified, the picture is subjected to Base64 bit processing, the front-end module acquires data display data, the ndoe core module processes the data and interacts with the database, and the data are stored and read.
As shown in fig. 3, which is a flowchart of an embodiment of a custom printing template, at the beginning, document types are preferably selected, and 13 document types are selected in total, including purchasing and warehousing, sales and return, other warehousing, checking and warehousing, transfer and warehousing, production warehousing, internal reception, checking and ex-warehousing, sales and ex-warehousing, purchase and return, other ex-warehousing, transfer and ex-warehousing, purchase orders and sales orders. After the receipt is selected, the paper types of the template are set, wherein the paper types comprise A4-A6 and triple-second-third equally, then the specific contents of the template are set, the specific contents comprise self-contained header, self-contained tail data, the template style can also be set in a self-defined mode, and the template can be stored after clicking is determined.
And selecting a self-built template to perform printing operation on the detail page of the document.

Claims (3)

1. A method for web-side printing based on TinyMCE rich text is characterized by comprising the following steps: step 1: the method comprises the steps that a user selects document types required by the user at a web end, supports 13 document types including purchasing storage, selling return, other storage, checking storage, transferring storage, production storage, internal reception, checking delivery, selling delivery, purchasing return, other delivery, transferring delivery, purchasing orders and selling orders, sets template formats required by the user in a TinyMCE rich text and covers the existing main template formats, including font sizes and paper sizes to be printed, and sets templates to classify and process page templates through nodes and then stores the page templates in a storage module;
step 2: the user selects the document type in the detail page or list page to be printed, clicks and prints, provides a template selection function, selects a template set by the user, and clicks and prints; analyzing and classifying the obtained data by acquiring the detail data of the template, performing Base64 bit processing on the picture, setting the length and width style of canvas by creating a canvas object, performing character string splitting on the picture by the drawing picture attribute of the canvas, and performing 64 bit processing on the picture; matching and classifying fields set in the template and data given by a rear end, and carrying out one-to-one classification processing on the data in the form;
and 3, putting the parsed html structure and the dependent css3 file into a newly generated iframe, and then calling window.
2. The tinycte rich text-based web-side printing method as claimed in claim 1, wherein the set self-required template format specifically includes 12 functional templates, which are a purchase warehousing template, a sales return template, other warehousing templates, inventory warehousing template, transfer warehousing template, a production warehousing template, an internal utilization template, an inventory ex-warehousing template, a sales ex-warehousing template, a purchase return template, other ex-warehousing templates, transfer ex-warehousing template, a purchase order template, a sales order template, and each functional module is independent and coexistent.
3. The method for printing the web end based on the tinyme rich text as claimed in claim 1, wherein in step 2, the page dom element is added when the style is analyzed one by one for the field of the picture and the time which need to be specially processed.
CN202011559941.0A 2020-12-25 2020-12-25 Web end custom printing method based on TinyMCE rich text Withdrawn CN112596688A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011559941.0A CN112596688A (en) 2020-12-25 2020-12-25 Web end custom printing method based on TinyMCE rich text

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011559941.0A CN112596688A (en) 2020-12-25 2020-12-25 Web end custom printing method based on TinyMCE rich text

Publications (1)

Publication Number Publication Date
CN112596688A true CN112596688A (en) 2021-04-02

Family

ID=75202695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011559941.0A Withdrawn CN112596688A (en) 2020-12-25 2020-12-25 Web end custom printing method based on TinyMCE rich text

Country Status (1)

Country Link
CN (1) CN112596688A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296660A (en) * 2021-12-24 2022-04-08 徐工汉云技术股份有限公司 Label printing method based on Vue framework
CN114415986A (en) * 2021-10-11 2022-04-29 浪潮软件股份有限公司 Document template customizing and printing method, device and computer readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750679A (en) * 2013-12-25 2015-07-01 明博教育科技有限公司 Resource loading method in webpage document editor
CN107807913A (en) * 2017-11-16 2018-03-16 金航数码科技有限责任公司 A kind of form design system and method based on web
CN107844299A (en) * 2017-12-01 2018-03-27 浪潮软件股份有限公司 A kind of implementation method of Web application development tools
CN110865775A (en) * 2019-09-26 2020-03-06 福建亿能达信息技术股份有限公司 Printing method for online design and preview based on WEB
CN111414141A (en) * 2020-03-17 2020-07-14 山东浪潮易云在线科技有限公司 Method and system for generating visual intelligent layout printing template based on SaaS mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104750679A (en) * 2013-12-25 2015-07-01 明博教育科技有限公司 Resource loading method in webpage document editor
CN107807913A (en) * 2017-11-16 2018-03-16 金航数码科技有限责任公司 A kind of form design system and method based on web
CN107844299A (en) * 2017-12-01 2018-03-27 浪潮软件股份有限公司 A kind of implementation method of Web application development tools
CN110865775A (en) * 2019-09-26 2020-03-06 福建亿能达信息技术股份有限公司 Printing method for online design and preview based on WEB
CN111414141A (en) * 2020-03-17 2020-07-14 山东浪潮易云在线科技有限公司 Method and system for generating visual intelligent layout printing template based on SaaS mode

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415986A (en) * 2021-10-11 2022-04-29 浪潮软件股份有限公司 Document template customizing and printing method, device and computer readable medium
CN114296660A (en) * 2021-12-24 2022-04-08 徐工汉云技术股份有限公司 Label printing method based on Vue framework

Similar Documents

Publication Publication Date Title
US11694215B2 (en) Systems and methods for managing web content
US10067931B2 (en) Analysis of documents using rules
KR101409673B1 (en) Persistent saving portal
US8181106B2 (en) Use of overriding templates associated with customizable elements when editing a web page
US20040221233A1 (en) Systems and methods for report design and generation
US7721195B2 (en) RTF template and XSL/FO conversion: a new way to create computer reports
US7979793B2 (en) Graphical creation of a document conversion template
US10282410B2 (en) Assistive technology for the impaired
US20040001099A1 (en) Method and system for associating actions with semantic labels in electronic documents
KR20040077530A (en) Method and system for enhancing paste functionality of a computer software application
CN109522018A (en) Page processing method, device and storage medium
CN103166981A (en) Wireless webpage transcoding method and device
CN112596688A (en) Web end custom printing method based on TinyMCE rich text
CN110598189A (en) Document processing method, device, equipment and readable storage medium
CN112765516A (en) Page content display method and device, storage medium and electronic device
CN112527291A (en) Webpage generation method and device, electronic equipment and storage medium
CN112463152A (en) Webpage adaptation method and device based on AST
CN110851136A (en) Data acquisition method and device, electronic equipment and storage medium
CN113297425B (en) Document conversion method, device, server and storage medium
CN113392354B (en) Webpage text analysis method, system, medium and electronic equipment
CN115544416A (en) Custom export method based on WEB terminal HTML (hypertext markup language) to Excel (Excel)
CN109885743B (en) Webpage data information extraction method
CN113312568A (en) Web information extraction method and system based on HTML source code and webpage snapshot
US20150324333A1 (en) Systems and methods for automatically generating hyperlinks
CN111597205B (en) Template configuration method, information extraction device, electronic equipment and 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210402