A PDF file generation method, medium and computing device

By using HTML-format transaction form templates and database storage methods, dynamically rendering and converting them into PDF files, the content display problem caused by fixed space of PDF form templates in the existing technology is solved, and the content display effect of PDF file is achieved .

CN114722779BActive Publication Date: 2025-02-11ALIBABA CLOUD COMPUTING CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210316308.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2025-02-11
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

In the prior art, the space size of the content contained in the transaction form template in PDF format is fixed, resulting in the user exceeding the template range or the content display size compression when the content is filled in too much, affecting the audit effect of the transaction party.

Method used

Transaction form templates in HTML format, by defining variables in the template and adding assignment reference marks, the content filled in the user is stored on the corresponding storage address in the database, dynamically rendering the filled-in HTML file and converting it. for PDF files.

Benefits of technology

It realizes dynamic adjustment of form display based on actual content, avoids the problem of content exceeding or display compression, improves the content display effect of generated PDF files, and facilitates transactional parties to review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722779B_ABST
    Figure CN114722779B_ABST
Patent Text Reader

Abstract

The embodiments disclosed in this specification provide a PDF file generation method, medium and computing device. The transaction form template is set as a file template in HTML format, each form item in the transaction form template is set as a variable to be assigned, and the content filled in by the user for the form item is stored in the storage address associated with the variable's assignment reference mark, so that the HTML file of the filled-in specific transaction form can be obtained. After that, the HTML file can be converted into a PDF file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Multiple embodiments of the present specification relate to the field of information technology, and more particularly, to a PDF file generation method, medium, and computing device. Background Art

[0002] In actual applications, users can apply to the transaction party for transactions by filling out an electronic transaction form. In order to facilitate the review of the transaction form, the transaction party often requires the transaction form filled out by the user to be converted into a PDF file.

[0003] In the prior art, a transaction form template in PDF format specified by the transaction party can be obtained in advance. When a user applies for a transaction, the content uploaded by the user to be filled in the transaction form template is first obtained, and then the content uploaded by the user is embedded in the transaction form template in PDF format in the form of a picture, forming a PDF file of the specific transaction form filled in by the user.

[0004] However, in the above-mentioned prior art, the space size for accommodating content in the transaction form template in PDF format is often fixed. If the user needs to fill in a lot of content in the transaction form template, it will exceed the space size for accommodating content in the transaction form template, thereby resulting in poor content display effect of the generated PDF file, affecting the review of the transaction party. Summary of the invention

[0005] Multiple embodiments of the present specification provide a PDF file generation method, wherein a transaction form template in HTML format is pre-set, each form item included in the transaction form template is a content variable to be assigned, and the transaction form template also includes an assignment reference mark for each content variable, and the assignment reference mark is associated with a storage address in a database, and the method includes:

[0006] Obtain at least one content uploaded by the user to be filled in the transaction form template;

[0007] Storing each content in a matching storage address in a database; wherein the matching storage address of each content includes: a storage address associated with the assigned reference mark of the form item to be filled in by the content;

[0008] Based on the content at the storage address associated with each assigned reference mark in the transaction form template, assign a value to the content variable corresponding to each assigned reference mark to obtain an HTML file of the filled-in specific transaction form;

[0009] Convert the HTML file to a PDF file.

[0010] According to a second aspect of multiple embodiments of the present specification, a computing device is proposed, including a memory and a processor; the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the method described in the first aspect when executing the computer instructions.

[0011] According to a third aspect of multiple embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.

[0012] The file template in HTML format has the property that variables can be defined in HTML and assignment reference tags can be added to the variables. The assignment reference tags are associated with the values ​​at specific storage addresses. Each variable in the file template in HTML format is in a state to be assigned and there is no fixed space size to accommodate the values. The file template in HTML format can be dynamically and adaptively rendered according to the specific variable assignments, and there is no problem that the existing space size cannot accommodate the variable assignments.

