CN112632941A - Method, device, equipment and storage medium for generating PDF format public security document - Google Patents

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

Info

Publication number
CN112632941A
CN112632941A CN201910901670.3A CN201910901670A CN112632941A CN 112632941 A CN112632941 A CN 112632941A CN 201910901670 A CN201910901670 A CN 201910901670A CN 112632941 A CN112632941 A CN 112632941A
Authority
CN
China
Prior art keywords
public security
document
security document
url
format
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
CN201910901670.3A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201910901670.3A priority Critical patent/CN112632941A/en
Publication of CN112632941A publication Critical patent/CN112632941A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Abstract

The application discloses a method, a device, equipment and a storage medium for generating a PDF format public security document, which comprises the following steps: acquiring a URL (uniform resource locator), wherein the URL is used for positioning and generating service data required by a target public security document and at least carries a document template identifier, and the target public security document is a document corresponding to a target processing node in a service processing flow; acquiring service data corresponding to the URL according to the URL, and acquiring a corresponding HTML-format document template according to the document template identifier; and filling the acquired service data into a document template, generating a to-be-rendered public security document in an HTML format, and rendering the to-be-rendered public security document to obtain a target public security document in a PDF format. Thus, different public security documents meeting different processing nodes can be generated for the processing nodes; moreover, when the processing node of the business processing flow is changed, the corresponding public security document in the PDF format can be automatically generated, so that the operation of a user can be simplified.

Description

