CN108052491B - Automatic processing method and device for certificate document - Google Patents

Automatic processing method and device for certificate document Download PDF

Info

Publication number
CN108052491B
CN108052491B CN201711174233.3A CN201711174233A CN108052491B CN 108052491 B CN108052491 B CN 108052491B CN 201711174233 A CN201711174233 A CN 201711174233A CN 108052491 B CN108052491 B CN 108052491B
Authority
CN
China
Prior art keywords
document
certificate
file
variable
template file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711174233.3A
Other languages
Chinese (zh)
Other versions
CN108052491A (en
Inventor
李晓妮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Trade Promotion Service Co., Ltd.
Original Assignee
China Trade Promotion Service 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 China Trade Promotion Service Co ltd filed Critical China Trade Promotion Service Co ltd
Priority to CN201711174233.3A priority Critical patent/CN108052491B/en
Publication of CN108052491A publication Critical patent/CN108052491A/en
Application granted granted Critical
Publication of CN108052491B publication Critical patent/CN108052491B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Abstract

The invention relates to an automatic processing method and device for a certificate document. The method comprises the following steps: generating a document template file based on a specific format file format, and increasing the description of variable domain associated objects according to the content typesetting of the certificate document; dividing content elements contained in the certificate document into a variable element and a fixed element, storing the fixed element in a document template file, respectively associating the variable element with a variable domain association object, and storing the association relationship in the document template file; acquiring variable data source items and uniformly converting the variable data source items into intermediate data exchange format files; completing the automatic assembly process of the certificate document according to the description of the content item of the intermediate data exchange format file to obtain a composite layout file; and then performing online preview and printout. The invention effectively solves the key technical problems of automatic generation, online preview and printout of the certificate document, and simultaneously considers the convenience and the safety of the automatic processing process.

Description

Automatic processing method and device for certificate document
Technical Field
The invention belongs to the field of certificate document processing, relates to a method and a device for automatic generation, online preview and printout of a certificate document, and particularly relates to a method and a device for automatic certificate document processing based on a template file.
Background
With the rapid development of economy and society, the public calls for modern service type organizations become stronger, and the traditional government affair and business management mode is no longer applicable. Meanwhile, along with the rapid development of the internet and information technology, the construction of e-government affairs and e-commerce becomes a necessary way to comprehensively improve the government service level. Meanwhile, how to use the network creates a basic platform for providing management and service for the society, and becomes a key for the development of e-government affairs and e-commerce.
At present, China obtains prominent achievement in the aspect of construction of government online business halls. For example, some certification documents issued by a notarization institution or a government or an exporter can complete the work of applying and filling in, administrative examination and approval, automatic signing, online printing and the like of certificates through a website examination and approval system, so that the problems that in the prior art, two parties need to manually sign and seal at different places, much discount and time are needed, much cost is spent on the transportation or mailing for obtaining the certificates, and the inconvenience and the untimely problem of identifying the authenticity of the certificates are solved.
However, the prior art has the following problems and disadvantages: 1) the existing synthesis and printout of the certificate file are finished in a C/S program module of an application client, real-time online preview cannot be realized, if the printed certificate file is found to have problems, the certificate file may need to be returned to an application terminal to re-submit the application, and the user interaction experience is not friendly; 2) when the certificate document is generated, all elements (including variable and invariable) are dynamically generated and assembled in real time, specifically: a new empty file is generated, and then elements are inserted into a new document to generate a final compound document. On one hand, the probability of processing errors is increased (particularly when the operation is performed on elements with large data volume), and meanwhile, when different certificate documents are generated, the server can repeatedly do a lot of work, so that the processing workload of the server is increased, the time is wasted, and the concurrent processing efficiency in unit time is reduced; 3) the support of element extension of a compound document is not sufficient. For example, according to the actual user requirement, when the elements in the compound document need to be added or deleted or the content of the elements needs to be modified, the software system needs to be upgraded again.
Disclosure of Invention
The invention provides an automatic processing method and device of a certificate document, which are used for solving the defects of unfriendly interactive experience, low efficiency, easy error, poor document content expandability and the like of a user in the certificate document generation process in the prior art, further effectively solving the key technical problems of automatic generation, online preview and printout of the certificate document (or called certificate document), and simultaneously considering the convenience and safety of the automatic processing process.
The idea of the invention is that firstly, a document template file is generated based on a specific format file format, and the description of variable domain associated objects is increased according to the content typesetting of the certificate document; dividing content elements contained in the certificate document into a variable element part and a fixed element part, wherein the fixed element part is stored in a template file, the variable element is respectively associated with a variable domain associated object, and the association relationship is stored in the template file; then obtaining variable data source items of the certificate document and uniformly converting the variable data source items into intermediate data exchange format files, such as XML format files; then, updating the incidence relation of the variable domain incidence object in the template file according to the description of the content item of the intermediate data exchange format file, and copying the corresponding resource file to the template file, thereby completing the assembly process of the certificate document to obtain a compound layout file; then calling a reading browser of the format file to finish the online preview process of the certificate document; and finally, calling a printing component of the client to complete the printing output of the certificate document, wherein the printing output can relate to single-certificate printing and batch certificate document printing. In addition, in order to consider security, an element such as a stamp cannot be printed and previewed at will, its output attribute may be set to preview invisible, print visible. Thus, the automatic processing method and device of the certificate document are obtained.
The invention relates to an automatic processing method of a certificate document, which comprises the following steps:
generating a document template file based on a specific format file format, and increasing the description of variable domain associated objects according to the content typesetting of a certificate document;
dividing content elements contained in the certificate document into a variable element and a fixed element, storing the fixed element in a document template file, respectively associating the variable element with a variable domain association object, and storing the association relationship in the document template file;
acquiring variable data source items of the certificate document and uniformly converting the variable data source items into intermediate data exchange format files;
step four, according to the description of the content item of the intermediate data exchange format file, utilizing the document template file to complete the automatic assembly process of the certificate document to obtain a composite layout file;
step five, calling a reading browser of the composite layout file to finish the on-line preview process of the certificate document;
and step six, calling a printing component of the client to complete the printing output of the certificate document.
Preferably, the variable domain associated object includes three primitive objects of text, picture and graphic, and the description contents of each primitive object are as follows:
aiming at the character object, the parameter information to be described is Unicode encoding, font type, font size, character spacing, line spacing, whether the character is bold, whether the character is italic, and the position and size of a text box display area of the character string;
aiming at the picture object, the parameter information to be described is the path name, the picture format and the circumscribed rectangle of the picture area of the picture file;
for the graphic object, the parameter information to be described is spline curve control point set data, a graphic region circumscribed rectangle, a line color, a filling color and a line thickness of the graphic object.
Preferably, the line feed method for the english characters in the text line is divided into, according to the position and size of the display area of the text box, for the text object: line changing according to words, syllable line changing and character line changing;
preferably, in the content elements contained in the certificate document, the fixed elements are one or more of background vector plate pattern graphics, certificate description characters and anti-copying shading image data of the whole page, and the variable elements are one or more of certificate content data in the certificate, a two-dimensional bar code generated according to the document page data, an electronic seal of a certificate issuing organization, an electronic signature of a verifier, an electronic seal of an enterprise, an electronic signature of a hand signer and anti-counterfeiting stamp shading patterns with the same size and the same shape inserted into the bottom of the electronic seal;
preferably, the variable data source items of the certificate document are acquired and uniformly converted into an intermediate data exchange format file, and the intermediate data exchange format file is an XML file;
preferably, the assembly process of the certificate document refers to updating the association relationship of the variable domain association object in the template file, and copying the corresponding resource file into the template file, thereby completing the assembly process of the certificate document to obtain a compound layout file;
preferably, the online preview means that the layout file reader is embedded into a web browser by an ActiveX control technology, an OCX control technology or an NPAPI control technology to realize online browsing;
preferably, the printout of the certificate document refers to that document printing and batch printout are completed by calling a printing component of the client.
Preferably, the output attribute of the element in the certificate document is set to be preview invisible and print visible or preview visible and print visible.
Based on the same inventive concept, the invention also provides an automatic processing device of the certificate document, which comprises:
the template file generation module is responsible for generating a document template file based on a specific format file format and increasing the description of the variable domain associated object according to the content typesetting of the certificate document;
the certificate content element classification module is responsible for dividing content elements contained in the certificate document into a variable element and a fixed element, wherein the fixed element is stored in a template file generated by the template file generation module, the variable element is respectively associated with variable domain associated objects, and the association relationship is stored in the template file together;
the intermediate format file conversion module is responsible for acquiring variable data source items of the certificate documents and uniformly converting the variable data source items into intermediate data exchange format files for the certificate document assembly module;
the certificate document assembly module is connected with the template file generation module, the certificate content element classification module and the intermediate format file conversion module and is responsible for completing the automatic assembly process of the certificate document according to the description of the content item of the intermediate data exchange format file to obtain a composite format file;
the certificate document preview module is connected with the certificate document assembly module and is responsible for calling a reading browser of the composite format file to finish the online preview process of the certificate document;
and the certificate document printing module is connected with the certificate document assembling module and is responsible for calling the printing component of the client to complete the printing output of the certificate document.
The invention has the following beneficial effects:
in the invention, the certificate document content is generated through the template of the format file, wherein the template file can define fixed elements and variable elements. The fixed elements can be stored in the template file in advance, and when different certificate documents are generated, the variable element content only needs to be updated according to the difference of document data, so that repeated insertion of the same element is avoided, the processing efficiency is improved, the concurrent pressure of the server is reduced, and the error probability can be finally reduced.
In the invention, the certificate document is generated through the template file, and when the number of elements in the certificate document is increased or reduced, the new certificate document can be manufactured as long as the template file is required to be modified and the incidence relation of the variable domain associated object of the template file is changed without modifying a software system program. Therefore, it has good expandability.
In the invention, the variable domain associated objects of the template file all have definite parameter description information, and when the content data of the associated objects are changed, the final image drawing effect can be restricted through the parameter information description, so that the typesetting effect of the document content of the certificate is ensured, and the safety is higher.
According to the invention, the format file reader is embedded into the webpage browser by an ActiveX control technology, an OCX control technology or an NPAPI control technology to realize online browsing, so that the online browsing can be obtained, and the user interaction experience is better.
Drawings
FIG. 1 is a flow chart of an automatic processing method of a certificate document in the embodiment;
FIG. 2 is a schematic diagram of element division of a credential document in an embodiment;
FIG. 3 is a schematic diagram of a pattern of an anti-counterfeit seal background in the embodiment;
FIG. 4 is a diagram illustrating the effect of line break typesetting for the line characters of the text in the embodiment;
FIG. 5 is a diagram illustrating an image rendering transformation effect in an embodiment;
FIG. 6 is a schematic structural diagram of an automatic processing device for a document according to an embodiment.
Detailed Description
The following description of the embodiments of the present invention is provided with reference to the accompanying drawings.
As shown in fig. 1, an automatic processing method of a certificate document includes the following steps:
s101, firstly, generating a document template file based on a specific format file format, and increasing the description of variable domain associated objects according to the content typesetting of the certificate document.
Generally, for each type of document, the layout has common content elements as the background pattern for fixing the document. For example, for a academic certificate, a background pattern of a document is composed of a large number of vector layout patterns, so that on one hand, the artistic performance of document typesetting is achieved, and meanwhile, the anti-counterfeiting performance is achieved. In addition, the personal information on the academic certificate can change with different personnel, so that when the academic certificate is generated and printed, in order to improve efficiency, a document template file can be generated based on a specific format file format, wherein the document template file comprises content elements shared by different certificates; and simultaneously inserting a variable field into the template file for dynamically inserting variable elements into the certificate template file according to the associated object each time the certificate document is generated. The variable domain associated object comprises three primitive objects of characters, pictures and figures, and the description contents are as follows:
for the character object, the parameter information to be described is the Unicode code, font type, font size, character spacing, line spacing, whether bold, italic, and the position and size of the text box display area of the character string. All the character objects need to be typeset in the area marked by the text box, wherein English characters often have the condition that one line is not displayed completely and the line is folded and typeset. Generally, according to the position and size of the text box display area, the line feed method of english characters in a text line is divided into: line by word, line by syllable, and line by character.
For the picture object, the parameter information to be described is the path name of the picture file, the picture format and the circumscribed rectangle of the picture area.
For the graphic object, the parameter information to be described is spline curve control point set data, a graphic region circumscribed rectangle, a line color, a filling color and a line thickness of the graphic object.
S102, dividing content elements contained in the certificate document into a variable element and a fixed element.
When the certificate document template file is manufactured, the fixed element part needs to be stored in the template file, the variable elements are respectively associated with the variable domain associated objects, and the association relationship is stored in the template file. For example, the fixed elements are background vector plate pattern graphics, certificate explanatory characters and copy-proof shading image data of the whole page, and certificate content data, a two-dimensional bar code generated according to document page data, an electronic seal of a certificate issuing organization, an electronic signature of a verifier, an electronic seal of an enterprise, an electronic signature of a hand signer and a shading pattern of the anti-fake seal with the same size and the same shape inserted at the bottom of the electronic seal are variable elements. Fig. 2 is a schematic diagram of element division of a type of credential document, in which a background vector layout graph S201 of a full page is a fixed element, and a two-dimensional code S202, a signature S203, a picture S204, and a text description S205 are variable elements.
And identifying the anti-counterfeiting seal shading pattern in the printing original of the certificate document by using the mobile phone APP software. If the hidden information in the file can be correctly identified, the file can be judged to be a true file; when the document of the certificate is copied or forged, the pattern of the bottom pattern of the anti-counterfeiting stamp disappears or is seriously damaged, and when the document of the certificate is identified again, the document of the certificate can be judged to be a fake piece, so that the anti-counterfeiting property of the document of the certificate is better. In addition, because the specifications of the stamp images of different document documents may be different, such as different sizes and different shapes, when the anti-counterfeiting stamp shading pattern is inserted, the anti-counterfeiting stamp pattern needs to be cut according to the shape and the size of the original stamp image, and only the shading pattern inside the electronic stamp image area is reserved. The specific treatment process is as follows:
step1, reading an image area circumscribed rectangle Rect [ dLeftBottom, dRight Bottom, dLeftTop, dRightTop ] described by a variable field of an associated electronic seal pattern;
wherein Rect identifies the size and position information of the stamp pattern, and the size of the area should be the maximum size of all stamp patterns under normal circumstances;
and step2, generating anti-counterfeiting shading data with the same size according to the size of the rectangular Rect circumscribed to the image area.
As shown in fig. 3 (a), the shading data can have a strong anti-counterfeiting effect, and the unique coding information of the certificate is hidden by the shading data. The anti-counterfeiting shading data is shallow in actual printing and is difficult to identify by naked eyes. And identifying the coded information in the anti-counterfeiting shading data in the original printing paper by using the APP software of the mobile phone so as to judge the authenticity of the certificate document. When the document is copied or scanned with high precision and then printed, the anti-counterfeiting shading data can be damaged. In order to illustrate the shading effect, the generated shading concentration is relatively high in the embodiment, and in an actual application environment, the concentration of the anti-counterfeiting shading data is relatively low, so that the anti-counterfeiting shading data is basically invisible to human eyes.
And step3, acquiring the picture path name described by the variable domain of the associated electronic seal pattern, and reading the seal pattern data.
In order to achieve the effect of fusing the electronic seal and the document, the electronic seal patterns scanned and uploaded by the user generally have transparent properties. However, due to the limitation of user operation, the uploaded electronic seal patterns are often not in the center of the picture, and redundant white areas may appear around the picture. At the moment, the white area around the electronic seal is needed to be knocked off, so that the external rectangle of the pattern area of the electronic seal is consistent with the picture area.
And Step4, performing center alignment operation on the processed electronic seal pattern and the anti-counterfeiting shading data generated by Step2, and modifying the anti-counterfeiting shading data.
Firstly, removing shading data outside a rectangular area according to the size of the external rectangular area of the electronic seal pattern, so that the size of the anti-counterfeiting shading data is completely consistent with that of the electronic seal pattern;
then, obtaining an outer edge path of the electronic seal pattern to form a closed region phi, enumerating and judging whether each pixel point in the anti-counterfeiting shading data is inside the phi or not, if so, keeping the pixel point, and otherwise, whitening the pixel point;
and finally, adding the transparent attribute which is the same as the pattern of the electronic seal in the processed anti-counterfeiting shading data, merging the two picture data and inserting the merged two picture data into the certificate document.
For example, fig. 3 (b) and (c) are schematic diagrams of the processed round and square electronic stamp patterns.
S103, acquiring variable data source items of the certificate document and uniformly converting the variable data source items into intermediate data exchange format files.
The most important credential content data in a credential document may come from different application systems and therefore have different structural definitions. In order to adapt the certificate template file to different application scenarios, a uniform intermediate data exchange format file needs to be defined. That is, when the content data in any other application system is imported into the template file, it needs to be converted into an intermediate data interchange format file first. In the embodiment of the invention, the intermediate data exchange format file is an XML file. The simplicity of XML makes it easy to read and write data in any application, which makes XML quickly the only common language for data exchange.
S104, according to the description of the content item of the intermediate data exchange format file, completing the automatic assembly process of the certificate document to obtain a composite layout file.
The assembly process of the certificate document refers to updating the incidence relation of variable domain incidence objects in the template file and copying the corresponding resource file to the template file, so that the assembly process of the certificate document is completed to obtain a composite layout file. The composite layout file is actually similar to a file compression package, and contains fixed elements in the layout file, an XML file (variable domain associated object description), resource files, and other related auxiliary information, such as that required picture file data needs to be copied as a resource file to a subdirectory folder of the compression package file, and relative access path name information needs to be stored in a corresponding variable domain in the XML file. The compound layout file can be parsed independently in any environment without the need for original third party variable data source support. If the path information of the picture file is the database of the designated third party, the picture file can be read only after being accessed and authenticated through the database during file analysis. When the database cannot be accessed, the template file parsing fails.
The updating of the association relationship of the variable domain associated object refers to assigning the information of all data items described in the intermediate data exchange format file to the association relationship items of the corresponding variable domain associated object in the template file respectively. The method mainly comprises the following steps:
1) for the literal object, the text character content in the XML file is mainly copied.
2) For picture objects, the picture pathname information in XML is primarily copied.
Here, the composite version file includes all the picture object data used in the certificate document, and since these picture object data are stored as independent file entities in the composite version file, it is necessary to write corresponding relative path names in the variable fields of the XML file. And finally, when the template file analyzer previews or prints the template file, the image file content data are directly read according to the relative path name recorded in the template file for processing without accessing a database of a third party.
3) For graphical objects, the spline control point data described in XML is primarily copied.
In the present invention, all the graphic object data are represented by cubic Bezier spline curves having four control points, not separately designated by P0,P1,P2,P3Labeled, then its parametric equations can be written as:
P(t)=(1-t)3P0+3t(1-t)2P1+3t2(1-t)P2+t3P3,u∈[0,1]
wherein P is0As a starting point, P3Is the termination point.
Since the control points are represented by two coordinate components on the plane due to the cubic Bezier curve segment on the plane, the parameter equation P (t) can be expressed in a matrix form:
wherein
a1=-P0.x+3·P1.x-3·P2.x+P3.x
b1=-P0.y+3·P1.y-3·P2.y+P3.y
a2=3·P0.x-6·P1.x+3·P2.x
b2=3·P0.y-6·P1.y+3·P2.y
a3=-3·P0.x+3·P1.x
b3=-3·P0.y+3·P1.y
a4=P0.x
b4=P1.y
A parameter matrix (here, P) called M a cubic Bezier curve P (t)i.x、PiY represents the point P, respectivelyiX-direction and y-direction coordinates).
For a graphic object, all control point sets on a cubic Bezier spline curve recorded in an XML file need to be copied into a template file.
And S105, calling a reading browser of the layout file to finish the online preview process of the certificate document.
The online preview means that the layout file reader is embedded into a web browser by an ActiveX control technology, an OCX control technology or an NPAPI control technology to realize online browsing. Similarly, the corresponding component can be called to complete local browsing of the certificate document locally in the client program of the C/S framework.
The method mainly relates to three objects of characters, pictures and figures, and comprises the following steps of calling a reading browser of a format file to finish the process of previewing a certificate document, namely the process of processing various associated object data of a template file and actually drawing the template file, wherein the specific method comprises the following steps:
1. and (5) processing the character object.
As described above, the description of the variable domain associated object defines the display area of the text box, and the character strings are displayed line by line in the text box according to the character layout attributes, such as font type, font size, character spacing, line spacing, whether bold, italic, and the like, where there are three main processing ways for how to change lines for english characters:
1) and (5) line feed by word.
When the end of a character line can not be lined with the next complete English word, the line is directly changed, and the English word is displayed at the head of the next line, as shown in the diagram (a) of FIG. 4.
2) Line feed by syllable.
And (3) separating the last English word according to syllables, using the character after the syllables which cannot be displayed as an integral string, displaying the character at the head of the next line, and connecting the tail of the last line by using a minus. As shown in the diagram (b) of FIG. 4, the English word "way" is divided into "way" and "side", and the middle is connected by "-".
3) And line feed by character.
And according to the actual width of one line, splitting the last English word according to characters, and displaying all the characters which cannot be finally arranged as a whole at the head of the next line. As shown in fig. 4 (c).
Here, there is a special case that needs to be dealt with, that is, when the content of the text string is large and cannot be displayed in the limited text box, the extra page needs to be added to the back of the certificate document for drawing according to the same rule and layout format.
2. And processing the picture object.
In the description of the associated object of the picture variable domain, a picture region circumscribed rectangle is definedI.e. readPicture data must be restrictedWithin the zone. If the original picture size is equal toIf the difference is not consistent, the picture needs to be placed after scaling transformationAnd the whole typesetting effect of the certificate document is ensured not to be wrong. The specific image scaling process is as follows:
step1. associate regions described by objects according to a given image size and variable fieldsE.g., the (a) and (b) diagrams of fig. 5, calculates the scaling factor f of the image in the x-axis directionxScaling factor f in the direction of the y-axisy
Let P be the point in the original image0(x0,y0) After scaling, the corresponding point on the new image is P (x, y), then P0(x0,y0) And P (x, y) are:
the above-described image scaling transformation is performed for each pixel point in the original image, thereby obtaining a new image.
Step3. when fx≤1,fyWhen the image size is less than or equal to 1, the image is reduced in proportion. Image reduction is actually to select or process original pixel point data to obtain data of a desired reduced size, and to keep original features as far as possible. In order to consider the speed, in the present embodiment, a method of selecting data at equal intervals is employed.
fx≥1,fyWhen the value is more than or equal to 1, the figureThe image is scaled up. In the forward transform of image magnification, many spaces appear. Therefore, it is necessary to fill the spaces left after enlargement with appropriate pixel values. In this embodiment, the image enlargement processing is performed by a nearest neighbor difference value or a linear difference value method.
If f isx=fyI.e., the scaling in the x-axis direction and the y-axis direction is the same, such scaling is referred to as full scaling of the image, such as the (c) diagram in fig. 5. If f isx≠fyI.e., the scaling in the x-axis direction and the y-axis direction are not the same, the scaling of the image will change the relative position between the pixels of the original image, resulting in geometric distortion, such as the graph (d) in fig. 5.
3. And (4) processing the graphic object.
The spline curves described in the template file may also undergo some geometric transformation, depending on the constraints of the bounding rectangle of the graphical region. The manner of transformation is similar to that described above for the processing of the image. It should be noted that, when performing geometric transformation on a graphic object, only geometric transformation needs to be performed on each control point on a spline curve.
And S106, finally calling a printing component of the client to complete the printing output of the certificate document.
The printing output of the certificate document refers to that document printing and batch printing output are completed by calling a printing component of the client.
The process of printout of generally important document documents needs to be tightly controlled for security reasons. At this time, the client component limits printing to 1 copy at a time or a specified limited number of copies according to the system settings. And simultaneously setting the output attribute of the element in the template file to be invisible for preview and visible for printing or visible for preview and visible for printing. For example, since the online preview is not the printout of the official document, in the above-mentioned document template elements, the electronic seal of the certificate authority, the electronic signature of the verifier, the electronic seal of the enterprise, the electronic signature of the signer, and the sensitive data content of the electronic seal may be set to be invisible for the preview, but the certificate of the official printout is visible. The output attributes of the remaining insensitive content elements may be set to preview visible and print visible. Therefore, the security risks of data leakage and counterfeiting of the certificate document in the printing output process are effectively reduced.
As shown in fig. 6, the present invention also provides an automatic processing apparatus for a document, comprising:
the template file generation module is responsible for generating a document template file based on a specific format file format and increasing the description of the variable domain associated object according to the content typesetting of the certificate document;
the certificate content element classification module is responsible for dividing content elements contained in the certificate document into a variable element part and a fixed element part, wherein the fixed element part is stored in a template file generated by the template file generation module, the variable elements are respectively associated with variable domain associated objects, and the association relationship is stored in the template file;
the intermediate format file conversion module is responsible for acquiring variable data source items of the certificate documents and uniformly converting the variable data source items into intermediate data exchange format files for the certificate assembly module;
the certificate document assembly module is connected with the template file generation module, the certificate content element classification module and the intermediate format file conversion module and is responsible for completing the automatic assembly process of the certificate document according to the description of the content item of the intermediate data exchange format file to obtain a composite format file;
the certificate document preview module is connected with the certificate document assembly module and is responsible for calling a reading browser of the format file to finish the online preview process of the certificate document;
and the certificate document printing module is connected with the certificate document assembling module and is responsible for calling the printing component of the client to complete the printing output of the certificate document.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
For example, based on the method of the invention, a certificate document template file which is manufactured in advance is stored in a server side, when a client side applies for generating a certificate document, the server side is responsible for reading data information of a variable domain associated object in the certificate document, and then a template file assembly module is called to dynamically complete the generation of a composite certificate document; and then the server sends an instruction to the client, the client module downloads the synthesized complete certificate document to the local, and a format file reader plug-in is called to preview and print and output the certificate document.
For example, based on the method of the present invention, a certificate document template file which is manufactured in advance is stored in a server, and when a client applies for generating a certificate document, the manufactured certificate document template file is downloaded from the server; then the client is responsible for reading the data information of the variable domain associated object in the certificate document, and then the template file assembly module is called to dynamically complete the generation of the composite certificate document; and finally, calling a format file reader plug-in by the client module to preview and print and output the certificate document.
For example, based on the method of the present invention, if the fixed element data volume in the certificate template document is large, network congestion of the server bandwidth may be caused if the client downloads the certificate template document in real time each time, thereby bringing huge cost overhead to the server. At this time, when the format file reader plug-in is installed at the client, the certificate document template file which is manufactured in advance can be stored at the client after being encrypted. When a client applies for generating a certificate document, firstly, decrypting a certificate document template file stored in local; then the client is responsible for reading the data information of the variable domain associated object in the certificate document, and then the template file assembly module is called to dynamically complete the generation of the composite certificate document; and finally, calling a format file reader plug-in by the client module to preview and print and output the certificate document.
For example, based on the method of the present invention, an empty certificate template file can be saved, that is, there are no fixed elements, all the elements are associated through a variable domain, and when a user applies for printing a certificate file, all the variable data sources are dynamically read and inserted into the corresponding variable domains, thereby completing the generation of the certificate document.
For example, based on the method of the present invention, the entire background vector layout pattern can be converted into dot matrix image data, and then stored as a fixed element in the template file.
For example, based on the method of the present invention, all elements in the document are stored as a single independent layout file, and then the document is generated by merging the layout files when the user applies for printing the document.
The above embodiments are only intended to illustrate the technical solution of the present invention and not to limit the same, and a person skilled in the art can modify the technical solution of the present invention or substitute the same without departing from the spirit and scope of the present invention, and the scope of the present invention should be determined by the claims.