[0013] Therefore, the transaction form template is even a file template in HTML format, each form item in the transaction form template is set as a variable to be assigned, and the content filled in by the user for the form item is stored in the storage address associated with the variable's assignment reference tag. In this way, the dynamic adaptive rendering characteristics of the file template in HTML format can be used to obtain the HTML file of the filled-in specific transaction form. After that, the HTML file can be converted into a PDF file.

[0014] Through the above technical solution, the content display effect of the PDF file of the specific transaction form generated is better, which is convenient for the transaction party to review. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 An exemplary transaction form template in PDF format is provided.

[0016] Figure 2 A specific transaction form in PDF format in the prior art is provided as an example.

[0017] Figure 3 It is another specific transaction form in PDF format in the prior art provided by the present disclosure.

[0018] Figure 4 A process of a PDF file generation method is exemplified.

[0019] Figure 5 The whole process from pre-setting the transaction form template in HTML format to generating a PDF file is provided exemplarily.

[0020] Figure 6 A specific transaction form in PDF format generated by the technical solution of the present disclosure is provided as an example.

[0021] Figure 7 It is a structural schematic diagram of a computer-readable storage medium provided by the present disclosure.

[0022] Figure 8 It is a structural schematic diagram of a computing device provided by the present disclosure.

[0023] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. The number of any element in the drawings is for example rather than limitation, and any naming is only for distinction and does not have any limiting meaning. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0025] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0026] In actual applications, users can apply to the transaction party by filling out an electronic transaction form. The transaction here can be government affairs, such as applying for corporate subsidies, applying for scholarships, applying for business approval, etc., and the corresponding transaction party can be a government department.

[0027] There are two main ways to fill in the electronic transaction form mentioned above. One way is that the user uses the electronic terminal provided by the transaction party to fill in the form to form a PDF file of the specific transaction form; the other way is that the transaction party cooperates with the network service platform, the user logs in to the network service platform, selects the transaction he wants to apply for, and the network service platform obtains the filled content uploaded by the user for each form item in the transaction form template, fills it into the transaction form template, and forms a PDF file of the specific transaction form. It should be noted here that for the latter method mentioned above, the network service platform can connect to multiple different transaction parties. After the user logs in to the network service platform, he can choose to apply for various transactions.

[0028] Regardless of which of the above methods of filling out electronic transaction forms is used, the existing technology is to pre-acquire the transaction form template in PDF format specified by the transaction party. When a user applies for a transaction, first obtain the content uploaded by the user to be filled in the transaction form template, and then embed the content uploaded by the user into the transaction form template in PDF format in the form of a picture, forming a PDF file of the specific transaction form filled out by the user.

[0029] However, due to the characteristics of the document template in PDF format, the space size for accommodating the content in the transaction form template in PDF format is often fixed. Figure 1 An exemplary transaction form template in PDF format is provided. Figure 1 As shown, the transaction form template includes multiple form items, and the size of the blank area (i.e., the space for accommodating content) corresponding to each form item is pre-set. If the amount of content filled in by the user for a form item is relatively large, it will either exceed the range of the blank area of ​​the form item (see Figure 2 ), or will result in compression of the display size of the content itself (see Figure 3 As shown), the display size compression here may be, for example, a reduction in font size, a picture converted to a thumbnail, etc.

[0030] When filling in content based on a PDF file template, the filled-in content is embedded in the PDF file template in the form of a picture for rendering. In this way, the visual effect that the content corresponding to a form item exceeds the size of the space will be retained in the PDF file, causing trouble for the transaction party when reviewing the specific transaction form in PDF format.

[0031] To this end, the present disclosure provides a PDF file generation solution, the technical concept of which is as follows:

[0032] The file template in HTML format has the property that variables can be defined in HTML and assignment reference tags can be added to the variables. The assignment reference tags are associated with the values ​​at specific storage addresses. Each variable in the file template in HTML format is in a state to be assigned and there is no fixed space size to accommodate the values. The file template in HTML format can be dynamically and adaptively rendered according to the specific variable assignments, and there is no problem that the existing space size cannot accommodate the variable assignments.

