CN116681048A - Method, device, equipment and medium for making PDF template - Google Patents

Method, device, equipment and medium for making PDF template Download PDF

Info

Publication number
CN116681048A
CN116681048A CN202310682647.6A CN202310682647A CN116681048A CN 116681048 A CN116681048 A CN 116681048A CN 202310682647 A CN202310682647 A CN 202310682647A CN 116681048 A CN116681048 A CN 116681048A
Authority
CN
China
Prior art keywords
pdf
filled
template
field
fields
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310682647.6A
Other languages
Chinese (zh)
Inventor
陈光柳
梁世雄
王博
关海东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310682647.6A priority Critical patent/CN116681048A/en
Publication of CN116681048A publication Critical patent/CN116681048A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure provides a method of making a PDF template, which may be applied to a financial field or other fields. The method comprises the following steps: displaying a visual page; inserting a plurality of fields to be filled in the visual page, wherein the position of each field to be filled is specified by a user; setting keywords of each field to be filled; and storing the visualized page in an XSLT format to obtain a PDF template. The present disclosure also provides an apparatus, device, storage medium and program product for making a PDF template.

Description

Method, device, equipment and medium for making PDF template
Technical Field
The present disclosure finds application in the financial or other arts, and more particularly relates to a method, apparatus, device, medium and program product for making PDF templates.
Background
In enterprise management or business activities, it is generally necessary to convert the issued document into PDF format, so as to ensure that the document issued to each system is not edited and tampered. There are generally two methods for generating PDF in the prior art: one is that a developer compiles a PDF template through codes, and then provides the PDF template with corresponding information to be filled in by business personnel and then stored as a PDF file; another developer manually draws a format document and then provides the business personnel with data filling in the various fields to be used, and then generates a PDF file through a java class.
In implementing the concepts of the present disclosure, the inventors found that at least the following problems exist in the prior art: when it is necessary to generate a large number of PDF files in a complex format, for example: the encoding workload is huge and the work is complicated due to the fact that PDF templates are encoded through codes, and the manual format document is complicated and is complicated in PDF setting, and professional developers are often required to adjust the format. And no matter the PDF template is written by codes or the hand-drawn format document is required to be manufactured by professional developers, business staff cannot develop or design the PDF template meeting the self-defining requirement by self.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method, apparatus, device, medium, and program product that can self-design PDF templates.
According to a first aspect of the present disclosure, a method of making a PDF template is provided. The method comprises the following steps: displaying a visual page; inserting a plurality of fields to be filled in the visual page, wherein the position of each field to be filled is specified by a user; setting keywords of each field to be filled; and storing the visualized page in an XSLT format to obtain a PDF template, wherein the PDF template is used for generating a PDF file.
According to an embodiment of the present disclosure, before the saving the visualization page in XSLT format, the method further includes: the filling mode for setting the plurality of fields to be filled comprises one-time filling. And in the one-time filling mode, when filling a plurality of fields to be filled in the PDF template, matching the key words of the data in each record in the data source designated by the user with the key values of each field to be filled in the PDF template, and filling the values of the data matched with the key words in the corresponding fields to be filled.
According to an embodiment of the present disclosure, the method further comprises: responding to a filling instruction of the PDF template, and acquiring a data source specified by a user in the filling instruction, wherein the data source comprises N records, and N is an integer greater than or equal to 1; generating N XSLT files according to a one-time filling mode based on the N records and the PDF template; in the one-time filling mode, filling values of data matched with keywords of the fields to be filled in each record into the PDF template to generate an XSLT file; and generating N PDF files based on the N XSLT files.
According to an embodiment of the present disclosure, the saving the visualized page in XSLT format to obtain a PDF template includes: storing the PDF templates under a specified directory, wherein when other PDF templates are stored under the specified directory, the PDF templates are named by names different from the other PDF templates; and generating a template list based on the PDF template and other PDF templates under the specified directory.
According to an embodiment of the present disclosure, the method further comprises: displaying the template list; and triggering the filling instruction when the user selects the PDF template in the template list and triggers a filling operation.
According to an embodiment of the present disclosure, inserting a plurality of fields to be filled in the visualization page further includes: the display state of the value filled in each field to be filled is controlled based on the typesetting option selected by the user for each field to be filled.
According to an embodiment of the present disclosure, the method further comprises: opening the PDF template; editing the PDF template based on user operations, including at least one of: editing at least one field to be filled in the plurality of fields to be filled in, deleting at least one field to be filled in, or inserting a new field to be filled in; and storing the edited PDF template to generate a new PDF template.
According to an embodiment of the present disclosure, the inserting a plurality of fields to be filled in the visualization page includes: inserting text in the visual page; and inserting a field to be filled in each position specified by the user in the text.
According to an embodiment of the present disclosure, the data types of the values to be filled in the plurality of fields to be filled are different.
In a second aspect of embodiments of the present disclosure, an apparatus for making a PDF template is provided. The device comprises a display module, a field processing module and an XSLT format saving module. The display module is used for displaying the visual page. The field processing module is used for: inserting a plurality of fields to be filled in the visual page, wherein the position of each field to be filled is specified by a user; and setting a key of each field to be filled. The XSLT format saving module is used for saving the visualized page in an XSLT format to obtain a PDF template, wherein the PDF template is used for generating a PDF file.
According to an embodiment of the disclosure, the apparatus further comprises a filling module and a PDF generation module. The filling module is used for: responding to a filling instruction of the PDF template, and acquiring a data source specified by a user in the filling instruction, wherein the data source comprises N records, and N is an integer greater than or equal to 1; generating N XSLT files according to a one-time filling mode based on the N records and the PDF template; in the one-time filling mode, the values of the data matched with the keywords of the fields to be filled in each record are filled in the PDF template to generate an XSLT file. The PDF generation module is used for generating N PDF files based on the N XSLT files.
According to an embodiment of the disclosure, the apparatus further comprises a template editing module. The template editing module is used for: opening the PDF template; editing the PDF template based on user operations, including at least one of: editing at least one field to be filled in the plurality of fields to be filled in, deleting at least one field to be filled in, or inserting a new field to be filled in. The XSLT format saving module is also used for saving the edited PDF template to generate a new PDF template.
In a third aspect of the disclosed embodiments, an electronic device is provided. The electronic device includes one or more processors and memory. The memory is configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to perform the above-described method.
In a fourth aspect of the disclosed embodiments, there is also provided a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
In a fifth aspect of the disclosed embodiments, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the above method.
One or more of the above embodiments have the following advantages or benefits: through visual template preparation, greatly reduced coding work load, debugging work load, moreover the user can self-service quick preparation complicated PDF template.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium and program product for making a PDF template according to an embodiment of the disclosure;
FIG. 2 schematically illustrates an example of a PDF template according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of making a PDF template in accordance with an embodiment of the disclosure;
FIG. 4 schematically illustrates a user's template layout in a visual page in an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow diagram for populating a PDF template and generating a PDF file in accordance with an embodiment of the disclosure;
FIG. 6 schematically illustrates a schematic of making a plurality of differentiated PDF templates in an embodiment of the disclosure;
FIG. 7 schematically illustrates a flow diagram for editing a PDF template according to an embodiment of the disclosure;
fig. 8 schematically illustrates a block diagram of an apparatus for making PDF templates according to an embodiment of the present disclosure; and
fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement a method of making a PDF template according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The key terms herein are explained as follows:
XSL, an extended style sheet language, english EXtensible Stylesheet Language, XSL may describe how an XML document is displayed;
XSLT, an extensible stylesheet transformation language, english EXtensible Stylesheet Language Transformation, is a component of XSL. XSLT is a document language that can convert an XML document into an XHTML document or other XML document or other type that can be recognized by a browser. Elements and attributes may be added to or removed from the output file by XSLT, elements may be rearranged or sorted, and a decision made as to which elements to display, etc.
Embodiments of the present disclosure provide a method, apparatus, device, medium, and program product for making a PDF template, which may provide a visual page in which fields to be filled are designed by a user self-service, and then form the PDF template that may generate a PDF file by saving the visual page in XSLT format. In some embodiments, a plurality of fields to be filled in a PDF template in an XSLT format may be set to a one-time filling manner, that is, when the PDF template is filled, values of data corresponding to keywords of the plurality of fields to be filled in each piece of recorded data in a data source selected by a user may be filled in the PDF template at one time, so that a PDF file may be quickly generated, a user may be prevented from manually filling each field one by one, efficiency of generating the PDF file is improved, and the method is applicable to quick generation of complex PDF files. In this way, the embodiment of the disclosure greatly reduces the encoding workload and the debugging workload through the visualized template manufacture, and a user can quickly manufacture a complex PDF template by self-service.
Fig. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium and program product for making a PDF template according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a visual management tool for making PDF templates, or a browser application, may be installed on the terminal devices 101, 102, 103. The user can locally make the PDF template through the visual management tool, or can make the PDF template on line through a browser. The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server providing support for the operation of the user to make PDF templates using the terminal devices 101, 102, 103.
It should be noted that the method for making a PDF template provided by the embodiments of the present disclosure may be generally performed by the terminal devices 101, 102, 103. Accordingly, the apparatus, device, medium and program product for making a PDF template provided by the embodiments of the present disclosure may be generally provided in the terminal device 101, 102, 103, and may be, for example, a visual management tool for making a PDF template in the terminal device 101, 102, 103 installed as described above. Of course, the method for making a PDF template provided by the embodiments of the present disclosure may also be performed by the server 105, for example, the user may make the PDF template online in the terminal devices 101, 102, 103 through a browser. Accordingly, the apparatus, device, medium and program product for making PDF templates provided by the embodiments of the present disclosure may also be provided in the server 105. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates an example of a PDF template according to an embodiment of the present disclosure.
In business activities, some PDF documents often have a complex format, such as the template 201 of fig. 2, which is shown to seek a departure.
Specifically, the portion identified by the underline in the diagram of fig. 2 and the portion of the photograph are both fields to be filled. It can be seen that in this template 201, there is some randomness between the positions of the partial fields to be filled, the typesetting does not have normalization of alignment of some dimension, for example, the fields to be filled for filling "date", "time period", etc. are interspersed in the text. Moreover, the data types of the plurality of fields to be filled in the template 201 are not completely the same, for example, the data type corresponding to the field to be filled "photo" is a picture, the data type corresponding to the field to be filled "outside feature description" is a character string, and the data type corresponding to the field to be filled "height" is a number.
The complex-format PDF template such as the template 201 has a very large code writing workload when the PDF format is written by JAVA class in the prior art, and positioning of each field, display effect setting and the like are difficult. And whether the JAVA class writes the PDF format or the developer draws the format document manually, if the text in the template 201 needs to be changed, the developer needs to recode or redraw the PDF format, and the document in the document is repeatedly modified as a common phenomenon, which also causes that the method for manufacturing the PDF template in the prior art is difficult to be suitable for the manufacturing requirement of the PDF file in the complex format.
In view of this, the method for making a PDF template provided by the embodiments of the present disclosure may provide a user (e.g., a business person) with a visual page, and the business person self-designs the PDF template in XSLT format that may be converted into a PDF file.
The method of making a PDF template according to an embodiment of the present disclosure will be described in detail below with reference to the scenario 100 described in fig. 1 and the template 201 illustrated in fig. 2 by way of fig. 3 to 7.
Fig. 3 schematically illustrates a flowchart of a method of making a PDF template according to an embodiment of the present disclosure.
As shown in fig. 3, the method may include operations S301 to S304.
First, in operation S301, a visual page is presented.
Then, in operation S302, a plurality of fields to be filled in are inserted in the visual page, wherein a position of each field to be filled in is specified by a user. In one embodiment, the locations of the plurality of fields to be filled may be random, irregular, as shown in fig. 2.
FIG. 4 schematically illustrates a user's template layout in a visual page in an embodiment of the present disclosure.
Referring to fig. 4, a user may insert elements such as title, user name, text, etc. into a visual page. Further, according to the embodiment of the disclosure, a user may insert one or more fields to be filled in at any designated position in the visual page, and may implement template arrangement by adjusting elements such as template elements, layout, and the like.
In one embodiment, text may be inserted in the visualization page, and then one field to be filled in may be inserted at each location in the text specified by the user, as in module 201 in FIG. 2, one or more texts may be inserted in between the texts.
In one embodiment, the data type of the values to be filled in the multiple fields to be filled may be different. As shown in fig. 2, the data types of the plurality of fields to be filled may include, but are not limited to: numbers, character strings, texts or pictures, etc., thereby realizing template fabrication in a complex format.
In one embodiment, when the user inserts the fields to be filled, the display state of the filled values in each field to be filled may also be controlled based on the layout options selected by the user for each field to be filled. For example, the field to be filled in to control a fixed position of a value filled in therein through options of TOP, LEFT, etc., or to control a size of a value filled in therein through a font format, a font size, etc. By providing typesetting options (such as position control options of TOP, LEFT, etc., or display format control options of font format, font size, etc.), a non-professional user can quickly arrange a template layout meeting his own will.
Then, in operation S303, a key of each field to be filled is set. The key words of each field to be filled are key values in the data stored in the key-value format. The key of each field to be filled can be used for searching the value filled into the corresponding field to be filled from the data source appointed by the user when using the PDF template.
Finally, in operation S304, the visualized page is saved in XSLT format to obtain a PDF template.
Therefore, the embodiment of the disclosure can greatly reduce the encoding workload and the debugging workload by providing the visual page for the user to carry out PDF template arrangement and manufacture, and can adapt to the custom design of the PDF document with the complex format.
In one embodiment, before storing the PDF template in XSLT format, a filling manner of a plurality of fields to be filled may also be set, including one-time filling. When filling a plurality of fields to be filled in a PDF template, a keyword of each piece of recorded data in a data source specified by a user may be matched with a key value of each field to be filled, and a value of the data matched with the keyword may be filled in the corresponding field to be filled. For example, with respect to the template 201, by matching keywords in each record in a data source specified by a user (e.g., a missing person information list that is organized by a business person), information in each field to be filled in the template 201 can be completed at one time, avoiding the very cumbersome and error-prone problem of business persons filling in such information one by one.
Fig. 5 schematically illustrates a flow chart for populating a PDF template and generating a PDF file according to one embodiment of the present disclosure.
As shown in fig. 5, according to the embodiment, the method of making a PDF template may further include operations S501 to S503 after operations S301 to S304.
In operation S501, in response to a fill instruction for a PDF template, a data source specified by a user in the fill instruction is acquired, where the data source includes N records, where N is an integer greater than or equal to 1. The data source may be, for example, a user-consolidated data table or data set datalist to be filled into the PDF template. For example, for template 201, the data source is a list of missing person information.
Then, in operation S502, N XSLT files are generated in a one-time stuffing manner based on the N records and the PDF template. In the one-time filling mode, the values of data matched with the keywords of a plurality of fields to be filled in each record are filled in a PDF template to generate an XSLT file.
Next, in operation S503, N PDF files are generated based on the N XSLT files. Each XSLT file is converted into a PDF file. In this way, the embodiment of the disclosure automatically fills the PDF template in XSLT format in a one-time filling manner and then converts the PDF template into PDF files in batches, so that PDF files can be generated in batches.
Fig. 6 schematically illustrates an illustration of making a plurality of differentiated PDF templates in an embodiment of the present disclosure.
As shown in fig. 6, according to an embodiment of the present disclosure, operations S301 to S304 may be repeatedly performed a plurality of times, generating a plurality of differentiated PDF templates. Wherein, each time the PDF Template of the XSLT format is saved in operation S304, the PDF Template may be saved under a designated directory, wherein, when other PDF templates have been saved under the designated directory, the PDF templates are named by names different from the other PDF templates, as illustrated in the figure, templete 1.XSLT, templete 2.XSLT, templete 3.XSLT. Further, a template list may also be generated based on PDF templates of all XSLT formats under the specified directory. Thus, when the PDF templates need to be data-filled according to the procedure shown in the above-described operations S501 to S503, the template list may be presented to the user, and then when the user selects a PDF template in the template list and triggers a filling operation, a filling instruction is triggered. So that the user can generate a differentiated PDF by selecting a different template.
In order to obtain a differentiated PDF template, in addition to generating a new PDF template each time through operations S301 to S304, an existing PDF template of XSLT format may be edited and stored in another embodiment. For example, a PDF template in XSLT format may be selected from the template list, and then edited according to the method shown in fig. 7 to quickly generate a new PDF template.
Fig. 7 schematically illustrates a flow chart for editing a PDF template according to an embodiment of the present disclosure.
As shown in fig. 7, according to this embodiment, the PDF template can be edited by operations S701 to S703.
First, in operation S701, a PDF template in XSLT format selected by the user is opened.
The PDF template is then edited based on the user operation in operation S702. Specifically, the editing of the PDF template by the user may include, but is not limited to: editing at least one field to be filled in a plurality of fields to be filled in, deleting at least one field to be filled in, or inserting a new field to be filled in.
Finally, in operation S703, the edited PDF template is saved to generate a new PDF template.
According to the embodiment of the disclosure, after the typesetting format and the like are designed in the visual page, the typesetting format is stored in the XSLT format, and a new template is manufactured by adjusting typesetting, adding and deleting fields and the like, so that a new PDF is quickly generated, and the reusability of the PDF template is improved.
The embodiment of the disclosure can quickly and batchly generate differentiated complex format PDF files through visual PDF template manufacture. The manufacturing of the visual template greatly reduces the encoding workload and the debugging workload. And the PDF template manufactured by one person can be used by multiple persons or subjected to custom modification and editing, so that template sharing is realized.
Based on the method for manufacturing the PDF template in each embodiment, the disclosure also provides a device for manufacturing the PDF template. The device will be described in detail below in connection with fig. 8.
Fig. 8 schematically illustrates a block diagram of an apparatus for making PDF templates according to an embodiment of the present disclosure.
As shown in fig. 8, the apparatus 800 for making PDF templates may include a presentation module 810, a field processing module 820, and an XSLT format preservation module 830 according to some embodiments of the present disclosure. According to another embodiment of the present disclosure, the apparatus 800 may further include a population module 840, a PDF generation module 850, and/or a template editing module 860. The apparatus 800 may perform the methods as described in fig. 3-7, according to embodiments of the present disclosure.
The display module 810 is used to display the visual page. In one embodiment, the presentation module 810 may perform operation S301 described above.
The field processing module 820 is configured to insert a plurality of fields to be filled in the visual page, and set a keyword of each field to be filled in, where a location of each field to be filled in is specified by a user. In one embodiment, the field processing module 820 may perform operations S302 and S303 described previously.
In one embodiment, the field processing module 820 is further configured to set the filling manner of the plurality of fields to be filled to include one-time filling. And in the one-time filling mode, when filling a plurality of fields to be filled in the PDF template, matching the key words of the data in each record in the data source designated by the user with the key values of each field to be filled in the PDF template, and filling the values of the data matched with the key words in the corresponding fields to be filled.
The XSLT format storage module 830 is configured to store the visualized page in XSLT format to obtain a PDF template, where the PDF template is used to generate a PDF file. In one embodiment, the XSLT format preservation module 830 may perform operation S304 described previously.
In other embodiments, the apparatus 800 may further include a population module 840 and a PDF survival module 850.
The filling module 840 is for: firstly, responding to a filling instruction of a PDF template, and acquiring a data source specified by a user in the filling instruction, wherein the data source comprises N records, and N is an integer greater than or equal to 1; and then generating N XSLT files according to a one-time filling mode based on the N records and the PDF template, wherein in the one-time filling mode, the values of data matched with the keywords of the fields to be filled in each record are filled in the PDF template to generate one XSLT file. In one embodiment, the population module 840 may perform operations S501-S502 described above.
The PDF generation module 850 is configured to generate N PDF files based on the N XSLT files. In one embodiment, the PDF generation module 850 may perform operation S503 described previously.
In some embodiments, the apparatus 800 may further include a template editing module 860.
The template editing module 860 is configured to first open the PDF template and then edit the PDF template based on user operations, such as editing at least one of the plurality of fields to be filled, deleting at least one field to be filled, or inserting a new field to be filled. Accordingly, XSLT format save module 830 is further configured to save the edited PDF template to generate a new PDF template. In one embodiment, the template editing module 860 may perform operations S701 and S702 described previously. The XSLT format save module 830 may perform operation S703 described previously.
Any of the various modules of presentation module 810, field processing module 820, XSLT format save module 830, fill module 840, PDF generation module 850, and template editing module 860 may be combined in one module or any of the various modules may be split into multiple modules according to embodiments of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the presentation module 810, the field processing module 820, the XSLT format save module 830, the population module 840, the PDF generation module 850, and the template editing module 860 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or as hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or as any one of or a suitable combination of any of the three. Alternatively, at least one of the presentation module 810, the field processing module 820, the XSLT format preservation module 830, the population module 840, the PDF generation module 850, and the template editing module 860 may be at least partially implemented as a computer program module that, when executed, performs the corresponding functions.
Fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement a method of making a PDF template according to an embodiment of the present disclosure.
As shown in fig. 9, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. The processor 901 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 901 may also include on-board memory for caching purposes. Processor 901 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. The processor 901 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the program may be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 900 may also include an input/output (I/O) interface 905, the input/output (I/O) interface 905 also being connected to the bus 904. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 902 and/or RAM 903 and/or one or more memories other than ROM 902 and RAM 903 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to perform the methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, via communication portion 909, and/or installed from removable medium 911. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A method of making a PDF template, comprising:
displaying a visual page;
inserting a plurality of fields to be filled in the visual page, wherein the position of each field to be filled is specified by a user;
setting keywords of each field to be filled; and
and storing the visualized page in an XSLT format to obtain a PDF template.
2. The method of claim 1, wherein prior to said saving said visualization page in XSLT format, said method further comprises:
setting filling modes of the plurality of fields to be filled, wherein the filling modes comprise one-time filling;
and in the one-time filling mode, when filling a plurality of fields to be filled in the PDF template, matching the key words of the data in each record in the data source designated by the user with the key values of each field to be filled in the PDF template, and filling the values of the data matched with the key words in the corresponding fields to be filled.
3. The method of claim 2, wherein the method further comprises:
responding to a filling instruction of the PDF template, and acquiring a data source specified by a user in the filling instruction, wherein the data source comprises N records, and N is an integer greater than or equal to 1;
generating N XSLT files according to the one-time filling mode based on the N records and the PDF template; and
and generating N PDF files based on the N XSLT files.
4. The method of claim 3, wherein,
the step of saving the visualized page in the XSLT format to obtain a PDF template comprises the following steps: storing the PDF templates under a specified directory, wherein when other PDF templates are stored under the specified directory, the PDF templates are named by names different from the other PDF templates; and
and generating a template list based on the PDF template and other PDF templates under the specified directory.
5. The method of claim 4, wherein the method further comprises:
displaying the template list; and
and triggering the filling instruction when the user selects the PDF template in the template list and triggers filling operation.
6. The method of claim 1, wherein inserting a plurality of fields to be filled in the visualization page further comprises:
the display state of the value filled in each field to be filled is controlled based on the typesetting option selected by the user for each field to be filled.
7. The method of claim 1, wherein the method further comprises:
opening the PDF template;
editing the PDF template based on user operations, including at least one of: editing at least one field to be filled in the plurality of fields to be filled in, deleting at least one field to be filled in, or inserting a new field to be filled in;
and storing the edited PDF template to generate a new PDF template.
8. The method of claim 1, wherein the inserting a plurality of fields to be filled in the visualization page comprises:
inserting text in the visual page; and
a field to be filled is inserted in the text at each location specified by the user.
9. An apparatus for making a PDF template, comprising:
the display module is used for displaying the visual page;
a field processing module, configured to:
inserting a plurality of fields to be filled in the visual page, wherein the position of each field to be filled is specified by a user; and
setting keywords of each field to be filled;
and the XSLT format storage module is used for storing the visualized page into an XSLT format to obtain a PDF template, wherein the PDF template is used for generating a PDF file.
10. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of any of claims 1 to 8.
12. A computer program product comprising computer program instructions which, when executed by a processor, implement the method of any one of claims 1 to 8.
CN202310682647.6A 2023-06-09 2023-06-09 Method, device, equipment and medium for making PDF template Pending CN116681048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310682647.6A CN116681048A (en) 2023-06-09 2023-06-09 Method, device, equipment and medium for making PDF template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310682647.6A CN116681048A (en) 2023-06-09 2023-06-09 Method, device, equipment and medium for making PDF template