Claims (10)

1. An automatic processing method of a certificate document is characterized by comprising the following steps:
generating a document template file based on a specific format file format, and increasing the description of variable domain associated objects according to the content typesetting of a certificate document;
dividing content elements contained in the certificate document into a variable element and a fixed element, storing the fixed element in a document template file, respectively associating the variable element with a variable domain association object, and storing the association relationship in the document template file;
acquiring variable data source items of the certificate document and uniformly converting the variable data source items into intermediate data exchange format files;
step four, according to the description of the content item of the intermediate data exchange format file, utilizing the document template file to complete the automatic assembly process of the certificate document to obtain a composite layout file;
step five, calling a reading browser of the composite layout file to finish the on-line preview process of the certificate document;
and step six, calling a printing component of the client to complete the printing output of the certificate document.
2. The method of claim 1, wherein the variable domain associated objects comprise three primitive objects of text, picture, and graphics.
3. The method of claim 2, wherein the description of the three primitive objects is: for the character object, the described parameter information comprises Unicode encoding of the character string, font type, font size, character spacing, line spacing, whether bold, italic or not, and position and size of a text box display area; for the picture object, the described parameter information comprises a path name of a picture file, a picture format and a picture area circumscribed rectangle; for the graphic object, the described parameter information comprises spline curve control point set data of the graphic object, a graphic area circumscribed rectangle, a line color, a filling color and a line thickness.
4. The method of claim 3, wherein, for the text object, according to the position and size of the display area of the text box, the English characters in the text line are divided into: line by word, line by syllable, and line by character.
5. The method according to claim 1, wherein the fixed element is one or more of a background vector plate pattern of the whole page, certificate description text and anti-copy shading image data, and the variable element is one or more of certificate content data in the certificate, a two-dimensional bar code generated according to document page data, an electronic seal of a certificate authority, an electronic signature of a verifier, an electronic seal of an enterprise, an electronic signature of a hand signer and an anti-copy shading pattern of an equal size and an equal shape inserted at the bottom of the electronic seal.
6. The method of claim 1, wherein the automatic assembly process of the credential document is to update the association relationship of the variable domain association object in the document template file and copy the corresponding resource file into the document template file, thereby completing the assembly process of the credential document to obtain a compound layout file.
7. The method of claim 1, wherein the online preview is to embed a layout file reader into a web browser by an ActiveX control technology, an OCX control technology or an NPAPI control technology to realize online browsing.
8. The method of claim 1, 5 or 7, wherein the element output attribute in the document template file is set to preview invisible and print visible or set to preview visible and print visible.
9. The method of claim 1, wherein when the content data of the variable domain associated object in the document template file is changed, the final image drawing effect is constrained by the parameter information of the variable domain associated object, thereby ensuring the typesetting effect of the document content.
10. An apparatus for automatic processing of credential documents, comprising:
the template file generation module is responsible for generating a document template file based on a specific format file format and increasing the description of the variable domain associated object according to the content typesetting of the certificate document;
the certificate content element classification module is responsible for dividing content elements contained in the certificate document into a variable element and a fixed element, wherein the fixed element is stored in a document template file generated by the template file generation module, the variable element is respectively associated with variable domain associated objects, and the association relationship is stored in the document template file together;
the intermediate format file conversion module is responsible for acquiring variable data source items of the certificate document and uniformly converting the variable data source items into intermediate data exchange format files;
the certificate document assembly module is connected with the template file generation module, the certificate content element classification module and the intermediate format file conversion module and is responsible for completing the automatic assembly process of the certificate document according to the description of the content item of the intermediate data exchange format file to obtain a composite format file;
the certificate document preview module is connected with the certificate document assembly module and is responsible for calling a reading browser of the composite format file to finish the online preview process of the certificate document;
and the certificate document printing module is connected with the certificate document assembling module and is responsible for calling the printing component of the client to complete the printing output of the certificate document.
CN201711174233.3A 2017-11-22 2017-11-22 Automatic processing method and device for certificate document Active CN108052491B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711174233.3A CN108052491B (en) 2017-11-22 2017-11-22 Automatic processing method and device for certificate document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711174233.3A CN108052491B (en) 2017-11-22 2017-11-22 Automatic processing method and device for certificate document

