CN110008195A - A kind of dynamic configuration html turns the method, apparatus and system of pdf - Google Patents

A kind of dynamic configuration html turns the method, apparatus and system of pdf Download PDF

Info

Publication number
CN110008195A
CN110008195A CN201910290777.9A CN201910290777A CN110008195A CN 110008195 A CN110008195 A CN 110008195A CN 201910290777 A CN201910290777 A CN 201910290777A CN 110008195 A CN110008195 A CN 110008195A
Authority
CN
China
Prior art keywords
file
pdf
user terminal
html
template
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.)
Granted
Application number
CN201910290777.9A
Other languages
Chinese (zh)
Other versions
CN110008195B (en
Inventor
钟超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Eight Quit Intellectual Property Services Co Ltd
Original Assignee
Chongqing Eight Quit Intellectual Property Services 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 Chongqing Eight Quit Intellectual Property Services Co Ltd filed Critical Chongqing Eight Quit Intellectual Property Services Co Ltd
Priority to CN201910290777.9A priority Critical patent/CN110008195B/en
Publication of CN110008195A publication Critical patent/CN110008195A/en
Application granted granted Critical
Publication of CN110008195B publication Critical patent/CN110008195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • G06F16/1794Details of file format conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions

Abstract

A kind of dynamic configuration html of the present invention turns the method, apparatus and system of pdf, belongs to computer field, and a kind of dynamic configuration html provided by the invention turns the method for pdf the described method includes: user sends template configuration requests to web server;Web server calls the editable template of html webpage form to user from built-in library;Configuration parameter is sent to web server after configuration template in html webpage by user;The configuration parameter that web server receives user generates complete html page file;Complete html file is converted to pdf file by web server.

Description

A kind of dynamic configuration html turns the method, apparatus and system of pdf
Technical field
The invention belongs to computer fields, and in particular to a kind of dynamic configuration html turns the method, apparatus and system of pdf.
Background technique
The purpose that Adobe company designs pdf document format is to support on cross-platform, and the information of multimedia integrat- ing goes out Version and publication, are provided in particular in the support to Web information issuance.
PDF has the advantages that many other electronic file forms can not be compared.Pdf document format can by text, font, Format, color and independently of encapsulation such as the graph images of equipment and resolution ratio in one file.The formatted file can also wrap Containing electronic information such as hypertext link, sound and dynamic images, speciality file is supported, integrated level and security reliability are all higher.
Traditional batch pdf creation carries out Document Editing low efficiency according to pdf file, and template modification spends a large amount of manpower objects The formation efficiency of power, pdf is lower.
Summary of the invention
The present invention provides a kind of dynamic configuration the html method, apparatus and system that turn pdf, it is therefore intended that solves above-mentioned asks Topic solves traditional batch pdf creation according to pdf file and carries out Document Editing low efficiency, and template modification spends a large amount of manpower objects Power, the lower problem of the formation efficiency of pdf.
To achieve the above object, The technical solution adopted by the invention is as follows:
A kind of method that dynamic configuration html turns pdf, in web server, which comprises
The template configuration received from user terminal is requested;
The editable template of form web page in built-in library is called to be sent to user terminal;
The configuration parameter from user terminal is received, the configuration parameter is that user terminal is matched in the html webpage received Set the configuration parameter generated after template;
The configuration parameter for receiving user terminal generates complete html page file;
Complete html file is converted into pdf file.
It receives before the template configuration request of user terminal further include:
It obtains and html net identical with the pdf formwork style is created that for template according to pdf template from user terminal The editable template of page form.
It is described complete html file is converted into pdf file before, further includes:
The configuration parameter from user terminal is received, the task of this configuration parameter is added in obstruction queue, and return to institute It states the generation situation of task and/or is sent to the extraction address that task described in user terminal generates file;
It is described complete html file is converted into pdf file after, further includes:
The pdf file of generation is transferred in file server, the file server generates after receiving the pdf file File extracts address and is sent to user terminal.
A kind of dynamic configuration html turns the device of pdf, in web server, described device to include:
Request module, for receiving the template configuration request from user terminal;
Template calling module, for calling the editable template of form web page in built-in library to be sent to user terminal;
Parameter acquisition module, for receiving the configuration parameter from user terminal, the configuration parameter is that user terminal is connecing The configuration parameter generated after configuration template in the html webpage received;
Template rendering module, the configuration parameter for receiving user terminal generate complete html page file;
Html turns pdf module, for complete html file to be converted to pdf file.
Further include:
Html template creation module is created that and the pdf according to pdf template for template for obtaining from user terminal The editable template of the identical html webpage form of formwork style.
Further include:
Multithreading asynchronous task management module, for receiving the configuration parameter from user terminal, by appointing for this configuration parameter Business is added in obstruction queue, and is returned to the generation situation of the task and/or be sent to task described in user terminal and generate file Extraction address;
Further include:
Document storage server, for the pdf file of generation to be transferred in file server, the file server is connect Generation file extraction address is sent to user terminal after receiving the pdf file.
The system that a kind of dynamic configuration html turns pdf, the system comprises user terminals and the web services being connected with user terminal Device;
The user terminal includes:
Request sending module sends template configuration and requests to web server;
Template obtains module, receives the editable template of the form web page in the built-in library of web server;
Parameter sending module, the configuration parameter that user terminal inputs after configuration template in the html webpage transmitted and received to Web server, the configuration parameter are received by web server, and web server is joined according to the configuration in web server Complete html page file is converted into pdf file after the complete html page file of number generation;
The web server includes:
Request module, for receiving the template configuration request from user terminal;
Template calling module, for calling the editable template of form web page in built-in library to be sent to user terminal;
Parameter acquisition module, for receiving the configuration parameter from user terminal, the configuration parameter is that user terminal is connecing The configuration parameter generated after configuration template in the html webpage received;
Template rendering module, the configuration parameter for receiving user terminal generate complete html page file;
Html turns pdf module, for complete html file to be converted to pdf file.
In the web server further include:
Multithreading asynchronous task management module, for receiving the configuration parameter from user terminal, by appointing for this configuration parameter Business is added in obstruction queue, and is returned to the generation situation of the task and/or be sent to task described in user terminal and generate file Extraction address;And/or
Document storage server, for the pdf file of generation to be transferred in file server, the file server is connect Generation file extraction address is sent to user terminal after receiving the pdf file.
The invention has the advantages that realizing pdf automation wound using html dynamic page according to according to visual configuration It builds, according to the principle of dynamic web page, is provided using web server to user terminal and edit required pdf template in html webpage The html file of pattern, reuses html and turns pdf plug-in unit html file is converted to pdf file, according to html characteristic of speech sounds, shape At with the consistent template for facilitating editor of pdf pattern.Therefore different pdf files can be constructed according to different parameters, make It obtains the creation of pdf file, modify by being transformed on line under line, greatly improve working efficiency.
Detailed description of the invention
Fig. 1 is the method flow diagram that a kind of dynamic configuration html that one embodiment of the invention provides turns pdf;
Fig. 2 be another embodiment of the present invention provides a kind of dynamic configuration html turn the method flow diagram of pdf;
Fig. 3 is the method flow diagram that a kind of dynamic configuration html that one embodiment of the invention provides turns pdf;
Fig. 4 be another embodiment of the present invention provides a kind of dynamic configuration html turn the method flow diagram of pdf;
Fig. 5 is the structural block diagram for the device that a kind of dynamic configuration html that one embodiment of the invention provides turns pdf;
Fig. 6 be another embodiment of the present invention provides a kind of dynamic configuration html turn pdf device structural block diagram;
Fig. 7 is the structural block diagram for the device that a kind of dynamic configuration html that one embodiment of the invention provides turns pdf;
Fig. 8 be another embodiment of the present invention provides a kind of dynamic configuration html turn the method flow diagram of pdf;
Fig. 9 is the structural block diagram for the device that a kind of dynamic configuration html that one embodiment of the invention provides turns pdf.
Specific embodiment
Firstly the need of explanation, in each embodiment of the present invention, related term are as follows:
Web server, web server are used to receive the instruction of user terminal, edit the html page and are sent to user terminal, return It returns and generates the html page preview according to user terminal demand editor.
The editable template of html webpage form, the editable template of html webpage form are that user terminal is based on common dynamic Web resource development technique: JSP/Servlet, ASP, PHP etc., using the prior art make web server in dynamic resource, This dynamic resource can by web server processing piece together, generate user terminal using configuration parameter configure with PDF formwork style phase Same html webpage file;Optionally, thymeleaf can be used as html template engine.
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Referring to FIG. 1, it illustrates the method that a kind of dynamic configuration html provided by one embodiment of the present invention turns pdf, The described method includes:
110, user terminal sends template configuration and requests to web server;
120, web server calls the editable template of html webpage form to user terminal from built-in library;
130, configuration parameter is sent to web server after configuration template in html webpage by user terminal;
140, the configuration parameter that web server receives user terminal generates complete html page file;
150, complete html file is converted to pdf file by web server.
In above-described embodiment, in a large amount of pdf file edit work, such as user terminal is directly edited in pdf software Required file or when changing pdf file into using the good file defensive position turn of the software development such as wps, user terminal needs constantly to repeat Cumbersome work, wastes time resource;
The present embodiment in view of the above-mentioned problems, by user terminal need repetitive operation work carry out template creation, and according to Visual configuration realizes pdf automation creation using html dynamic page;
User's initial landing web server is equivalent to user by user terminal and sends template configuration request, web server The editable template that html webpage form is sent to user, can be according to this template for user's preview formwork style and user The information such as pattern and content in pdf file required for pattern editor, such as the configuration of editing template pattern, header, footer configuration; Web server receives the template parameter of user's input, html template is rendered to complete html file, then will be complete Html file is converted into pdf file using plug-in unit.Optionally, complete html file is converted into pdf text using itext plug-in unit Part.Wherein, itext is the prior art.
Further, referring to FIG. 2, it illustrates another embodiment of the present invention, the web server is from built-in library Before the editable template of calling html webpage form is to user terminal, further includes:
100, user terminal is created that identical as the pdf formwork style according to pdf template using the pdf template as template Html webpage form editable template and store to web server.
In above-described embodiment, in web server, it is stored with the editable template of html webpage form, html webpage form Editable template be that user terminal is based on common dynamic web development of resources technology: JSP/Servlet, ASP, PHP etc., using existing Dynamic resource in the web server for having technology to make, this dynamic resource can be pieced together by web server processing, generate user terminal The html webpage file identical with PDF formwork style configured using configuration parameter;Optionally, thymeleaf conduct can be used Html template engine.
Further, referring to FIG. 3, it illustrates another embodiment of the present invention, the web server will be complete Html file is converted to before pdf file, further includes:
131, the task of this configuration parameter is added to obstruction queue after receiving the configuration parameter of user terminal by web server In, and return to the generation situation of the task and/or be sent to the extraction address that task described in user terminal generates file.
In above-described embodiment, since product task amount is huge and is influenced by network factors using asynchronous product.In fact Existing mode is following steps:
1) the mission thread pond of an obstruction queue is constructed as product mission thread pond, is used after receiving product task Asynchronous thread carries out product work.
2) the mission thread pond of an obstruction queue is retried as product mission failure processing thread pool.Here needle It is unsuccessfully retried as caused by network cause.
3) task status is updated.
User obtains product state according to product task id training in rotation.Continue training in rotation in progress, failure then returns to task mistake Lose reason.
Further, referring to FIG. 4, it illustrates another embodiment of the present invention, the web server will be complete Html file is converted to after pdf file, further includes:
160, the pdf file of generation is transferred in file server by web server,
161, generation file extraction address is sent to user terminal after the file server receives the pdf file.
In above-described embodiment, when web server needs to handle the pdf file generated task that more user terminal is submitted, web The processing time of server may be considerably long, and to avoid waste user time, web server generates a file and extracts address, User can after a period of time extract generated pdf document, save user time.
Further, referring to FIG. 1, it illustrates the sides that a kind of dynamic configuration html of one embodiment of the invention turns pdf Method is used for web server end, which comprises
The template configuration received from user terminal is requested;
The editable template of form web page in built-in library is called to be sent to user terminal;
The configuration parameter from user terminal is received, the configuration parameter is that user terminal is matched in the html webpage received Set the configuration parameter generated after template;
The configuration parameter for receiving user terminal generates complete html page file;
Complete html file is converted into pdf file.
In above-described embodiment, in a large amount of pdf file edit work, such as user terminal is directly edited in pdf software Required file or when changing pdf file into using the good file defensive position turn of the software development such as wps, user needs constantly to repeat numerous Trivial work, wastes time resource;
The present embodiment is in view of the above-mentioned problems, need the work of repetitive operation to carry out template creation user, and according to can Pdf automation creation is realized using html dynamic page depending on changing configuration;
User terminal initial landing web server is equivalent to user by user terminal and sends template configuration request, web services Device sends the editable template of html webpage form to user terminal, can be according to this for user's preview formwork style and user The letters such as pattern and content in pdf file required for formwork style editor, such as the configuration of editing template pattern, header, footer configuration Breath;Web server receives the template parameter of user terminal input, html template is rendered to complete html file, then will be complete Whole html file is converted into pdf file using plug-in unit.Optionally, complete html file is converted to using itext plug-in unit Pdf file.Wherein, itext is the prior art.
Further, referring to FIG. 2, it illustrates another embodiment of the present invention, the template from user terminal is received Before configuring request further include:
It obtains and html net identical with the pdf formwork style is created that for template according to pdf template from user terminal The editable template of page form.
In above-described embodiment, in web server, it is stored with the editable template of html webpage form, html webpage form Editable template be that user is based on common dynamic web development of resources technology: JSP/Servlet, ASP, PHP etc., use is existing Dynamic resource in the web server of technology production, this dynamic resource can be pieced together by web server processing, generate user and use The html webpage file identical with PDF formwork style of configuration parameter configuration;Optionally, thymeleaf can be used as html Template engine.
Further, Fig. 3 and Fig. 4 are please referred to, it is described by complete html text it illustrates another embodiment of the present invention Part is converted to before pdf file, further includes:
The configuration parameter from user terminal is received, the task of this configuration parameter is added in obstruction queue, and return to institute It states the generation situation of task and/or is sent to the extraction address that task described in user terminal generates file;
It is described complete html file is converted into pdf file after, further includes:
The pdf file of generation is transferred in file server, the file server generates after receiving the pdf file File extracts address and is sent to user terminal.
In above-described embodiment, since product task amount is huge and is influenced by network factors using asynchronous product.In fact Existing mode is following steps:
1) the mission thread pond of an obstruction queue is constructed as product mission thread pond, is used after receiving product task Asynchronous thread carries out product work.
2) the mission thread pond of an obstruction queue is retried as product mission failure processing thread pool.Here needle It is unsuccessfully retried as caused by network cause.
3) task status is updated.
When web server needs to handle the pdf file generated task that more user terminal is submitted, the processing of web server Time may be considerably long, and to avoid waste user time, web server generates a file and extracts address, and user can pass through Generated pdf document is extracted after a period of time, saves user time.
Referring to FIG. 5, it illustrates the device that a kind of dynamic configuration html provided by one embodiment of the present invention turns pdf, For in web server, described device includes:
Request module 210, for receiving the template configuration request from user terminal;
Template calling module 220, for calling the editable template of form web page in built-in library to be sent to user terminal;
Parameter acquisition module 230, for receiving the configuration parameter from user terminal, the configuration parameter is that user terminal exists The configuration parameter generated after configuration template in the html webpage received;
Template rendering module 240, the configuration parameter for receiving user terminal generate complete html page file;
Html turns pdf module 250, for complete html file to be converted to pdf file.
In above-described embodiment, in a large amount of pdf file edit work, such as user terminal is directly edited in pdf software Required file or when changing pdf file into using the good file defensive position turn of the software development such as wps, user needs constantly to repeat numerous Trivial work, wastes time resource;
The present embodiment is in view of the above-mentioned problems, need the work of repetitive operation to carry out template creation user, and according to can Pdf automation creation is realized using html dynamic page depending on changing configuration;
User connects the request module of web server by user terminal initial landing web server, is equivalent to user End sends template configuration request, and web server sends the editable of html webpage form using template calling module to user terminal Template, can pattern and interior in the pdf file according to required for this formwork style editor for user's preview formwork style and user Hold, such as the information such as the configuration of editing template pattern, header, footer configuration;The parameter acquisition module of web server receives user The template parameter of input is held, html template is rendered to complete html file by template rendering module, then complete html is literary Part is converted into pdf file using plug-in unit.Optionally, complete html file is converted into pdf file using itext plug-in unit.Its In, itext is the prior art.
Further, referring to FIG. 6, it illustrates another embodiment of the present invention, further includes:
Html template creation module 200, for obtain from user terminal according to pdf template be template be created that with it is described The editable template of the identical html webpage form of pdf formwork style.
In above-described embodiment, in web server, it is stored with the editable template of html webpage form, html webpage form Editable template be that user using html template creation module and is based on by user terminal editor html template creation module Common dynamic web development of resources technology: JSP/Servlet, ASP, PHP etc., using dynamic in the web server of prior art production State resource, this dynamic resource can by web server processing piece together, generate user terminal using configuration parameter configure with PDF mould The identical html webpage file of plate pattern;Optionally, thymeleaf can be used as html template engine.
Further, referring to FIG. 7, it illustrates another embodiment of the present invention, further includes:
Multithreading asynchronous task management module 231, for receiving the configuration parameter from user terminal, by this configuration parameter Task is added in obstruction queue, and is returned to the generation situation of the task and/or be sent to task described in user terminal and generate text The extraction address of part;
Document storage server 260, for the pdf file of generation to be transferred in file server, the file service Generation file extraction address is sent to user terminal after device receives the pdf file.
In above-described embodiment, since product task amount is huge and is influenced by network factors using asynchronous product.In fact Existing mode is following steps:
1) the mission thread pond of an obstruction queue is constructed as product mission thread pond, which is that multithreading is asynchronous Task management module, multithreading asynchronous task management module use asynchronous thread to carry out product work after receiving product task.
2) the mission thread pond of an obstruction queue is retried as product mission failure processing thread pool.Here needle It is unsuccessfully retried as caused by network cause.
3) task status is updated.
When web server needs processing compared with the pdf file generated task that multi-user is submitted by user terminal, web services The processing time of device may be considerably long, and to avoid waste user time, web server generates a file and extracts address, and will Generated pdf file is transferred to document storage server, user can after a period of time to generated pdf document into Row extracts, and saves user time.
The system that a kind of dynamic configuration html provided by one embodiment of the present invention turns pdf,
The system comprises user terminals and the web server being connected with user terminal;
The user terminal includes:
Request sending module sends template configuration and requests to web server;
Template obtains module, receives the editable template of the form web page in the built-in library of web server;
Parameter sending module, the configuration parameter that user terminal inputs after configuration template in the html webpage transmitted and received to Web server, the configuration parameter are received by web server, and web server is joined according to the configuration in web server Complete html page file is converted into pdf file after the complete html page file of number generation;
The web server includes:
Request module, for receiving the template configuration request from user terminal;
Template calling module, for calling the editable template of form web page in built-in library to be sent to user terminal;
Parameter acquisition module, for receiving the configuration parameter from user terminal, the configuration parameter is that user terminal is connecing The configuration parameter generated after configuration template in the html webpage received;
Template rendering module, the configuration parameter for receiving user terminal generate complete html page file;
Html turns pdf module, for complete html file to be converted to pdf file.
In above-described embodiment, in a large amount of pdf file edit work, such as user terminal is directly edited in pdf software Required file or when changing pdf file into using the good file defensive position turn of the software development such as wps, user needs constantly to repeat numerous Trivial work, wastes time resource;
The present embodiment is in view of the above-mentioned problems, need the work of repetitive operation to carry out template creation user, and according to can Pdf automation creation is realized using html dynamic page depending on changing configuration;
User logs in the request module that web server connects web server by the request sending module of user terminal, It is equivalent to user terminal and sends template configuration request, web server sends html webpage shape to user terminal using template calling module The editable template of formula obtains module preview formwork style by template for user and user can be according to this formwork style The information such as pattern and content in pdf file required for editing, such as the configuration of editing template pattern, header, footer configuration pass through ginseng Number sending module is sent to web server;The parameter acquisition module of web server receives the template parameter of user terminal input, Html template is rendered to complete html file by template rendering module, then complete html file is converted into using plug-in unit Pdf file.Optionally, complete html file is converted into pdf file using itext plug-in unit.Wherein, itext is existing skill Art.
Further, in the web server further include:
Multithreading asynchronous task management module, for receiving the configuration parameter from user terminal, by appointing for this configuration parameter Business is added in obstruction queue, and is returned to the generation situation of the task and/or be sent to task described in user terminal and generate file Extraction address;And/or
Document storage server, for the pdf file of generation to be transferred in file server, the file server is connect Generation file extraction address is sent to user terminal after receiving the pdf file.
In above-described embodiment, since product task amount is huge and is influenced by network factors using asynchronous product.In fact Existing mode is following steps:
1) the mission thread pond of an obstruction queue is constructed as product mission thread pond, which is that multithreading is asynchronous Task management module, multithreading asynchronous task management module use asynchronous thread to carry out product work after receiving product task.
2) the mission thread pond of an obstruction queue is retried as product mission failure processing thread pool.Here needle It is unsuccessfully retried as caused by network cause.
3) task status is updated.
When web server needs processing compared with the pdf file generated task that multi-user is submitted by user terminal, web services The processing time of device may be considerably long, and to avoid waste user time, web server generates a file and extracts address, and will Generated pdf file is transferred to document storage server, user can after a period of time to generated pdf document into Row extracts, and saves user time.
Referring to FIG. 8, another embodiment of the present invention, firstly, designing conversion configurations database, specific word according to conversion requirements The information such as section html template pattern, header configuration, footer configuration.Use JAVA language as rear end instruction, mysql as data Library storing data, node provide the operation of page visual configuration as front end development language.Here thymeleaf conduct is used Html template engine, itext is as pdf editing component.Thymeleaf template engine does not influence html syntax format, convenient straight Connect dynamic previewing, itext provides efficiently HTML conversion pdf function and editting function, realization principle and do not repeating.
User calls corresponding template configuration to carry out product by the service parameter of oneself, and system receives product and asks It asks, creates product task record, and return to data after the pdf file path of pre-generatmg, task id.Product mission thread pond root It is obtained according to configuration id and shifts to an earlier date configuration content created, it is using thymeleaf engine that parameter and template configuration combination producing is complete Whole html language content.HTML content is converted into pdf file using itext component, completes the creation of pdf directly by file Stream uploads to file server.Since product task amount is huge and is influenced by network factors using asynchronous product.Realization side Formula
1) the mission thread pond of an obstruction queue is constructed as product mission thread pond, is used after receiving product task Asynchronous thread carries out product work.
2) the mission thread pond of an obstruction queue is retried as product mission failure processing thread pool.Here needle It is unsuccessfully retried as caused by network cause.
3) task status is updated.
User obtains product state according to product task id training in rotation.Continue training in rotation in progress, failure then returns to task mistake Lose reason.
Referring to FIG. 9, according to pdf template, html template is write in creation in another embodiment of the present invention, pdf template is configured Header, the configuration of footer pattern drawing template establishment, user terminal be passed to template parameter, and it is literary that html template is rendered to complete html Part.Html file is converted into pdf style configuration according to its pattern and generates binary pdf file stream.File stream is uploaded To file server.Asynchronous task based on multithreading, asynchronous product avoid waiting for.Pdf file path is returned to operation system.
Above-mentioned specific design and preferred embodiment can be used as convenient those skilled in the art understand that and implementing.
It should be understood that dynamic configuration html provided by the above embodiment turns pdf device in the task of completion, only more than The division progress of each functional module is stated for example, can according to need and in practical application by above-mentioned function distribution by difference Functional module complete, i.e., the html internal structure for turning pdf device is divided into different functional modules, to complete above description All or part of function.In addition, html provided by the above embodiment turns pdf device and html turns pdf embodiment of the method category In same design, specific implementation process is detailed in embodiment of the method, and which is not described herein again.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..The foregoing is merely the present invention Preferred embodiment, be not intended to limit the invention, all within the spirits and principles of the present invention, it is made it is any modification, etc. With replacement, improvement etc., should all be included in the protection scope of the present invention.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme should all cover within the scope of the claims and the description of the invention.