Publications (1)

Publication Number Publication Date
CN116681048A true CN116681048A (en) 2023-09-01

Family

ID=87786888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310682647.6A Pending CN116681048A (en) 2023-06-09 2023-06-09 Method, device, equipment and medium for making PDF template

Country Status (1)

Country Link
CN (1) CN116681048A (en)

Similar Documents

Publication Publication Date Title
US20230359809A1 (en) Systems and Methods of Document Review, Modification and Permission-Based Control
US11656859B2 (en) Data model API for live applications in a cloud collaboration platform
US6799299B1 (en) Method and apparatus for creating stylesheets in a data processing system
CN1794231B (en) Context-free document portions with alternate formats
US8972854B2 (en) Graphical creation of a document conversion template
US9690770B2 (en) Analysis of documents using rules
US8578265B2 (en) Methods and apparatus for generating a dynamic document
US9122664B2 (en) Method for automatically creating transforms
US20170357628A1 (en) Spreadsheet-Based Form Design and Data Input
US20140258832A1 (en) Computer Implemented System and Method for Author Editing of XML Documents With Structured Element Protection
US9817811B2 (en) Web server system, dictionary system, dictionary call method, screen control display method, and demonstration application generation method
US20220245336A1 (en) Automatic template generation with inbuilt template logic interface
EP1830275A1 (en) Information distribution system
EP1816586A1 (en) Data processing system, data processing method, and management server
US9229920B1 (en) Compound undo/redo manager for mixed model edits
EP1744254A1 (en) Information management device
US20100169333A1 (en) Document processor
US20150113487A1 (en) Automated integrated circuit design documentation
EP1826682A1 (en) Document managing device and document managing method
CN111126008B (en) Code generation method and device based on XSD, computer equipment and storage medium
EP1837776A1 (en) Document processing device and document processing method
CN116681048A (en) Method, device, equipment and medium for making PDF template
US9946698B2 (en) Inserting text and graphics using hand markup
US7730105B2 (en) Time sharing managing apparatus, document creating apparatus, document reading apparatus, time sharing managing method, document creating method, and document reading method
EP1744271A1 (en) Document processing device

Legal Events

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