Publications (2)

Publication Number Publication Date
CN108052491A CN108052491A (en) 2018-05-18
CN108052491B true CN108052491B (en) 2021-02-26

Family

ID=62119085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711174233.3A Active CN108052491B (en) 2017-11-22 2017-11-22 Automatic processing method and device for certificate document

Country Status (1)

Country Link
CN (1) CN108052491B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284453A (en) * 2018-07-19 2019-01-29 平安科技(深圳)有限公司 Data download method and device based on PDF document, storage medium, terminal
CN109558181B (en) * 2018-11-26 2022-07-01 高新兴国迈科技有限公司 Method for enabling non-IE browser to be compatible with OCX control, computer storage medium and equipment
CN111144073B (en) * 2019-12-30 2021-11-16 文思海辉智科科技有限公司 Blank character visualization method and device in online text display system
CN113934335A (en) * 2021-09-27 2022-01-14 深圳法大大网络科技有限公司 Electronic seal generation method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500296A (en) * 2013-09-29 2014-01-08 北京溯源鸿业科技有限公司 Inlaying method and device of digital watermarks in text documents
CN106814984A (en) * 2017-01-19 2017-06-09 济南浪潮高新科技投资发展有限公司 A kind of data integration method based on Print Preview control
CN106933791A (en) * 2017-03-10 2017-07-07 山东浪潮云服务信息科技有限公司 One kind generation license method and device
CN107193791A (en) * 2017-05-16 2017-09-22 北京四方继保自动化股份有限公司 Action report visual presentation method based on transient data interchange general format

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8725604B2 (en) * 2008-10-22 2014-05-13 Thomson Reuters (Tax & Accounting) Services, Inc. Method and system for collecting and processing electronic data
AU2014321533A1 (en) * 2013-09-17 2016-04-21 Iex Group, Inc. Techniques for facilitating electronic trading

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500296A (en) * 2013-09-29 2014-01-08 北京溯源鸿业科技有限公司 Inlaying method and device of digital watermarks in text documents
CN106814984A (en) * 2017-01-19 2017-06-09 济南浪潮高新科技投资发展有限公司 A kind of data integration method based on Print Preview control
CN106933791A (en) * 2017-03-10 2017-07-07 山东浪潮云服务信息科技有限公司 One kind generation license method and device
CN107193791A (en) * 2017-05-16 2017-09-22 北京四方继保自动化股份有限公司 Action report visual presentation method based on transient data interchange general format

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"A PROPOSAL FOR A COMMON DATA EXCHANGE FORMAT FOR REPERTORY GRID DATA";OTTO B. WALTER 等;《Journal of Constructivist Psychology》;20040701;第17卷(第3期);第1-3页 *
"博物馆数据库与证件信息文档管理";尹子业;《电子技术与软件工程》;20170111(第1期);第191页 *