Method, device, equipment and storage medium for generating PDF format public security document
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a PDF-format public security document.
Background
The public security document is a character material which is made and used by a public security organization in a public business activity according to a specific program and has specific contents and a specific style, and is an important tool for the public security organization to develop various public business activities. The public security documents generally include both general documents and public security legal documents.
The general documents are commonly used by state organs, social groups and various organizations and can be divided into state administrative organ documents, normative documents and affair documents. Such documents can be made and used by public security agencies and other national administration agencies. The official law documents are documents with legal effectiveness or legal significance which are manufactured and used by the public security officer in law enforcement, for example, documents manufactured by the public security officer in executing law enforcement activities such as investigation, detention, arrest, prequalification and the like on criminal cases.
A public security document is an indispensable tool for public security authorities in administrative and law enforcement activities. In the police legal information system, after the police document is finished or approved, the document needs to be converted into the PDF format and signed or sealed, and the signed or sealed PDF format document cannot be edited.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for generating a public security document in a PDF format, so as to generate the public security document in the PDF format required by practical application.
In a first aspect, an embodiment of the present application provides a method for generating a PDF format public security document, where the method includes:
acquiring a Uniform Resource Locator (URL), wherein the URL is used for positioning and generating service data required by a target public security document, the URL at least carries a document template identifier corresponding to the target public security document, and the target public security document is a document corresponding to a target processing node in a service processing flow;
acquiring service data corresponding to the URL according to the URL, and acquiring a document template in an HTML format according to the document template identifier;
filling the service data into the document template to generate a to-be-rendered public security document in an HTML format;
and rendering the to-be-rendered public security document in the HTML format to obtain a target public security document in the PDF format.
In some possible embodiments, the rendering the to-be-rendered public security document in the HTML format further includes:
and when the filling process time of the business data filled into the document template reaches the rendering waiting time, rendering the to-be-rendered public security document in the HTML format.
In some possible embodiments, the URL further carries a request error reporting ignore parameter for a target communication protocol, and the obtaining a uniform resource locator URL includes:
responding to a public security document generation request based on a target communication protocol, and analyzing the URL from the public security document generation request;
and according to the request error reporting neglecting parameter carried in the URL, ignoring the request error reporting generated based on the public security document generation request.
In some possible embodiments, the URL further carries PDF format parameters for the target public security document, where the PDF format parameters include a printed page size and/or a margin of a PDF.
In some possible embodiments, the URL further carries a case type identifier, and different case type identifiers correspond to different PDF format parameters.
In some possible embodiments, the obtaining the service data corresponding to the URL according to the URL further includes:
and acquiring the service data corresponding to the case identification according to the case identification in the URL.
In some possible embodiments, the populating the service data into the document template to generate a to-be-rendered police document in an HTML format includes:
filling the service data into the document template to obtain an initial public security document in an HTML format;
and when the initial public security document in the HTML format does not meet the HTML page standard, carrying out standardization processing on the initial public security document to obtain the public security document to be rendered in the HTML format.
In a second aspect, an embodiment of the present application provides an apparatus for generating a PDF format public security document, where the apparatus includes:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a Uniform Resource Locator (URL), the URL is used for positioning and generating service data required by a target public security document, the URL at least carries a document template identifier corresponding to the target public security document, and the target public security document is a document corresponding to a target processing node in a service processing flow;
the second acquisition module is used for acquiring the service data corresponding to the URL according to the URL and acquiring a document template in an HTML format according to the document template identifier;
the filling module is used for filling the business data into the document template to generate a to-be-rendered public security document in an HTML format;
and the rendering module is used for rendering the to-be-rendered public security document in the HTML format to obtain a target public security document in the PDF format.
In some possible embodiments, the URL further carries a rendering waiting duration, and the rendering module is specifically configured to render the to-be-rendered police document in the HTML format when a filling process duration during which the service data is filled into the document template reaches the rendering waiting duration.
In some possible embodiments, the URL further carries a request error reporting ignore parameter for a target communication protocol, and the first obtaining request includes:
the analysis unit is used for responding to a public security document generation request based on a target communication protocol and analyzing the URL from the public security document generation request;
and the ignoring unit is used for ignoring the request error report generated based on the public security document generation request according to the request error report ignoring parameter carried in the URL.
In some possible embodiments, the URL further carries PDF format parameters for the target public security document, where the PDF format parameters include a printed page size and/or a margin of a PDF.
In some possible embodiments, the URL further carries a case type identifier, and different case type identifiers correspond to different PDF format parameters.
In some possible embodiments, the URL further carries a case identifier, and the second obtaining module is specifically configured to obtain service data corresponding to the case identifier according to the case identifier in the URL.
In some possible embodiments, the filling module includes:
the filling unit is used for filling the service data into the document template to obtain an initial public security document in an HTML format;
and the standardization processing unit is used for carrying out standardization processing on the initial public security document in the HTML format to obtain the to-be-rendered public security document in the HTML format when the initial public security document in the HTML format does not meet the HTML page standard.
In a third aspect, an embodiment of the present application further provides a storage medium, where a program is stored, and when the program is executed by a processor, the method for generating a PDF-format public security document according to any one of the above-mentioned embodiments of the first aspect is implemented.
In a fourth aspect, an embodiment of the present application further provides an apparatus, where the apparatus includes at least one processor, and at least one memory and a bus connected to the processor; the processor and the memory complete mutual communication through a bus; the processor is configured to call program instructions in the memory to execute the method for generating a PDF-formatted public security document according to any one of the embodiments of the first aspect. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
In the implementation manner of the embodiment of the present application, a uniform resource locator URL may be obtained, where the URL is used to locate service data required for generating a target public security document, and the URL carries at least a document template identifier corresponding to the target public security document, where the target public security document is a document corresponding to a target processing node in a service processing flow; then, according to the URL, the business data corresponding to the URL can be obtained, and a corresponding HTML format document template is obtained according to the document template mark carried in the URL; then, the acquired service data can be filled into a document template to generate a to-be-rendered public security document in an HTML format, and the to-be-rendered public security document in the HTML format is rendered to obtain the required target public security document in the PDF format. Therefore, as the document template identifier carried in the URL indicates the document template required for generating the public security document, for each processing node in the service processing flow, the service data corresponding to the URL may be filled into the document template corresponding to the document template identifier according to the document template identifier carried in the URL corresponding to the processing node, and the public security document in the PDF format required in the actual application may be obtained after rendering, so that different public security documents satisfying the processing node may be generated for different processing nodes; moreover, when the processing node of the business processing flow is changed, for example, the previous processing node enters the current processing node, the corresponding public security document in the PDF format can be automatically generated according to the change of the processing node, and the user does not need to manually determine and generate the public security document in a visual editing page, so that the operation of the user can be simplified.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of an exemplary application scenario in an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for generating a PDF-format public security document according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an apparatus for generating a PDF document in an embodiment of the present application;
fig. 4 is a schematic hardware structure diagram of an apparatus in an embodiment of the present application.
Detailed Description
In practical applications, public security agencies are often required to produce documents in PDF format during administrative and law enforcement activities. Based on this, the embodiment of the present application provides a method for generating a PDF-format public security document, which can generate a required PDF-format public security document by filling service data corresponding to a URL into a document template. Specifically, a uniform resource locator URL may be obtained, where the URL is used to locate service data required for generating a target public security document, and the URL carries at least a document template identifier corresponding to the target public security document, where the target public security document is a document corresponding to a target processing node in a service processing flow; then, according to the URL, the business data corresponding to the URL can be obtained, and a corresponding HTML format document template is obtained according to the document template mark carried in the URL; then, the acquired service data can be filled into a document template to generate a to-be-rendered public security document in an HTML format, and the to-be-rendered public security document in the HTML format is rendered to obtain the required target public security document in the PDF format. Therefore, as the document template identifier carried in the URL indicates the document template required for generating the public security document, for each processing node in the service processing flow, the service data corresponding to the URL may be filled into the document template corresponding to the document template identifier according to the document template identifier carried in the URL corresponding to the processing node, and the public security document in the PDF format required in the actual application may be obtained after rendering, so that different public security documents satisfying the processing node may be generated for different processing nodes; moreover, when the processing node of the business processing flow is changed, for example, the previous processing node enters the current processing node, the corresponding public security document in the PDF format can be automatically generated according to the change of the processing node, and the user does not need to manually determine and generate the public security document in a visual editing page, so that the operation of the user can be simplified.
As an example, the embodiment of the present application may be applied to an exemplary application scenario as shown in fig. 1. In this scenario, the user 101 may input service data corresponding to the current processing node on the terminal 102; the terminal 102 may store the service data input by the user 101 in the queue after the user 101 determines that the input is completed, generate a URL for locating the service data, and then the terminal 102 sends the URL to the server 103, where the URL also carries a document template identifier corresponding to the current processing node; the server 103 receives the URL, acquires service data from the corresponding queue according to the URL, and acquires a corresponding HTML-format document template according to the document template identifier carried in the URL; then, the server 103 may fill the acquired service data into the document template to generate a public security document in an HTML format; since the required public security document in practical application is the public security document in PDF format, the server 103 may convert the public security document in HTML format into the public security document in PDF format, and may further store the generated public security document in PDF format in a corresponding database.
It is to be understood that the above scenario is only one example of a scenario provided in the embodiment of the present application, and the embodiment of the present application is not limited to this scenario. For example, in other possible application scenarios, the terminal 102 may execute the generation process of the whole public security document in the PDF format alone, or when the terminal 102 and the server 103 cooperate with each other to complete the generation process of the public security document, the work respectively borne by the terminal 102 and the server 103 may be different from the above scenario examples. In summary, the embodiments of the present application can be applied to any applicable application scenario, and are not limited to the scenario examples described above.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, various non-limiting embodiments accompanying the present application examples are described below with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for generating a PDF-formatted public security document according to an embodiment of the present application, where the method may be applied to the terminal 102 shown in fig. 1, or applied to the server 103 shown in fig. 1, or completed by the terminal 102 and the server 103. In the following, the technical solution of the embodiment of the present application is described in detail by executing the method shown in fig. 2 on the server side, where the method specifically includes:
s201: the server acquires a URL which is used for positioning service data required by the target public security document, the URL at least carries a document template identifier corresponding to the target public security document, and the target public document is a document corresponding to a target processing node in a service processing flow.
In an actual business processing flow, for different processing nodes, a public security document in a PDF format corresponding to the processing node may need to be generated. For example, in the process of forming an "arrest certificate", it may be necessary to generate a newly created arrest certificate in PDF format (i.e., the above-mentioned public security document) when a law enforcement officer creates the processing node of the arrest certificate; when the process node of requesting leadership to examine and approve arrest certificates is used, the arrest certificates carrying the marks to be examined and approved in PDF format may need to be generated; when the leader finishes approving this processing node, it may be necessary to generate an arrest or the like in PDF format carrying a pass approval mark.
It is noted that for different processing nodes in a business process flow, corresponding public security documents can be automatically generated for the different processing nodes. For example, when the service processing flow enters the current processing node (which may be the target processing node) from the previous processing node, the corresponding public security document in the PDF format may be automatically generated for the current processing node, so that the user is not required to manually determine to generate the public security document, and further, the operations required to be executed by the user may be simplified in the process of generating the public security document.
The business data required for generating the public security documents, such as the name, birth date, address and other data required for generating the arrest certificate, can be input by the user in advance. As an example, when a user needs to create an arrest, a visualized information entry page may be provided to the user through the terminal, and the user completes input of corresponding business data in the page; after the terminal acquires the service data, the terminal may store the service data in a corresponding storage structure (e.g., a queue), and generate a URL corresponding to the service data after completing data storage. In this way, when generating the corresponding public security document, the terminal may send the URL to the server, so that the server may obtain the URL corresponding to the service data, and may further obtain the required service data by executing step S202.
It should be noted that, in practical applications, the public security documents corresponding to each processing node may adopt fixed structural content (such as document format, fixed expression in the document, etc.), while the public security documents corresponding to different processing nodes may have different structural content, for example, in a processing process for a certain criminal case, the public security document that needs to be generated when the case is accepted in an early stage may be a registered case, and the public security document that needs to be generated when the criminal suspicion is determined in a later stage may be an arrest certificate. It is understood that the structural content between the draft registration form and the arrest is not the same. Therefore, when generating corresponding public security documents for different processing nodes, different document templates can be adopted for generation.
In a specific implementation, the URL acquired by the server may carry a document template identifier for the target public security document to be generated, and the target document template identifier may be used to inform the server of which document template is used to generate the target public security document. For example, the URL received by the server may be: "url ═ http:// ga. internal. gridsumdistensitor. com/dev/documentProcess/#/generalpedpdemplateid ═ 5623477742341", wherein "templated" characterizes the document template identifier, and "5623477742341" is a specific value of the document template identifier. In practical application, the server may pre-store the drinking relationship between the document template identifier and the document template, so that after the document template identifier is analyzed from the URL by the server, which document template is used to generate the corresponding police document may be determined based on the corresponding relationship.
In an exemplary embodiment of the server obtaining the URL, the terminal may send a public security document generation request based on the target communication protocol to the server, where the public security document generation request carries the URL, so that the server may respond to the public security document generation request and analyze the URL corresponding to the required service data from the public security document generation request. The target communication Protocol may be any Protocol supporting data communication between the terminal and the server, such as an HTTPS (Hypertext Transfer Protocol Secure) Protocol, an HTML (Hypertext Markup Language) Protocol, and the like.
In practical application, the server may generate an error report problem for the public security document generation request based on the target communication protocol, so that the processing of the request by the server is influenced. Thus, in a further possible embodiment, an error override process may also be performed for the request of the target communication protocol. In specific implementation, the URL parameter may also carry a request error reporting ignoring parameter for a target communication protocol, and after the server parses the request protection ignoring parameter from the URL carried in the received public security document generation request, the request error reporting problem generated based on the public security document generation request may be ignored, so as to improve the compatibility of the server with respect to the request. Taking an example that a target communication protocol is an HTTPS protocol, it is assumed that an HTTPS request received by a server is specifically: "http:// law-gridsumdistensitor. com: 34366/api/renderrurl:// ga. internal. gridsumdistensitor. com/dev/documentprocesses/#/generalpurfiehttpersrors ═ true".
Wherein, the "ignores http errors" is a request error reporting ignoring parameter for the HTTPS communication protocol, and the "true" is a specific value of the request error reporting ignoring parameter, so the server may determine to ignore an error generated by the HTTPS request according to the "ignores http errors" carried in the HTTPS request.
S202: and acquiring the service data corresponding to the URL according to the URL, and acquiring the document template in the HTML format according to the document template identifier.
After the server obtains the URL, the server may obtain, according to the URL, service data corresponding to the URL from a storage structure storing the service data, so as to generate a corresponding public security document based on the service data in the following.
It should be noted that in some practical scenarios, the service data generated during processing different cases may be stored in the same storage structure, so that the service data corresponding to different cases may have the same URL. For example, the service data generated for the administrative case of "zhang san" may be stored in the storage area with the address space of 0x 20000000 to 0x 21000000, and the service data generated for the administrative case of "liquad" may be stored in the storage area with the address space of 0x 21000000 to 0x 22000000, and the service data of both may correspond to the same URL. Based on this, in this embodiment, as an example, the URL acquired by the server may further carry a case identifier, and when the server acquires the service data according to the URL, the server may access the storage structure in which the service data is stored according to the URL, and acquire the service data corresponding to the case identifier from the service data corresponding to the multiple cases according to the case identifier carried in the URL.
Meanwhile, the server can acquire the document template corresponding to the URL according to the document template identifier carried in the URL. In specific implementation, the server may store document templates of various HTML formats in advance, and each document template has a document template identifier corresponding to the document template, so that after the document template identifier is analyzed from the URL, the server can determine the document template corresponding to the document template identifier from the various document templates stored in the server, so as to generate a corresponding public security document by using the document template.
S203: and filling the acquired service data into a document template to generate the to-be-rendered public security document in an HTML format.
After the server obtains the service data and the document template in the corresponding HTML format, since the document template does not include specific service data, the server can fill the service data into the document template to obtain the public security document (i.e., the to-be-rendered public security document in step S203) including the service data, and the public security document is still in the HTML format.
S204: and rendering the to-be-rendered public security document in the HTML format to obtain the target public security document in the PDF format.
Since the required public security document in practical application is the public security document in the PDF format, after the public security document in the HTML format is obtained, format conversion can be performed on the public security document, and specifically, the format of the public security document can be converted from the HTML format to the PDF format.
During specific implementation, the server can determine HTML tags in the public security document in the HTML format, then map each HTML tag into a corresponding PDF tag, and determine the layout of the PDF tags in the public security document according to the layout of the HTML tags in the public security document, so that the public security document in the PDF format can be generated according to each PDF tag and the corresponding page layout, wherein the public security document in the PDF format contains service data of the target processing node.
In practical application, a browser can be built in the server, and the built-in browser can quickly position the HTML tag in the public security document in the HTML format, so that the public security document in the PDF format can be quickly rendered by utilizing the built-in browser, and the rendering performance of the public security document can be improved.
In addition, in some practical scenarios, the document template in the HTML format determined by the server may include an nonstandard HTML tag, for example, there may be one more HTML tag < table > in the document template, or the previous tag < div > in the public security document in the HTML format does not have a closed tag </div >, and the like. In order to avoid as much as possible the failure of generating the final public security document in the PDF format due to the non-standard HTML tag included in the document template, in this embodiment, in the process of generating the public security document in the HTML format, the tag in the public security document may be standardized.
Specifically, the server may fill the service data into a document template in an HTML format to obtain an initial public security document in the HTML format, and since the initial public security document in the HTML format may include an nonstandard HTML tag, when it is determined that the initial public security document in the HMTL format does not meet the HTML page standard, the initial public security document may be standardized to obtain the to-be-rendered public security web document in the HTML format. For example, when the HTML tag < table > is added to the original public security document, the HTML tag < table > may be deleted, or an end tag </table > may be added to a suitable position; for another example, when the end tag </div > appears in the initial public security document, the tag < div > may be added thereto to achieve standardization of the initial public security document. Therefore, even if the initial public security document contains nonstandard HTML tags, the obtained public security document to be rendered can be free from the problem that the standard of an HTML page is not met after the initial public security document is subjected to standardization processing, and the success rate of rendering the public security document in the PDF format obtained by the public security document in the HTML format can be improved. Of course, if the initial public security document does not include an nonstandard HTML tag, the initial public security document may be directly determined as the public security document to be rendered.
Further, the server may specifically be a device that implements standardized processing of the initial public security document through a built-in browser.
In practical application, a certain time is needed for the server to fill the service data into the document template, and if more service data exist or the network has time delay jitter, the server can render the to-be-rendered public security document which is not filled with the service data, so that the finally obtained public security document in the PDF format has the problem of service data missing. Based on this, in this embodiment, before rendering the to-be-rendered police document in the HTML format, the server may wait for a period of time, so that the server has enough time to fill all the service data into the document template.
In specific implementation, the URL received by the server may also carry a rendering waiting time, so that after the rendering waiting time is analyzed from the URL, the server may determine whether the filling process time for filling the service data into the document template by the server reaches the rendering waiting time, if so, the server may perform a corresponding rendering operation on the to-be-rendered public security document, and if the filling process time does not reach the rendering waiting time, the server may continue to wait until the data filling time reaches the rendering waiting time. For example, the URL received by the server may be: "url:// ga. internal. gridsumdistensitor. com/dev/documentProcess/#/generatepdwaitfaitor ═ 1500", wherein "waitFor" represents a rendering waiting time length, "1500" is a specific value of the rendering waiting time length, and the unit is ms (millisecond).
In this embodiment, when the public security document in the PDF format is generated, the parameter setting may be performed on the PDF format of the public security document. Specifically, although different police documents may be in PDF format, the PDF format parameters of the various police documents may be different, for example, for the police document a, the printing page size may be a4 size (i.e., 210 mm × 297 mm), and for the police document B, the printing page size may be A3 size (i.e., 297 mm × 420 mm), and so on. Therefore, when the server renders the to-be-rendered public security document, the PDF format parameters carried by the document can be analyzed from the URL, and the PDF format parameters may include the printing page size and/or the page margin of the PDF. In this way, when the server renders the public security documents in the PDF format, the PDF of the corresponding printing page size and/or page margin can be rendered according to the PDF format parameters, so that the public security documents in the PDF format corresponding to different processing nodes or different service processing flows can have different PDF format parameters. For example, assuming that the URL carries both the printed page size and the margin, the URL may be "URL ═ http:// ga. internal. gridding distance vector. com/dev/documentProcess/#/generatepdfpdf. format ═ a4& pdf. margin. top ═ 37mm & pdf. margin. right:. 26mm & pdf. margin. bottom ═ 35mm & pdf. margin. left ═ 28 mm". Format represents the printing page size of PDF, and a4 is a specific value of the printing page size; mark. top "denotes the upper margin of PDF, which corresponds to a value of" 37 "in mm (millimeters); "pdf.margin.right" represents the right margin of PDF, which corresponds to a value of "26" in mm (millimeters); mark.bottom "denotes the bottom margin of PDF, which corresponds to a value of" 35 "in mm (millimeters); left represents the left margin of PDF, which corresponds to a value of "28" in mm (millimeters).
The PDF format parameters may be set according to the requirements of the actual application. As an example, the PDF format parameters of the public security documents may be determined according to the case type of the case corresponding to the business processing flow. For example, for a public security document of a criminal case, the public security document may be required to be A3 size in practical application, and for a public security document of an administrative case, the public security document may be required to be a4 size in practical application, the PDF format parameter of the public security document of the criminal case may be set to be A3 size, and the PDF parameter of the public security document of the administrative case may be set to be a4 size (of course, public security documents of different case types may also be set to have different margins and the like). In this embodiment, the case type may be identified by using a corresponding case type identifier, and the case type identifier may be carried in a URL. Therefore, the server can analyze the corresponding case type identifier from the acquired URL and determine the case type corresponding to the current processing node according to the case type identifier, so that the PDF format parameters corresponding to the generated public security document can be further determined (or directly determined according to the case type identifier), and the public security document in the corresponding PDF format can be obtained through rendering according to the PDF format parameters. For example, the URL carrying the case type identifier may be "URL ═ http:// ga. internal. gridding disparator. com/dev/documentProcess/#/generalpedcaseType ═ 901", where "caseType" is the case type identifier and "901" is the specific value of the case type identifier. Of course, the PDF format parameters may also be dynamically adapted according to each processing node in the service processing flow.
Furthermore, after the public security document in the PDF format is obtained through rendering, the public security document can be filed and stored. In a specific implementation, the server may store the PDF data stream (i.e., the public security document in the PDF format) into a pre-established database (e.g., a database named "electronic file"), so that when the public security document is needed (e.g., the public security document needs to be queried), the needed public security document may be obtained by accessing the database. Of course, in other possible embodiments, the server may also send the public security document in PDF format to the terminal, and the terminal presents it to the user and/or stores it in a local database, etc.
It is to be noted that, in this embodiment, a server executes the above method as an example, and the technical solution of the embodiment of the present application is exemplarily described. In practical application, the terminal and the server may cooperate to execute the method to generate the public security document in the PDF format.
In this embodiment, the server may obtain a uniform resource locator URL, where the URL is used to locate service data required for generating a target public security document, and the URL carries at least a document template identifier corresponding to the target public security document, where the target public security document is a document corresponding to a target processing node in a service processing flow; then, according to the URL, the business data corresponding to the URL can be obtained, and a corresponding HTML format document template is obtained according to the document template mark carried in the URL; then, the acquired service data can be filled into a document template to generate a to-be-rendered public security document in an HTML format, and the to-be-rendered public security document in the HTML format is rendered to obtain the required target public security document in the PDF format. Therefore, as the document template identifier carried in the URL indicates the document template required for generating the public security document, for each processing node in the service processing flow, the service data corresponding to the URL may be filled into the document template corresponding to the document template identifier according to the document template identifier carried in the URL corresponding to the processing node, and the public security document in the PDF format required in the actual application may be obtained after rendering, so that different public security documents satisfying the processing node may be generated for different processing nodes; moreover, when the processing node of the business processing flow is changed, for example, the previous processing node enters the current processing node, the corresponding public security document in the PDF format can be automatically generated according to the change of the processing node, and the user does not need to manually determine and generate the public security document in a visual editing page, so that the operation of the user can be simplified.
In addition, the embodiment of the application also provides a device for generating the public security document in the PDF format. Referring to fig. 3, fig. 3 is a schematic structural diagram illustrating an apparatus for generating a PDF format public security document according to an embodiment of the present application, where the apparatus 300 includes:
a first obtaining module 301, configured to obtain a uniform resource locator URL, where the URL is used to locate service data required for generating a target public security document, where the URL carries at least a document template identifier corresponding to the target public security document, and the target public security document is a document corresponding to a target processing node in a service processing flow;
a second obtaining module 302, configured to obtain, according to the URL, service data corresponding to the URL, and obtain, according to the document template identifier, a document template in an HTML format;
a filling module 303, configured to fill the service data into the document template, and generate a to-be-rendered public security document in an HTML format;
and the rendering module 304 is configured to render the to-be-rendered public security document in the HTML format to obtain a target public security document in the PDF format.
In some possible embodiments, the URL further carries a rendering waiting duration, and the rendering module 304 is specifically configured to render the to-be-rendered police document in the HTML format when the duration of the process of filling the service data into the document template reaches the rendering waiting duration.
In some possible embodiments, the URL further carries a request error reporting ignore parameter for a target communication protocol, and the first obtaining module 301 includes:
the analysis unit is used for responding to a public security document generation request based on a target communication protocol and analyzing the URL from the public security document generation request;
and the ignoring unit is used for ignoring the request error report generated based on the public security document generation request according to the request error report ignoring parameter carried in the URL.
In some possible embodiments, the URL further carries PDF format parameters for the target public security document, where the PDF format parameters include a printed page size and/or a margin of a PDF.
In some possible embodiments, the URL further carries a case type identifier, and different case type identifiers correspond to different PDF format parameters.
In some possible embodiments, the URL further carries a case identifier, and the second obtaining module 302 is specifically configured to obtain service data corresponding to the case identifier according to the case identifier in the URL.
In some possible embodiments, the filling module 303 includes:
the filling unit is used for filling the service data into the document template to obtain an initial public security document in an HTML format;
and the standardization processing unit is used for carrying out standardization processing on the initial public security document in the HTML format to obtain the to-be-rendered public security document in the HTML format when the initial public security document in the HTML format does not meet the HTML page standard.
It should be noted that, because the contents of information interaction, execution processes, and the like between the modules, units, and sub-units of the apparatus belong to the same concept as the method embodiment in the embodiment of the present application, accordingly, the technical effects brought by the contents are the same as the technical effects of the method embodiment in the embodiment of the present application, and specific contents may refer to descriptions of relevant parts in the method embodiment, and are not described herein again.
In this embodiment, since the document template identifier carried in the URL indicates the document template required for generating the public security document, for each processing node in the service processing flow, the service data corresponding to the URL may be filled into the document template corresponding to the document template identifier according to the document template identifier carried in the URL corresponding to the processing node, and the public security document in the PDF format required in the actual application may be obtained after rendering, so that different public security documents satisfying the processing node may be generated for different processing nodes; moreover, when the processing node of the business processing flow is changed, for example, the previous processing node enters the current processing node, the corresponding public security document in the PDF format can be automatically generated according to the change of the processing node, and the user does not need to manually determine and generate the public security document in a visual editing page, so that the operation of the user can be simplified.
The article duplicate removal device comprises a processor and a memory, wherein the first acquisition module, the second acquisition module, the filling module, the rendering module, the analysis unit, the neglecting unit, the filling unit, the standardization processing unit and the like can be stored in the memory as program modules and units, and the processor executes the program modules and the units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls corresponding program modules, units and subunits from the memory. The kernel can set one or more, and the public security documents in PDF format required by the practical application are generated by adjusting the parameters of the kernel.
An embodiment of the present application provides a storage medium, on which a program is stored, which, when executed by a processor, implements the method for generating a PDF-format public security document.
The embodiment of the application provides a processor, wherein the processor is used for running a program, and the method for generating the PDF format public security document is executed when the program runs.
Referring to fig. 4, fig. 4 illustrates an apparatus 40 provided in an embodiment of the present application, where the apparatus 40 includes at least one processor 401, at least one memory 402 connected to the processor 401, and a bus 403; the processor 41 and the memory 402 complete communication with each other through the bus 403; the processor 401 is configured to call program instructions in the memory 402 to perform the above-described method of generating a PDF formatted public security document. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring a Uniform Resource Locator (URL), wherein the URL is used for positioning and generating service data required by a target public security document, the URL at least carries a document template identifier corresponding to the target public security document, and the target public security document is a document corresponding to a target processing node in a service processing flow;
acquiring service data corresponding to the URL according to the URL, and acquiring a document template in an HTML format according to the document template identifier;
filling the service data into the document template to generate a to-be-rendered public security document in an HTML format;
and rendering the to-be-rendered public security document in the HTML format to obtain a target public security document in the PDF format.
In some possible embodiments, the URL further carries a rendering latency, and when executed on the data processing apparatus, is adapted to specifically execute a program that initializes the following method steps:
and when the filling process time of the business data filled into the document template reaches the rendering waiting time, rendering the to-be-rendered public security document in the HTML format.
In some possible embodiments, the URL further carries a request error notification ignore parameter for the target communication protocol, and when executed on the data processing device, is adapted to specifically execute a program that initializes the following method steps:
responding to a public security document generation request based on a target communication protocol, and analyzing the URL from the public security document generation request;
and according to the request error reporting neglecting parameter carried in the URL, ignoring the request error reporting generated based on the public security document generation request.
In some possible embodiments, the URL further carries PDF format parameters for the target public security document, where the PDF format parameters include a printed page size and/or a margin of a PDF.
In some possible embodiments, the URL further carries a case type identifier, and different case type identifiers correspond to different PDF format parameters.
In some possible embodiments, the URL further carries a case identifier, which when executed on the data processing device is adapted to specifically execute a program that initializes the following method steps:
and acquiring the service data corresponding to the case identification according to the case identification in the URL.
In some possible embodiments, it is suitable, when executed on a data processing device, to carry out in particular a procedure for initializing the following method steps: filling the service data into the document template to obtain an initial public security document in an HTML format;
and when the initial public security document in the HTML format does not meet the HTML page standard, carrying out standardization processing on the initial public security document to obtain the public security document to be rendered in the HTML format.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, devices and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
In the names of the "first acquisition module" and the like mentioned in the embodiments of the present application, the "first" is used merely as a name identification, and does not represent the first in sequence. The same applies to "second" etc.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The use of the phrase "including an" as used herein does not exclude the presence of other, identical elements, components, methods, articles, or apparatus that may include the same, unless expressly stated otherwise.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of generating a PDF formatted public security document, the method comprising:
acquiring a Uniform Resource Locator (URL), wherein the URL is used for positioning and generating service data required by a target public security document, the URL at least carries a document template identifier corresponding to the target public security document, and the target public security document is a document corresponding to a target processing node in a service processing flow;
acquiring service data corresponding to the URL according to the URL, and acquiring a document template in an HTML format according to the document template identifier;
filling the service data into the document template to generate a to-be-rendered public security document in an HTML format;
and rendering the to-be-rendered public security document in the HTML format to obtain a target public security document in the PDF format.
2. The method of claim 1, wherein the URL further carries a rendering wait time, and the rendering the to-be-rendered police document in the HTML format comprises:
and when the filling process time of the business data filled into the document template reaches the rendering waiting time, rendering the to-be-rendered public security document in the HTML format.
3. The method of claim 1, wherein the URL further carries a request error notification ignore parameter for a target communication protocol, and wherein obtaining a uniform resource locator URL comprises:
responding to a public security document generation request based on a target communication protocol, and analyzing the URL from the public security document generation request;
and according to the request error reporting neglecting parameter carried in the URL, ignoring the request error reporting generated based on the public security document generation request.
4. The method of claim 1, wherein the URL further carries PDF format parameters for the target police document, the PDF format parameters including a printed page size and/or margin of PDF.
5. The method according to claim 1, wherein the URL further carries case type identifiers, and wherein different case type identifiers correspond to different PDF format parameters.
6. The method according to claim 1, wherein the URL further carries a case identifier, and the obtaining the service data corresponding to the URL according to the URL includes:
and acquiring the service data corresponding to the case identification according to the case identification in the URL.
7. The method according to any one of claims 1 to 6, wherein the filling the service data into the document template to generate the to-be-rendered police document in an HTML format comprises:
filling the service data into the document template to obtain an initial public security document in an HTML format;
and when the initial public security document in the HTML format does not meet the HTML page standard, carrying out standardization processing on the initial public security document to obtain the public security document to be rendered in the HTML format.
8. An apparatus for generating a PDF formatted public security document, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a Uniform Resource Locator (URL), the URL is used for positioning and generating service data required by a target public security document, the URL at least carries a document template identifier corresponding to the target public security document, and the target public security document is a document corresponding to a target processing node in a service processing flow;
the second acquisition module is used for acquiring the service data corresponding to the URL according to the URL and acquiring a document template in an HTML format according to the document template identifier;
the filling module is used for filling the business data into the document template to generate a to-be-rendered public security document in an HTML format;
and the rendering module is used for rendering the to-be-rendered public security document in the HTML format to obtain a target public security document in the PDF format.
9. A storage medium having stored thereon a program which, when executed by a processor, implements the method of generating a PDF-formatted document according to any one of claims 1 to 7.
10. An apparatus comprising at least one processor, and at least one memory, bus connected to the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to invoke program instructions in the memory to perform the method of generating a PDF formatted document according to any of claims 1-7.
CN201910901670.3A 2019-09-23 2019-09-23 Method, device, equipment and storage medium for generating PDF format public security document Pending CN112632941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910901670.3A CN112632941A (en) 2019-09-23 2019-09-23 Method, device, equipment and storage medium for generating PDF format public security document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910901670.3A CN112632941A (en) 2019-09-23 2019-09-23 Method, device, equipment and storage medium for generating PDF format public security document

Publications (1)

Publication Number Publication Date
CN112632941A true CN112632941A (en) 2021-04-09

Family

ID=75282727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910901670.3A Pending CN112632941A (en) 2019-09-23 2019-09-23 Method, device, equipment and storage medium for generating PDF format public security document

Country Status (1)

Country Link
CN (1) CN112632941A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415986A (en) * 2021-10-11 2022-04-29 浪潮软件股份有限公司 Document template customizing and printing method, device and computer readable medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100858103B1 (en) * 2008-02-18 2008-09-11 유니닥스주식회사 Template-based pdf publishing system for web contents
US9563613B1 (en) * 2015-01-23 2017-02-07 Sprint Communications Company L.P. System and method for dynamic portable document file generation
WO2017092555A1 (en) * 2015-12-01 2017-06-08 北京国双科技有限公司 Method and device for parsing amount of money in judgement document
WO2018001124A1 (en) * 2016-06-28 2018-01-04 阿里巴巴集团控股有限公司 Webpage file sending method, webpage rendering method and apparatus, and webpage rendering system
CN107766344A (en) * 2016-08-15 2018-03-06 阿里巴巴集团控股有限公司 The method, apparatus and browser that a kind of template renders
CN109815467A (en) * 2018-12-20 2019-05-28 广州恒巨信息科技有限公司 A kind of Judicial mediation document intelligent generation method, system and device
CN110096689A (en) * 2019-05-17 2019-08-06 北京市律典通科技有限公司 Template type legal documents information fill method and device
CN110245110A (en) * 2019-05-20 2019-09-17 深圳壹账通智能科技有限公司 Data processing method, device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100858103B1 (en) * 2008-02-18 2008-09-11 유니닥스주식회사 Template-based pdf publishing system for web contents
US9563613B1 (en) * 2015-01-23 2017-02-07 Sprint Communications Company L.P. System and method for dynamic portable document file generation
WO2017092555A1 (en) * 2015-12-01 2017-06-08 北京国双科技有限公司 Method and device for parsing amount of money in judgement document
WO2018001124A1 (en) * 2016-06-28 2018-01-04 阿里巴巴集团控股有限公司 Webpage file sending method, webpage rendering method and apparatus, and webpage rendering system
CN107766344A (en) * 2016-08-15 2018-03-06 阿里巴巴集团控股有限公司 The method, apparatus and browser that a kind of template renders
CN109815467A (en) * 2018-12-20 2019-05-28 广州恒巨信息科技有限公司 A kind of Judicial mediation document intelligent generation method, system and device
CN110096689A (en) * 2019-05-17 2019-08-06 北京市律典通科技有限公司 Template type legal documents information fill method and device
CN110245110A (en) * 2019-05-20 2019-09-17 深圳壹账通智能科技有限公司 Data processing method, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114415986A (en) * 2021-10-11 2022-04-29 浪潮软件股份有限公司 Document template customizing and printing method, device and computer readable medium

Similar Documents

Publication Publication Date Title
CN107122258B (en) Method and equipment for checking state code of test interface
CN107122296B (en) Method and apparatus for data assertion for test interface
CN108491367B (en) Report document generation method and device, computer equipment and storage medium
CN106897251B (en) Rich text display method and device
US10839145B2 (en) Form filling method and related terminal
CN110472219B (en) Electronic file generation method, electronic file generation device, computer equipment and storage medium
CN109902247B (en) Page rendering method and device and electronic equipment
CN109447820B (en) Data processing method, device, computer equipment and storage medium
CN110705236A (en) Electronic contract template dynamic configuration method and system
WO2020232883A1 (en) Script defect scanning method and apparatus, computer device and storage medium
CN111385316A (en) Resource refreshing method, access method and device
CN112685193A (en) Micro-service gateway interface exposure and aggregation method
CN111865881A (en) Interface conversion method, device, medium and computer equipment
CN110362547A (en) Coding, parsing, storage method and the device of journal file
CN106658666B (en) Method and equipment for establishing wireless connection
CN111818175A (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN111767229A (en) Performance test method, device and equipment
CN112632941A (en) Method, device, equipment and storage medium for generating PDF format public security document
CN113852639A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN109816462A (en) A kind of recognition methods of invoice information and device
CN106598983A (en) Information display method and device
CN109344372B (en) Big data-based document generation method and system
CN112202598B (en) Log recording method and device
CN111443920B (en) Frame migration method and 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