[0033] Therefore, the transaction form template is set as a file template in HTML format, each form item in the transaction form template is set as a variable to be assigned, and the content filled in by the user for the form item is stored in the storage address associated with the variable's assignment reference tag. In this way, the dynamic adaptive rendering characteristics of the file template in HTML format can be used to obtain the HTML file of the specific transaction form after filling in. After that, the HTML file can be converted into a PDF file.

[0034] Through the above technical solution, the content display effect of the PDF file of the specific transaction form generated is better, which is convenient for the transaction party to review.

[0035] The above technical solution is described in detail below in conjunction with the accompanying drawings.

[0036] Figure 4 An exemplary process of a PDF file generation method is provided, comprising the following steps:

[0037] S400: Acquire at least one content uploaded by the user to be filled in the transaction form template.

[0038] Figure 4 The execution subject of the method shown can be the electronic terminal of the transaction party or the network service platform.

[0039] In implementation Figure 4 Before the method shown, it is necessary to pre-set a transaction form template in HTML format, wherein each form item included in the transaction form template is a content variable to be assigned a value, and the transaction form template also includes an assignment reference mark for each content variable, which is associated with a storage address in the database.

[0040] It is easy to understand that the arrangement position relationship of each content variable in the transaction form template in HTML format is the arrangement position relationship between each form item in the form.

[0041] There are currently a variety of languages ​​that can be used to add assignment reference tags to variables in HTML file templates. A commonly used language is the Free Marker language, which can be used to define the assignment reference tag of each content variable.

[0042] In actual applications, a form filling interface can be displayed to the user, which can include a real transaction form template (consistent with the transaction form template in PDF format, and the size of the blank area corresponding to each form item is fixed). The user enters content into each form item in the transaction form template. Even if the content exceeds the blank area corresponding to the form item, it does not matter, because the function of the form filling interface is not to directly render a specific transaction form in PDF format, but to receive at least one content uploaded by the user to be filled in the transaction form template.

[0043] Because of this, in other embodiments, the form filling interface displayed to the user may not include the actual transaction form template, but rather simply and directly lists the various form items and the input area corresponding to each form item, and the user can enter the content into the input area corresponding to each form item. Furthermore, the form filling interface may also include filling precautions information corresponding to each form item to remind the user to pay attention to how to correctly fill in the form item.

[0044] S402: Store each content into a matching storage address in the database.

[0045] S404: Based on the content at the storage address associated with each value-assigned reference mark in the transaction form template, assign a value to the content variable corresponding to each value-assigned reference mark to obtain an HTML file of the filled-in specific transaction form.

[0046] Since it is necessary to rely on the assignment reference tag of each content variable in the HTML format transaction form template to assign values ​​to the content variables to complete the form item filling, each content uploaded by the user needs to be stored in the storage address associated with the assignment reference tag of the form item to be filled in by the content.

[0047] Then, you can use the function of assigning reference tags to complete the filling of the transaction form template in HTML format and render the HTML file of the specific transaction form. The rendering engine used to render the HTML file needs to match the markup language of the assignment reference tag. For example, if the assignment reference tag is defined in Free Marker language, the matching Free Marker rendering engine can be used to render the HTML file.

[0048] S406: Convert the HTML file into a PDF file.

[0049] Currently, there are a variety of tools for converting HTML files into PDF files. For example, the iText toolkit can be used to convert the HTML file into a PDF file.

[0050] The types of form items in the HTML format transaction form template can be set according to actual transaction needs.

[0051] For example, a transaction form template may include several cell-type form items; the content to be filled in the cell-type form item is text content. Cell-type form items are the most common form items, such as form items for filling in information such as name, ID number, and place of residence.

[0052] For example, a transaction form template may include several list-type form items; the content to be filled in the list-type form item is at least one row of records, and the record includes at least two fields. List-type form items may be, for example, form items for allowing users to fill in multiple educational experiences, multiple professional resumes, and multiple personnel introductions. Taking educational experience as an example, it is easy to understand that one row of records corresponds to one educational experience, and the fields of the educational experience include school, enrollment time, graduation time, major, etc.