Also Published As

Publication number Publication date
CN108052491A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN108052491B (en) Automatic processing method and device for certificate document
US5544045A (en) Unified scanner computer printer
TWI557590B (en) Method for tattooing digital books
US20150244897A1 (en) Security mark with copyable and non-copyable elements
US20060236231A1 (en) Systems and methods for developing dynamic media productions
US20050216832A1 (en) Generation of documents
US20090279143A1 (en) Securing printed output
JP2010510563A (en) Automatic generation of form definitions from hardcopy forms
EP2758919B1 (en) Apparatus for tracing a document in an electronic publication
US20130181995A1 (en) Handwritten character font library
US20170039421A1 (en) Method and system for creating a validation document for security
CN103021006A (en) Method for manufacturing electronic seal pattern model
US20100053691A1 (en) Combining identity-linked images
US20140258059A1 (en) Information processing system, information processing apparatus, method of controlling an information processing apparatus, and program
CN102681976B (en) Document forming method, consistency judging method and system as well as imaging equipment and system
CN110532811B (en) PDF (Portable document Format) signature method and PDF signature system
CN114564931A (en) Electronic certificate generating method and system based on tinymce
KR100798465B1 (en) Learning data formation system for the subject explanation
US7987494B1 (en) Method and apparatus providing end to end protection for a document
US20090121471A1 (en) Method and system for producing documents, websites, and the like having security features
WO2009142096A1 (en) Electronic document control apparatus, method, program and system
US9682590B1 (en) Printed document security
US8539591B2 (en) Document management system, management device, recording medium storing document management program, document management method and data signal
KR20130011868A (en) Method for generating electronic document available at mobile devices and device of producing the same
US20210125386A1 (en) Systems and methods for clipping images

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
TA01 Transfer of patent application right

Effective date of registration: 20180615

Address after: 100871 Zhongguancun North Street, Haidian District, Haidian District, Beijing

Applicant after: Qi Wenfa

Address before: 266555 unit 1, unit 26, Mount Lu Road, Mount Lu Road, Huangdao District, Qingdao, Shandong 602

Applicant before: Li Xiaoni

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20181108

Address after: 100035 Beijing Xicheng District birch factory Hutong No. 2 3 layer

Applicant after: China Trade Promotion Service Co., Ltd.

Address before: 100871 Zhongguancun North Street, Haidian District, Haidian District, Beijing

Applicant before: Qi Wenfa

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant