CN109815464B - PDF document generation method, device, electronic equipment and storage medium - Google Patents

PDF document generation method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109815464B
CN109815464B CN201811537721.0A CN201811537721A CN109815464B CN 109815464 B CN109815464 B CN 109815464B CN 201811537721 A CN201811537721 A CN 201811537721A CN 109815464 B CN109815464 B CN 109815464B
Authority
CN
China
Prior art keywords
pdf
template
data
information
service data
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.)
Active
Application number
CN201811537721.0A
Other languages
Chinese (zh)
Other versions
CN109815464A (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811537721.0A priority Critical patent/CN109815464B/en
Publication of CN109815464A publication Critical patent/CN109815464A/en
Application granted granted Critical
Publication of CN109815464B publication Critical patent/CN109815464B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention relates to a PDF document generation method, a PDF document generation device, electronic equipment and a storage medium. The method comprises the following steps: establishing a PDF template library, wherein the template library comprises a group of PDF templates with different file formats; receiving customer information input by a user, and acquiring service data from the input customer information; analyzing the data stream type of the service data according to the acquired service data; selecting a target PDF template from the PDF template library according to the data stream type, wherein the target PDF template comprises a template component corresponding to the data stream type; and loading a template component in the target PDF template, analyzing the service data to obtain information data corresponding to each template component, filling the information data corresponding to each template component into each corresponding template component, and generating a PDF file for display. The method and the device can quickly construct PDF document function implementation, thereby improving development efficiency, accelerating project progress and reducing enterprise operation cost.

Description

PDF document generation method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of electronic documents, and in particular, to a PDF document generating method, apparatus, electronic device, and storage medium.
Background
Currently, various business systems generally need to generate proposal documents in various PDF formats according to different business requirements. The styles of the documents are different, if the generation process of each document is independently developed, the business system is required to be continuously updated, and the problems of large development workload, heavy maintenance work and the like are faced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a PDF document generation method and apparatus, an electronic device, and a computer-readable storage medium, so as to reduce the development amount of PDF documents and the enterprise operation cost.
A first aspect of the present application provides a PDF document generation method, the method including:
Establishing a PDF template library, wherein the template library comprises a group of PDF templates with different file formats;
Receiving customer information input by a user, and acquiring service data from the input customer information;
analyzing the data stream type of the service data according to the acquired service data;
selecting a target PDF template from the PDF template library according to the data stream type, wherein the target PDF template comprises a template component corresponding to the data stream type; and
And loading a template component in the target PDF template, analyzing the service data to obtain information data corresponding to each template component, filling the information data corresponding to each template component into each corresponding template component, and generating a PDF file for display.
Preferably, the format of the PDF document includes a text box, a selection box or a button of the PDF document, and the creating the PDF template library includes:
generating a PDF template according to a text box, a selection box or a button of the PDF document for data filling, and storing the generated PDF template in a PDF template library.
Preferably, the number of the target PDF templates is a plurality, and the method further includes:
And filling information data corresponding to the template components into template components corresponding to a plurality of target PDF templates, and calling a preset merging PDF class to merge the plurality of target PDF templates filled with the information data to generate a PDF file for display, wherein the merging PDF class is Copypdf class.
Preferably, the method further comprises:
And receiving a request for downloading the PDF file to provide PDF file downloading and printing.
Preferably, the receiving the data input by the user includes:
and providing a customer information page for a customer to enter customer information and receiving the customer information input by the user through the customer information page.
Preferably, the receiving the customer information input by the user and acquiring the service data from the input customer information includes:
Providing a product selection interface for a customer to purchase individual risk products, wherein the product selection interface provides a plurality of main risk options matched with the customer information according to the data received from the customer data page and displays the main risk options on the product selection page for the customer to select; and
And acquiring the personal insurance product information selected by the user as the service data.
Preferably, the PDF template is an XML template file.
A second aspect of the present application provides a PDF document generation apparatus including:
The establishment module is used for establishing a PDF template library, wherein the template library comprises a group of PDF templates with different document formats;
the acquisition module is used for receiving the client information input by the user and acquiring service data from the input client information;
the template determining module is used for analyzing the data flow type of the service data according to the acquired service data and selecting a target PDF template from the PDF template library according to the data flow type, wherein the target PDF template comprises a template component corresponding to the data flow type; and
And the document generation module is used for loading the template components in the target PDF template, analyzing the service data to obtain information data corresponding to each template component, filling the information data corresponding to each template component into each corresponding template component, and generating a PDF file for display.
A third aspect of the present application provides an electronic device comprising a processor for implementing the PDF document generation method when executing a computer program stored in a memory.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the PDF document generation method.
In the invention, all PDF document components can multiplex the functions of the independent template components, and when in development, the functions of all the components and the realized templates are known, so that the assembly of the template functions is completed, and the realization of the functions of the PDF document can be quickly constructed, thereby improving the development efficiency, accelerating the project progress and reducing the running cost of enterprises.
Drawings
FIG. 1 is a schematic view of an application environment of a PDF document generating method of the present invention.
FIG. 2 is a flowchart of one embodiment of a PDF document generation method of the invention.
Fig. 3 is a schematic diagram of a PDF document generating apparatus in an embodiment of the present invention.
Fig. 4 is a schematic diagram of an electronic device according to a preferred embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will be more clearly understood, a more particular description of the application will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It should be noted that, without conflict, the embodiments of the present application and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, and the described embodiments are merely some, rather than all, embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
Preferably, the PDF document generation method of the present invention is applied in one or more electronic devices. The electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an Application SPECIFIC INTEGRATED Circuit (ASIC), a Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a digital Processor (DIGITAL SIGNAL Processor, DSP), an embedded device, and the like.
The electronic device may be a computing device such as a desktop computer, a notebook computer, a tablet computer, a cloud server, and the like. The device can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
Example 1
FIG. 1 is a schematic view of an application environment of a PDF document generating method of the present invention.
Referring to fig. 1, the PDF document generation method 100 is applied to a user terminal 1. The user terminal 1 is used for acquiring service data, determining a PDF template according to the acquired service data, and generating a PDF file after filling the service data into a template component of the PDF template. In this embodiment, the user terminal 1 may be a notebook computer, a desktop computer, or a development machine.
FIG. 2 is a flowchart of one embodiment of a PDF document generation method of the invention. The order of the steps in the flow diagrams may be changed, and some steps may be omitted, according to different needs.
Referring to fig. 2, the PDF document generating method specifically includes the following steps:
Step 201, a PDF template library is established, wherein the PDF template library comprises a group of PDF templates with different document formats.
In this embodiment, the format of the PDF document includes a text box, a selection box, or a button of the PDF document, and the establishing the PDF template library includes: the user terminal 1 generates a PDF template based on a text box, a selection box, or a button of the PDF document subjected to data filling, and stores the generated PDF template in a PDF template library. Thus, the PDF templates in the PDF template library are conveniently and directly called when the PDF documents with the same format are filled with data. The PDF template is an XML template file. In this embodiment, PDF templates with different document formats may be generated by XML language, and the PDF template library may be formed. The XML is an extensible markup language (eXtensible Markup Language), where XML is a set of rules defining language markup that divide a document into a number of parts and identify the parts.
Step 202, receiving customer information input by a user, and acquiring service data from the input customer information.
In this embodiment, the receiving the client information input by the user includes: the user terminal 1 provides a customer information page for customers to enter customer information and receives customer information input by users through the customer information page. In this embodiment, the client data page includes fields such as name, gender, date of birth, annual income, certificate type, certificate number, occupation, etc. The user terminal receives the client information input by the client after detecting that the client can input the client information in the name, sex, date of birth, annual income, certificate type, certificate number and occupation column of the client data page. In another embodiment, the customer profile page further includes a health information field. The health information column is used for inputting past medical history or current health condition of the client. The client can input client information such as disease category, severity, current cure or not of the past medical history in the health information field. The user terminal 1 acquires client information input by a client in the field of the client data page and takes the acquired client information as the service data.
In this embodiment, the user terminal 1 further provides a product selection interface for the customer to purchase the personal insurance product. Specifically, the user terminal 1 provides a plurality of main insurance options matched with the client information according to the client information (such as age, sex and annual income information) recorded by the client in the client data page, and displays the main insurance options on the product selection page for the client to select and acquire the individual insurance product information selected by the user. For example, when the age of the customer entered in the customer data page is 32, the sex is male, and the occupation is administrative office staff customer information, the user terminal 1 provides the option common customer selection such as the red risk, the non-red risk, the universal risk, the throw link risk and the like matched with the customer information according to the information filled by the customer. The customer provides a product detail interface after clicking one of the main risk options. The product detail interface displays main insurance name information, insurance period and payment period columns, and displays a premium calculation button and a determination button. And the customer inputs the insurance period information through the insurance period field and inputs the payment period through the payment period field. After the customer clicks the premium calculation button, the user terminal 1 receives the operation of the customer and calculates the fee paid by the customer for selecting the main risk. Specifically, after the client clicks the premium calculation button, the user terminal 1 calculates premium information only according to the main risk, the insurance period and the payment period selected by the client. In this embodiment, after the client selects a certain main risk, the user terminal 1 further displays a secondary risk selection interface. The secondary risk selection interface displays a plurality of secondary risk options associated with the primary risk. Specifically, the user terminal 1 lists optional auxiliary risks according to the age, sex, annual income and selected main risks filled in by the client, and displays the optional auxiliary risks on the auxiliary risk selection interface for the client to select. In this embodiment, the auxiliary insurance includes, but is not limited to, additional hospital cost medical insurance, additional accidental injury medical insurance, additional face insurance and major disease insurance. In this embodiment, the user terminal 1 obtains personal insurance product information selected by the user as the service data after the user selects the personal insurance product.
Step 203, analyzing the data stream type of the service data according to the acquired service data, and selecting a target PDF template from the PDF template library according to the data stream type, wherein the target PDF template comprises a template component corresponding to the data stream type. In this embodiment, the data stream type at least includes a proposal and an application. In this embodiment, the analyzing the data flow type of the service data according to the acquired service data includes: a corresponding relation table between the data stream type and the service data is established in advance; and searching the corresponding relation table according to the acquired service data, so as to analyze the data stream type corresponding to the service data from the corresponding relation table. For example, the correspondence table defines the correspondence between the data stream type as the insurance application and the business data as the basic insurance and the additional insurance of the insurance application. When the acquired service data are basic risk and additional risk, the user terminal 1 searches the corresponding relation table according to the acquired basic risk and additional risk so as to analyze that the data stream types corresponding to the basic risk and the additional risk are insurance policies. In this embodiment, a PDF template is selected according to the type of data stream in service data, and various elements required for the service data are included in the selected PDF template. The selected PDF template can meet various data stream display of service data, and the service data can be displayed according to actual application conditions, so that the practicability is high and the applicable service range is wide.
In this embodiment, the number of template components in the target PDF template may be plural, for example, the template components include: a basic format definition component, an initialization setting component, a document layout component. The basic format definition component is used for defining a basic format of a PDF template according to the business data, wherein the basic format comprises a header, a footer, a table format, a font format and a total page number. The initialization setting component is used for initializing and setting the basic format of the PDF template according to the service data. The document layout component is used for displaying the document content in the information data obtained after analyzing the service data in a PDF format by using a functional block or a functional paragraph according to the data volume of the document content.
In this embodiment, the basic format component may perform various functions such as defining the number of data tables, setting the table, defining the table width percentage, setting the base color and alignment of the table, setting the header element, setting the font and font format, defining the page size, increasing the header footer, and setting the total page number. The initialization setting component can instantiate template information, and can complete the instantiation functions of creating a template with a preset total page number, setting page numbers in the footers of pages, triggering writing in the headers and the footers after loading of one page is completed, setting pictures on the headers and names on the right, designating the positions of the pictures, setting the total page number, writing the headers into the documents, designating the positions and the like when the documents are opened. In document layout components, typically a small amount of information is displayed by a function block (Chunk), such as a first party name, a first party address, a postal code, and the like. When one page has a plurality of functional blocks, the fine control can be realized, and each small module can be independently processed to complete layout. The large-sized content is controlled by a function segment (Paragraph), such as the large-sized content contracted by both parties.
In the embodiment, various data stream types in the service data are accurately matched through the subdivided template components, the display effect is good, and the requirement of standard quick display of various service data is met.
And 204, loading template components in the target PDF template, analyzing the service data to obtain information data corresponding to each template component, filling the information data corresponding to each template component into each corresponding template component, and generating a PDF file for display.
In this embodiment, the step S204 "loading template components in the target PDF template, analyzing the service data to obtain information data corresponding to each of the template components, filling the information data corresponding to each of the template components into the corresponding template components, and generating and displaying a PDF file" further includes:
and filling information data corresponding to each template component into template components corresponding to a plurality of target PDF templates, and calling a preset merging PDF class to merge the plurality of target PDF templates filled with the information data to generate a PDF file for display.
In the implementation process, in order to increase the universality, the functions contained in all the template components can be independently realized in one PDF template, and multiplexing can be realized by combining the templates; merging is achieved by means of the Copypdf classes, such as Copypdf (PDFfile, PDFfile3, PDFfile, PDFfile 2) (merging in sequence), i.e. each file is connected sequentially to one file at presentation. Copypdf are implemented by common methods PdfCopy and PDFREADER. Wherein PdfCopy can only realize the merging of files, and cannot realize the merging of contents, namely the contents of each page are still unchanged.
Step S204 "after loading the template components in the target PDF template and analyzing the service data to obtain information data corresponding to each of the template components and filling the information data corresponding to each of the template components into the corresponding template components to generate a PDF file for display" further includes: and receiving a request for downloading the PDF file to provide PDF file downloading and printing.
The PDF document component parts in the invention can multiplex the functions of the independent template component parts, and when in development, the functions of each component part and the realized template are known, so that the assembly of the template functions is completed, and the realization of the PDF document functions can be quickly constructed, thereby improving the development efficiency, accelerating the project progress and reducing the running cost of enterprises.
Example 2
Fig. 3 is a schematic diagram of a PDF document generating apparatus 40 in an embodiment of the present invention.
In some embodiments, the PDF document generating means 40 is run in an electronic device. The PDF document generating means 40 may comprise a plurality of functional modules consisting of program code segments. Program code for each program segment in the PDF document generating means 40 may be stored in a memory and executed by at least one processor to perform the function of personal risk sales.
In this embodiment, the PDF document generating apparatus 40 may be divided into a plurality of functional modules according to the functions it performs. Referring to fig. 3, the PDF document generating apparatus 40 may include a setup module 401, an acquisition module 402, a template determination module 403, a document generation module 404, and a download module 405. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In some embodiments, the function of each module will be described in detail in the following embodiments.
The establishing module 401 is configured to establish a PDF template library, where the PDF template library includes a set of PDF templates with different document formats.
In this embodiment, the format of the PDF document includes a text box, a selection box, or a button of the PDF document, and the building module 401 generates a PDF template according to the text box, the selection box, or the button of the PDF document that performs data filling, and stores the generated PDF template in a PDF template library. In this way, it is convenient to directly call the PDF template when filling data into PDF documents of the same format. The PDF template is an XML template file. In this embodiment, PDF templates with different document formats may be generated by XML language, and the PDF template library may be formed. The XML is an extensible markup language (eXtensible Markup Language), where XML is a set of rules defining language markup that divide a document into a number of parts and identify the parts.
The obtaining module 402 is configured to receive customer information input by a user, and obtain service data from the input customer information.
In this embodiment, the obtaining module 402 provides a client data page for a client to enter client information and receives client information input by a user through the client data page. In this embodiment, the client data page includes fields such as name, gender, date of birth, annual income, certificate type, certificate number, occupation, etc. The user terminal receives the client information input by the client after detecting that the client can input the client information in the name, sex, date of birth, annual income, certificate type, certificate number and occupation column of the client data page. In another embodiment, the customer profile page further includes a health information field. The health information column is used for inputting past medical history or current health condition of the client. The client can input client information such as disease category, severity, current cure or not of the past medical history in the health information field. The obtaining module 402 obtains client information input by a client in the field of the client data page and uses the obtained client information as the service data.
In this embodiment, the obtaining module 402 further provides a product selection interface for the customer to purchase the insurance product. Specifically, the user terminal 1 provides a plurality of main insurance options matched with the client information according to the client information (such as age, sex and annual income information) recorded by the client in the client data page, and displays the main insurance options on the product selection page for the client to select and acquire the individual insurance product information selected by the user. For example, when the customer enters the customer information page with the age of 32 and the sex of men and profession of administrative office staff, the obtaining module 402 provides the option of sharing the customer selection such as the red risk, the non-red risk, the universal risk, the continuous risk and the like matched with the customer information according to the information filled by the customer. The customer provides a product detail interface after clicking one of the main risk options. The product detail interface displays main insurance name information, insurance period and payment period columns, and displays a premium calculation button and a determination button. And the customer inputs the insurance period information through the insurance period field and inputs the payment period through the payment period field. After the customer clicks the premium calculation button, the user terminal 1 receives the operation of the customer and calculates the fee paid by the customer for selecting the main risk. Specifically, after the client clicks the premium calculation button, the user terminal 1 calculates premium information only according to the main risk, the insurance period and the payment period selected by the client. In this embodiment, after the customer selects a main risk, the obtaining module 402 further displays a secondary risk selection interface. The secondary risk selection interface displays a plurality of secondary risk options associated with the primary risk. Specifically, the user terminal 1 lists optional auxiliary risks according to the age, sex, annual income and selected main risks filled in by the client, and displays the optional auxiliary risks on the auxiliary risk selection interface for the client to select. In this embodiment, the auxiliary insurance includes, but is not limited to, additional hospital cost medical insurance, additional accidental injury medical insurance, additional face insurance and major disease insurance. In this embodiment, the acquiring module 402 acquires, as the service data, personal insurance product information selected by the user after the user selects the personal insurance product.
The template determining module 403 is configured to analyze a data flow type of the service data according to the acquired service data, and select a target PDF template from the PDF template library according to the data flow type, where the target PDF template includes a template component corresponding to the data flow type. In this embodiment, the data stream type at least includes a proposal and an application. In this embodiment, the module for determining a template 403 analyzes a data flow type of the service data according to the acquired service data includes: a corresponding relation table between the data stream type and the service data is established in advance; and searching the corresponding relation table according to the acquired service data, so as to analyze the data stream type corresponding to the service data from the corresponding relation table. For example, the correspondence table defines the correspondence between the data stream type as the insurance application and the business data as the basic insurance and the additional insurance of the insurance application. When the acquired service data is a basic risk and an additional risk, the template determining module 403 searches the corresponding relation table according to the acquired basic risk and the additional risk, so as to analyze that the data stream type corresponding to the basic risk and the additional risk is an application book.
In this embodiment, a PDF template is selected according to the type of data stream in service data, and various elements required for the service data are included in the selected PDF template. The selected PDF template can meet various data stream display of service data, and the service data can be displayed according to actual application conditions, so that the practicability is high and the applicable service range is wide.
In this embodiment, the number of template components in the target PDF template may be plural, for example, the template components include: a basic format definition component, an initialization setting component, a document layout component. The basic format definition component is used for defining a basic format of a PDF template according to the business data, wherein the basic format comprises a header, a footer, a table format, a font format and a total page number. The initialization setting component is used for initializing and setting the basic format of the PDF template according to the service data. The document layout component is used for displaying the document content in the information data obtained after analyzing the service data in a PDF format by using a functional block or a functional paragraph according to the data volume of the document content.
In this embodiment, the basic format component may perform various functions such as defining the number of data tables, setting the table, defining the table width percentage, setting the base color and alignment of the table, setting the header element, setting the font and font format, defining the page size, increasing the header footer, and setting the total page number. The initialization setting component can instantiate template information, and can complete the instantiation functions of creating a template with a preset total page number, setting page numbers in the footers of pages, triggering writing in the headers and the footers after loading of one page is completed, setting pictures on the headers and names on the right, designating the positions of the pictures, setting the total page number, writing the headers into the documents, designating the positions and the like when the documents are opened. In document layout components, typically a small amount of information is displayed by a function block (Chunk), such as a first party name, a first party address, a postal code, and the like. When one page has a plurality of functional blocks, the fine control can be realized, and each small module can be independently processed to complete layout. The large-sized content is controlled by a function segment (Paragraph), such as the large-sized content contracted by both parties.
In the embodiment, various data stream types in the service data are accurately matched through the subdivided template components, the display effect is good, and the requirement of standard quick display of various service data is met.
The document generation module 404 is configured to load a template component in the target PDF template, parse the service data to obtain information data corresponding to each template component, and fill the information data corresponding to each template component into the corresponding template component to generate a PDF file for display.
In this embodiment, the number of the target PDF templates is a plurality of, and the document generating module 404 is further configured to populate information data corresponding to each of the template components with template components corresponding to a plurality of target PDF templates, and call a preset merge PDF class to merge the plurality of target PDF templates with the information data being populated to generate a PDF file for display.
In the implementation process, in order to increase the universality, the functions contained in all the template components can be independently realized in one PDF template, and multiplexing can be realized by combining the templates; merging is achieved by means of the Copypdf classes, such as Copypdf (PDFfile, PDFfile3, PDFfile, PDFfile 2) (merging in sequence), i.e. each file is connected sequentially to one file at presentation. Copypdf are implemented by common methods PdfCopy and PDFREADER. Wherein PdfCopy can only realize the merging of files, and cannot realize the merging of contents, namely the contents of each page are still unchanged.
The download module 405 is configured to receive a request for downloading the PDF file, and provide PDF file downloading and printing.
The PDF document component parts in the invention can multiplex the functions of the independent template component parts, and when in development, the functions of each component part and the realized template are known, so that the assembly of the template functions is completed, and the realization of the PDF document functions can be quickly constructed, thereby improving the development efficiency, accelerating the project progress and reducing the running cost of enterprises.
Example III
Fig. 4 is a schematic diagram of a preferred embodiment of the electronic device 7 according to the present invention.
The electronic device 7 comprises a memory 71, a processor 72 and a computer program 73 stored in the memory 71 and executable on the processor 72. The processor 72, when executing the computer program 73, implements the steps in the PDF document generation method embodiment described above, such as steps S201 to S204 shown in fig. 2. Or the processor 72, when executing the computer program 73, performs the functions of the modules/units of the PDF document generating apparatus embodiment described above, such as the modules 401-405 in fig. 4.
Illustratively, the computer program 73 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 72 to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program 73 in the electronic device 7. For example, the computer program 73 may be divided into a setup module 401, an acquisition module 402, a template determination module 403, a document generation module 404 and a download module 405 in fig. 3, where each module has a specific function, see embodiment two.
The electronic device 7 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the electronic device 7 and does not constitute a limitation of the electronic device 7, and may include more or less components than illustrated, or may combine certain components, or different components, e.g. the electronic device 7 may also include input-output devices, network access devices, buses, etc.
The Processor 72 may be a central processing module (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor 72 may be any conventional processor or the like, the processor 72 being a control center of the electronic device 7, with various interfaces and lines connecting the various parts of the entire electronic device 7.
The memory 71 may be used to store the computer program 73 and/or modules/units, and the processor 72 may implement the various functions of the meter electronics 7 by executing or executing the computer program and/or modules/units stored in the memory 71 and invoking data stored in the memory 71. The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device 7 (such as audio data, phonebooks, etc.), and the like. In addition, memory 71 may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart memory card (SMART MEDIA CARD, SMC), secure Digital (SD) card, flash memory card (FLASH CARD), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The integrated modules/units of the electronic device 7 may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
In the several embodiments provided in the present invention, it should be understood that the disclosed electronic device and method may be implemented in other manners. For example, the above-described embodiments of the electronic device are merely illustrative, and the modules may be divided into only one type of logic functions, and there may be additional ways of dividing the modules when actually implemented.
In addition, each functional module in the embodiments of the present invention may be integrated in the same processing module, or each module may exist alone physically, or two or more modules may be integrated in the same module. The integrated modules may be implemented in hardware or in hardware plus software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other modules or steps, and that the singular does not exclude a plurality. A plurality of modules or electronic devices recited in the electronic device claims may also be implemented by means of software or hardware by means of one and the same module or electronic device. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (9)

1. A PDF document generation method, the method comprising:
Establishing a PDF template library, wherein the PDF template library comprises a group of PDF templates with different file formats;
Receiving customer information input by a user, and acquiring service data from the input customer information, wherein the method comprises the following steps: providing a product selection interface for a customer to purchase personal insurance products, wherein the product selection interface provides a plurality of main insurance options matched with the customer information according to the customer information and displays the main insurance options on the product selection interface for the customer to select, and acquiring personal insurance product information selected by the customer as the business data, and the method comprises the following steps: providing a product detail interface after selecting the main risk option, wherein the product detail interface displays main risk name information, an insurance term field, a payment term field and a calculated premium button; receiving insurance period information input by a customer through the insurance period field, and receiving payment period input by the customer through the payment period field; after the customer clicks the premium calculation button, premium information is calculated according to the main insurance option, the insurance period and the payment period;
analyzing the data stream type of the service data according to the acquired service data, including: a corresponding relation table between the data stream type and the service data is established in advance; searching the corresponding relation table according to the acquired service data, and analyzing a data stream type corresponding to the service data from the corresponding relation table, wherein the data stream type comprises a proposal and an application book;
selecting a target PDF template from the PDF template library according to the data stream type, wherein the target PDF template comprises a template component corresponding to the data stream type; and
And loading a template component in the target PDF template, analyzing the service data to obtain information data corresponding to each template component, filling the information data corresponding to each template component into each corresponding template component, and generating a PDF file for display.
2. The PDF document generation method of claim 1 wherein the format of the PDF document includes a text box, a selection box, or buttons of the PDF document, and wherein the creating of the PDF template library includes:
generating a PDF template according to a text box, a selection box or a button of the PDF document for data filling, and storing the generated PDF template in a PDF template library.
3. The PDF document generation method of claim 1, wherein the number of target PDF templates is a plurality, the method further comprising:
And filling information data corresponding to the template components into template components corresponding to a plurality of target PDF templates, and calling a preset merging PDF class to merge the plurality of target PDF templates filled with the information data to generate a PDF file for display, wherein the merging PDF class is Copypdf class.
4. The PDF document generation method of claim 1, wherein the method further comprises:
And receiving a request for downloading the PDF file to provide PDF file downloading and printing.
5. The PDF document generation method of claim 1, wherein the receiving the user input of the client information includes:
and providing a customer information page for a customer to enter customer information and receiving the customer information input by the user through the customer information page.
6. The PDF document generation method of claim 1, wherein the PDF template is an XML template file.
7. A PDF document generation apparatus, characterized in that the apparatus includes a module implementing the PDF document generation method of any one of claims 1 to 6, the apparatus comprising:
the establishment module is used for establishing a PDF template library, wherein the PDF template library comprises a group of PDF templates with different document formats;
the acquisition module is used for receiving the client information input by the user and acquiring service data from the input client information;
the template determining module is used for analyzing the data flow type of the service data according to the acquired service data and selecting a target PDF template from the PDF template library according to the data flow type, wherein the target PDF template comprises a template component corresponding to the data flow type; and
And the document generation module is used for loading the template components in the target PDF template, analyzing the service data to obtain information data corresponding to each template component, filling the information data corresponding to each template component into each corresponding template component, and generating a PDF file for display.
8. An electronic device, characterized in that: the electronic device comprising a processor for implementing the PDF document generation method of any one of claims 1 to 6 when executing a computer program stored in a memory.
9. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program, when executed by a processor, implements the PDF document generation method of any one of claims 1 to 6.
CN201811537721.0A 2018-12-15 2018-12-15 PDF document generation method, device, electronic equipment and storage medium Active CN109815464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811537721.0A CN109815464B (en) 2018-12-15 2018-12-15 PDF document generation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811537721.0A CN109815464B (en) 2018-12-15 2018-12-15 PDF document generation method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109815464A CN109815464A (en) 2019-05-28
CN109815464B true CN109815464B (en) 2024-06-07

Family

ID=66602063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811537721.0A Active CN109815464B (en) 2018-12-15 2018-12-15 PDF document generation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109815464B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287468B (en) * 2019-06-27 2023-06-06 南银法巴消费金融有限公司 PDF document generation method and system suitable for online protocol
CN111581937A (en) * 2020-05-15 2020-08-25 航天科工智慧产业发展有限公司 Document generation method and device, computer readable medium and electronic equipment
CN111597781B (en) * 2020-05-19 2023-06-02 浪潮软件集团有限公司 Unstructured big data generation method, system, storage medium and electronic equipment
CN112905178A (en) * 2021-03-03 2021-06-04 京东方科技集团股份有限公司 Method, device, equipment and medium for generating business function page
CN113378538A (en) * 2021-06-29 2021-09-10 远光软件股份有限公司 Document structured information input method, electronic equipment and storage medium
CN113377717B (en) * 2021-06-30 2023-02-03 中国平安财产保险股份有限公司 Document file generation method and device, electronic equipment and storage medium
CN113688619A (en) * 2021-08-05 2021-11-23 深圳集智数字科技有限公司 PDF document generation method and device, electronic equipment and storage medium
CN113791784A (en) * 2021-09-15 2021-12-14 中国工商银行股份有限公司 Method and device for generating form template page
CN114169306A (en) * 2021-12-13 2022-03-11 平安养老保险股份有限公司 Method, device and equipment for generating electronic receipt and readable storage medium
CN114548066A (en) * 2022-01-10 2022-05-27 普瑞纯证医疗科技(苏州)有限公司 Contract management method, system, equipment and storage medium
CN114611479B (en) * 2022-02-24 2023-04-28 北京金堤科技有限公司 Document generation method and device, storage medium and electronic equipment
CN114936540B (en) * 2022-07-22 2022-10-25 深圳联友科技有限公司 Data processing method and processing assembly of PDF document model

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776498A (en) * 2016-12-09 2017-05-31 山东浪潮商用系统有限公司 A kind of method that data export as PDF
CN107153636A (en) * 2017-04-18 2017-09-12 北京思特奇信息技术股份有限公司 It is a kind of to realize the method and system that business datum is quickly exported with PDF format

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776498A (en) * 2016-12-09 2017-05-31 山东浪潮商用系统有限公司 A kind of method that data export as PDF
CN107153636A (en) * 2017-04-18 2017-09-12 北京思特奇信息技术股份有限公司 It is a kind of to realize the method and system that business datum is quickly exported with PDF format

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘树枫.保险公司业务实训.西北大学出版社,2018,70-81. *

Also Published As

Publication number Publication date
CN109815464A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109815464B (en) PDF document generation method, device, electronic equipment and storage medium
US20230236805A1 (en) Systems and Methods for Development and Deployment of Software Platforms Having Advanced Workflow and Event Processing Components
US6992786B1 (en) Method and system for online creation and ordering of customized material for printing
CN109299169B (en) Data visualization method, system, terminal and computer readable storage medium
US20160253303A1 (en) Digital processing and completion of form documents
CA2561355A1 (en) System and method for generating tasks related to electronic image files
CN110704519A (en) Business document conversion method and device, storage medium and computer equipment
CN111125560A (en) Data visualization processing method and device and computer system
US20210073324A1 (en) Reviewing Document Designs
US20220350959A1 (en) Cross channel digital forms integration and presentation system
US20220382969A1 (en) Cross channel digital data archiving and utilization system
US20090083284A1 (en) Delivery server for delivering documents to be browsed to mobile terminal, mobile terminal, and delivery system for delivering documents to be browsed to mobile terminal
CN115526160A (en) Rich text processing method, device and equipment and storage medium
US20130326433A1 (en) Adaptive design editor for web applications
CN112905178A (en) Method, device, equipment and medium for generating business function page
Wildfire et al. The safety explorer suite: interactive safety monitoring for clinical trials
US20220129518A1 (en) System and method for providing book-based personalized social media service
US11361033B2 (en) Systems and methods of automated document template creation using artificial intelligence
CN113704671A (en) Page generation method and device
US20090063942A1 (en) System and method for associating a report with a customizable template
US10380224B2 (en) Rules based content management system and method
CN115904380B (en) Page field creation and assembly method, electronic device and computer readable storage medium
CA2827378C (en) System and method for variant content management
CN108846582A (en) Health degree data determination method, electronic equipment and computer readable storage medium
CN116612865B (en) Image labeling method and system supporting all-disease labeling

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