[0053] For example, a transaction form template may include several attachment type form items; the content to be filled in the attachment type form item is the attachment file uploaded by the user. The attachment file here can be a picture uploaded by the user (such as an ID card photo, a headshot photo, a photo taken of a paper material), or other electronic material files.

[0054] In addition, in some embodiments, the transaction form template also includes a user information item, which is a content variable to be assigned a value. Figure 4 The method flow shown may also include: obtaining user information (which may be user input or obtained from other channels); storing the user information in a matching storage address in a database; wherein the matching storage address of the user information includes: the storage address associated with the assignment reference tag of the user information item to be filled in by the user information; before obtaining the HTML file of the filled-in specific transaction form, assigning a value to the user information item based on the user information at the storage address associated with the assignment reference tag of the user information item.

[0055] The above-mentioned user information may be, for example, user account information registered by the user on the electronic terminal of the transaction party or on the network service platform. In addition, the user information may also include other information related to the user, which may be set according to actual transaction needs.

[0056] in addition, Figure 5 The whole process from presetting the business form template in HTML format to generating a PDF file is provided as an example. Figure 5As shown, the step of pre-setting the transaction form template in HTML format may be to obtain an original transaction form template in ordinary text document format, wherein the original transaction form template includes several cell-type form items, several list-type form items, several attachment-type form items, and an assignment reference mark for each cell-type form item; wherein the content to be filled in the cell-type form item is text content; the content to be filled in the list-type form item is at least one row of records, and the record includes at least two fields; the content to be filled in the attachment-type form item is an attachment file uploaded by the user; the original transaction form template is converted into a transaction form template in HTML format, and in the HTML-formatted transaction form template, an assignment reference mark is added to each list-type form item, and an assignment reference mark is added to each attachment-type form item.

[0057] The above-mentioned common text document format may be, for example, txt format, doc format, docx format, etc. The above-mentioned method of converting the common text document format into HTML format may be to perform a "save as" operation on the transaction form template in the common text document format, and when performing the save as operation, the file format to be saved may be selected, and the HTML format may be selected.

[0058] After setting up the transaction form template in HTML format, the content filled in by the user for the form item can be stored in the storage address associated with the variable assignment reference tag, so that the content uploaded by the user in the database is combined with the transaction form template in HTML format to obtain the HTML file of the specific transaction form. Then the HTML file can be converted into a PDF file.

[0059] Figure 6 An exemplary specific transaction form in PDF format generated by the technical solution of the present disclosure is provided. Figure 6 As shown, the display size (such as font size) of the content corresponding to each form item is the same, and the content area corresponding to each form item can accommodate the corresponding content. Such a specific transaction form has a better display effect and is convenient for the transaction party to review.

[0060] The present disclosure also provides a computer-readable storage medium. Figure 7 As shown, the medium 140 stores a computer program, and when the program is executed by a processor, the method of the embodiment of the present disclosure is implemented.

[0061] The present disclosure also provides a computing device, including a memory and a processor; the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the method of the embodiment of the present disclosure when executing the computer instructions.

[0062] Figure 8It is a structural diagram of a computing device provided by the present disclosure. The computing device 15 may include but is not limited to: a processor 151, a memory 152, and a bus 153 connecting different system components (including the memory 152 and the processor 151).

[0063] The memory 152 stores computer instructions, which can be executed by the processor 151, so that the processor 151 can execute the method of any embodiment of the present disclosure. The memory 152 may include a random access memory unit RAM 1521, a cache memory unit 1522 and / or a read-only memory unit ROM 1523. The memory 152 may also include: a program tool 1525 having a set of program modules 1524, the program modules 1524 include but are not limited to: an operating system, one or more application programs, other program modules and program data, and one or more combinations of these program modules may include the implementation of a network environment.

[0064] The bus 153 may include, for example, a data bus, an address bus, and a control bus. The computing device 150 may also communicate with an external device 155 through an I / O interface 154, and the external device 155 may be, for example, a keyboard, a Bluetooth device, etc. The computing device 150 may also communicate with one or more networks through a network adapter 156, for example, the network may be a local area network, a wide area network, a public network, etc. As shown in the figure, the network adapter 156 may also communicate with other modules of the computing device 15 through the bus 153.