Claims (10)

1. a kind of method that dynamic configuration html turns pdf, which is characterized in that in web server, which comprises
The template configuration received from user terminal is requested;
The editable template of form web page in built-in library is called to be sent to user terminal;
The configuration parameter from user terminal is received, the configuration parameter is that user terminal configures mould in the html webpage received The configuration parameter generated after plate;
The configuration parameter for receiving user terminal generates complete html page file;
Complete html file is converted into pdf file.
2. a kind of dynamic configuration html turns the method for pdf as described in claim 1, which is characterized in that receive from user terminal Template configuration request before further include:
It obtains and html webpage shape identical with the pdf formwork style is created that for template according to pdf template from user terminal The editable template of formula.
3. a kind of dynamic configuration html turns the method for pdf as described in claim 1, which is characterized in that described by complete html File is converted to before pdf file, further includes:
The configuration parameter from user terminal is received, the task of this configuration parameter is added in obstruction queue, and returns to described appoint The generation situation of business and/or the extraction address for being sent to the generation file of task described in user terminal.
4. a kind of dynamic configuration html turns the method for pdf as described in claim 1, which is characterized in that described by complete html File is converted to after pdf file, further includes:
The pdf file of generation is transferred in file server, the file server generates file after receiving the pdf file It extracts address and is sent to user terminal.
5. the device that a kind of dynamic configuration html turns pdf, which is characterized in that in web server, described device to include:
Request module, for receiving the template configuration request from user terminal;
Template calling module, for calling the editable template of form web page in built-in library to be sent to user terminal;
Parameter acquisition module, for receiving the configuration parameter from user terminal, the configuration parameter is that user terminal is receiving Html webpage on the configuration parameter that generates after configuration template;
Template rendering module, the configuration parameter for receiving user terminal generate complete html page file;
Html turns pdf module, for complete html file to be converted to pdf file.
6. a kind of dynamic configuration html turns the device of pdf as claimed in claim 5, which is characterized in that further include:
Html template creation module is created that and the pdf template according to pdf template for template for obtaining from user terminal The editable template of the identical html webpage form of pattern.
7. a kind of dynamic configuration html turns the device of pdf as claimed in claim 5, which is characterized in that further include:
Multithreading asynchronous task management module adds the task of this configuration parameter for receiving the configuration parameter from user terminal Enter into obstruction queue, and returns to the generation situation of the task and/or be sent to task described in user terminal and generate mentioning for file Take address.
8. a kind of dynamic configuration html turns the device of pdf as claimed in claim 5, which is characterized in that further include:
Document storage server, for the pdf file of generation to be transferred in file server, the file server receives institute Generation file extraction address is sent to user terminal after stating pdf file.
9. the system that a kind of dynamic configuration html turns pdf, which is characterized in that be connected the system comprises user terminal and with user terminal Web server;
The user terminal includes:
Request sending module sends template configuration and requests to web server;
Template obtains module, receives the editable template of the form web page in the built-in library of web server;
Parameter sending module, the configuration parameter that user terminal inputs after configuration template in the html webpage transmitted and received give web clothes Business device, the configuration parameter are received by web server, and web server is generated according to the configuration parameter in web server Complete html page file is converted into pdf file after complete html page file;
The web server includes:
Request module, for receiving the template configuration request from user terminal;
Template calling module, for calling the editable template of form web page in built-in library to be sent to user terminal;
Parameter acquisition module, for receiving the configuration parameter from user terminal, the configuration parameter is that user terminal is receiving Html webpage on the configuration parameter that generates after configuration template;
Template rendering module, the configuration parameter for receiving user terminal generate complete html page file;
Html turns pdf module, for complete html file to be converted to pdf file.
10. a kind of dynamic configuration html turns the system of pdf as claimed in claim 5, which is characterized in that in the web server Further include:
Multithreading asynchronous task management module adds the task of this configuration parameter for receiving the configuration parameter from user terminal Enter into obstruction queue, and returns to the generation situation of the task and/or be sent to task described in user terminal and generate mentioning for file Take address;And/or
Document storage server, for the pdf file of generation to be transferred in file server, the file server receives institute Generation file extraction address is sent to user terminal after stating pdf file.
CN201910290777.9A 2019-04-11 2019-04-11 Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf) Active CN110008195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910290777.9A CN110008195B (en) 2019-04-11 2019-04-11 Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910290777.9A CN110008195B (en) 2019-04-11 2019-04-11 Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf)

Publications (2)

Publication Number Publication Date
CN110008195A true CN110008195A (en) 2019-07-12
CN110008195B CN110008195B (en) 2020-06-02

Family

ID=67171122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910290777.9A Active CN110008195B (en) 2019-04-11 2019-04-11 Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf)

Country Status (1)

Country Link
CN (1) CN110008195B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851092A (en) * 2019-11-15 2020-02-28 厦门商集网络科技有限责任公司 Customized printing method and system based on printing template under B/S framework
CN111243044A (en) * 2020-01-06 2020-06-05 福建天泉教育科技有限公司 PDF transcoding method and storage medium for webpage containing picture
CN112187909A (en) * 2020-09-23 2021-01-05 上海万向区块链股份公司 Financing information generation system and method based on block chain
CN112836468A (en) * 2021-01-21 2021-05-25 山东健康医疗大数据有限公司 Method and system for generating pdf document by virtue of front end and back end of server
CN113704187A (en) * 2020-05-21 2021-11-26 北京字节跳动网络技术有限公司 Method and device for generating file
CN113723059A (en) * 2021-07-29 2021-11-30 微易签(杭州)科技有限公司 Method and system for converting HTML (hypertext markup language) into PDF (Portable document Format) based on block chain
CN115242777A (en) * 2022-07-12 2022-10-25 观澜网络(杭州)有限公司 Method, system, server and storage medium for generating file

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122233A1 (en) * 2008-11-13 2010-05-13 Honeywell International Inc. Software license independent model image generation system and method
CN102938115A (en) * 2012-11-22 2013-02-20 南京途牛科技有限公司 Contract agreement management system
CN104461538A (en) * 2014-12-08 2015-03-25 畅捷通信息技术股份有限公司 Report generation method and report generation system
US20150149371A1 (en) * 2013-11-27 2015-05-28 Red Ball Express, LLC System And Method For Generating And Formatting Formally Correct Case Documents From Rendered Semantic Content
CN105786787A (en) * 2016-02-29 2016-07-20 四川长虹电器股份有限公司 Efficient PDF report form testing method based on Java
CN105955730A (en) * 2016-04-26 2016-09-21 浪潮电子信息产业股份有限公司 Method for obtaining SSR (Server Security Reinforcement) centralized management platform statement
CN106326306A (en) * 2015-07-03 2017-01-11 湖南科兴达信息科技有限公司 Technology of generating digital newspaper by automatically recognizing PDF file
CN106776498A (en) * 2016-12-09 2017-05-31 山东浪潮商用系统有限公司 A kind of method that data export as PDF
CN108052490A (en) * 2017-12-29 2018-05-18 北京仁和汇智信息技术有限公司 A kind of online methodology of composition of XML papers and device
CN109582928A (en) * 2018-12-06 2019-04-05 万兴科技股份有限公司 PDF report data extracting method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100122233A1 (en) * 2008-11-13 2010-05-13 Honeywell International Inc. Software license independent model image generation system and method
CN102938115A (en) * 2012-11-22 2013-02-20 南京途牛科技有限公司 Contract agreement management system
US20150149371A1 (en) * 2013-11-27 2015-05-28 Red Ball Express, LLC System And Method For Generating And Formatting Formally Correct Case Documents From Rendered Semantic Content
CN104461538A (en) * 2014-12-08 2015-03-25 畅捷通信息技术股份有限公司 Report generation method and report generation system
CN106326306A (en) * 2015-07-03 2017-01-11 湖南科兴达信息科技有限公司 Technology of generating digital newspaper by automatically recognizing PDF file
CN105786787A (en) * 2016-02-29 2016-07-20 四川长虹电器股份有限公司 Efficient PDF report form testing method based on Java
CN105955730A (en) * 2016-04-26 2016-09-21 浪潮电子信息产业股份有限公司 Method for obtaining SSR (Server Security Reinforcement) centralized management platform statement
CN106776498A (en) * 2016-12-09 2017-05-31 山东浪潮商用系统有限公司 A kind of method that data export as PDF
CN108052490A (en) * 2017-12-29 2018-05-18 北京仁和汇智信息技术有限公司 A kind of online methodology of composition of XML papers and device
CN109582928A (en) * 2018-12-06 2019-04-05 万兴科技股份有限公司 PDF report data extracting method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851092A (en) * 2019-11-15 2020-02-28 厦门商集网络科技有限责任公司 Customized printing method and system based on printing template under B/S framework
CN111243044A (en) * 2020-01-06 2020-06-05 福建天泉教育科技有限公司 PDF transcoding method and storage medium for webpage containing picture
CN113704187A (en) * 2020-05-21 2021-11-26 北京字节跳动网络技术有限公司 Method and device for generating file
CN112187909A (en) * 2020-09-23 2021-01-05 上海万向区块链股份公司 Financing information generation system and method based on block chain
CN112187909B (en) * 2020-09-23 2022-11-08 上海万向区块链股份公司 Financing information generation system and method based on block chain
CN112836468A (en) * 2021-01-21 2021-05-25 山东健康医疗大数据有限公司 Method and system for generating pdf document by virtue of front end and back end of server
CN113723059A (en) * 2021-07-29 2021-11-30 微易签(杭州)科技有限公司 Method and system for converting HTML (hypertext markup language) into PDF (Portable document Format) based on block chain
CN115242777A (en) * 2022-07-12 2022-10-25 观澜网络(杭州)有限公司 Method, system, server and storage medium for generating file