[0065] In addition, although the operations of the disclosed method are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0066] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.

[0067] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0068] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0069] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0070] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0071] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0072] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0074] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0075] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0076] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0077] The above describes a number of embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0078] The terms used in the multiple embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit the multiple embodiments of this specification. The singular forms of "a", "said" and "the" used in the multiple embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0079] It should be understood that although the terms first, second, third, etc. may be used to describe various information in multiple embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of multiple embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0080] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The method embodiment described above is merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0081] The above description is only a preferred embodiment of the multiple embodiments of this specification and is not intended to limit the multiple embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the multiple embodiments of this specification should be included in the scope of protection of the multiple embodiments of this specification.

Claims

1. A method for generating a PDF file, wherein: A transaction form template in HTML format is pre-set, each form item included in the transaction form template is a content variable to be assigned a value, and the transaction form template also includes an assignment reference mark for each content variable, and the assignment reference mark is associated with a storage address in a database, and the method includes: Obtain at least one content uploaded by the user to be filled in the transaction form template; Storing each content in a matching storage address in a database; wherein the matching storage address of each content includes: a storage address in the database associated with the assigned reference mark of the form item to be filled in by the content; Based on the content at the storage address in the database associated with each valued reference mark in the transaction form template, assign a value to the content variable corresponding to each valued reference mark to obtain an HTML file of the filled-in specific transaction form; Convert the HTML file to a PDF file.

2. The method of claim 1, wherein: The transaction form template includes several form items of cell type; The content to be filled in the form item of this cell type is text content.

3. The method of claim 1, wherein: The transaction form template includes several list-type form items; The content to be filled in the form item of this list type is at least one row of records, and the record includes at least two fields.

4. The method of claim 1, wherein: The transaction form template includes several form items of attachment type; The content to be filled in the form item of this attachment type is the attachment file uploaded by the user.

5. The method of claim 1, wherein: The assignment reference mark of each content variable is defined based on the Free Marker language; Get the HTML file of the filled-in specific transaction form, including: Based on the Free Marker rendering engine, the HTML file of the filled-in specific transaction form is rendered.

6. The method as claimed in claim 5, wherein the HTML file is converted into a PDF file, comprising: Based on the iText toolkit, the HTML file is converted into a PDF file.

7. The method of claim 1, wherein: The transaction form template also includes a user information item, which is a content variable to be assigned a value; The method further comprises: Get user information; The user information is stored in a matching storage address in a database; wherein the matching storage address of the user information includes: a storage address in the database associated with the assignment reference mark of the user information item to be filled in by the user information; Before obtaining the HTML file of the filled-in specific transaction form, the user information item is assigned a value based on the user information at the storage address in the database associated with the assignment reference tag of the user information item.

8. The method as claimed in claim 1, wherein the step of presetting the transaction form template in HTML format comprises: An original transaction form template in a common text document format is obtained, wherein the original transaction form template includes a plurality of cell-type form items, a plurality of list-type form items, a plurality of attachment-type form items, and an assignment reference mark of each cell-type form item; wherein the content to be filled in the cell-type form item is text content; the content to be filled in the list-type form item is at least one row of records, and the record includes at least two fields; and the content to be filled in the attachment-type form item is an attachment file uploaded by a user; The original transaction form template is converted into a transaction form template in HTML format, and in the transaction form template in HTML format, an assignment reference tag is added to each list type form item, and an assignment reference tag is added to each attachment type form item.

9. A computing device, comprising a memory and a processor; the memory is used to store computer instructions executable on the processor, and the processor is used to implement the method according to any one of claims 1 to 8 when executing the computer instructions.

10. A computer-readable storage medium having a computer program stored thereon, wherein the program implements the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • Report printing method and system based on HTML (Hyper Text Markup Language) template

    CN104571977A

  • Method, device and equipment for generating public security document in PDF format and storage medium

    CN112632941A

  • Government affair hall receipt printing implementation method and storage medium

    CN113608706A