Also Published As

Publication number Publication date
CN110008195B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN110008195A (en) A kind of dynamic configuration html turns the method, apparatus and system of pdf
CN111079047B (en) Web-oriented page construction system
CN107092625B (en) Data configuration method, data processing method and device
CN110442822A (en) A kind of small routine content displaying method, device, equipment and storage medium
CN109582647B (en) Unstructured evidence file oriented analysis method and system
CN107423061A (en) A kind of list generation method based on ISON data
CN112286513A (en) Visual design method and device based on component metadata
CN108009243B (en) Multi-user synchronous editing processing system and processing method for same document
CN104484216A (en) Method and device for generating service interface document and on-line test tool
CN109933752A (en) A kind of method and apparatus exporting electronic document
CN110244941B (en) Task development method and device, electronic equipment and computer readable storage medium
CN104199879A (en) Data processing method and device
CN111309313A (en) Method for quickly generating HTML (hypertext markup language) and storing form data
CN110377892A (en) A kind of government intelligence form templat designing system
CN107341102A (en) A kind of test case file generation method and device
CN109445771A (en) A kind of off line network layers block code Auto-Generation Tool of CS framework and method
CN113672204A (en) Interface document generation method, system, electronic equipment and storage medium
CN112507273A (en) Webpage generating method and device and electronic equipment
CN113312033A (en) Template protocol generation and management method
CN102855234B (en) Makeup method and makeup device used for variable data
CN106446055A (en) Webpage generation method and system
CN111273903B (en) Webpage making method and device, computer equipment and computer storage medium
CN112861059A (en) Visual component generation method and device, computer equipment and readable storage medium
CN112084446A (en) Webpage editing method, editor, electronic equipment and readable storage medium
CN107506597A (en) Medical files acquisition methods, terminal and server

Legal Events

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