CN114676097A - OFD file processing method, device, equipment and medium - Google Patents

OFD file processing method, device, equipment and medium Download PDF

Info

Publication number
CN114676097A
CN114676097A CN202011560280.3A CN202011560280A CN114676097A CN 114676097 A CN114676097 A CN 114676097A CN 202011560280 A CN202011560280 A CN 202011560280A CN 114676097 A CN114676097 A CN 114676097A
Authority
CN
China
Prior art keywords
file
signature
data
ofd
coordinate information
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
CN202011560280.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.)
Aerospace Information Co ltd Enterprise Service Branch
Original Assignee
Aerospace Information Co ltd Enterprise Service Branch
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 Aerospace Information Co ltd Enterprise Service Branch filed Critical Aerospace Information Co ltd Enterprise Service Branch
Priority to CN202011560280.3A priority Critical patent/CN114676097A/en
Publication of CN114676097A publication Critical patent/CN114676097A/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/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • 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/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides an OFD file processing method, an OFD file processing device, OFD file processing equipment and an OFD file processing medium.

Description

OFD file processing method, device, equipment and medium
Technical Field
The present application relates to the field of electronic file processing technologies, and in particular, to a method, an apparatus, a device, and a medium for processing an open-format document (OFD) file.
Background
With the rapid development of electronic files, more and more people use OFD files, but reading the OFD files requires downloading file reading software of a specific OFD format for reading, if the file reading software of the OFD format is not used for reading, the OFD files cannot be opened, in addition, the installation of the file reading software of the OFD format also requires unique environment dependence, and if the current environment does not meet the conditions, the OFD files cannot be read, which affects user experience.
Disclosure of Invention
The invention provides an OFD file processing method, an OFD file processing device, OFD file processing equipment and an OFD file processing medium, which are used for solving the problem that file reading software of an OFD format cannot be installed or cannot be read due to the fact that installation environment does not meet conditions in the prior art.
The invention provides an OFD file processing method, which comprises the following steps:
acquiring a data file and a signature file in the OFD file according to an entry file of the OFD file;
determining the content in the data file and the signature file according to each label contained in the data file and the signature file;
converting the determined content into a hypertext markup language (HTML) file.
Further, the determining the content in the data file and the signature file according to each tag included in the data file and the signature file includes:
according to the data file and each tag contained in the signature file, determining a resource file in the data file, a note for displaying data content, an attachment, signature data in the signature file and coordinate information of a signature position;
the converting the determined content into a hypertext markup language (HTML) file comprises:
and converting the determined resource file, the annotation showing the data content, the attachment, the signature data and the coordinate information of the signature position into a hypertext markup language (HTML) file.
Further, the determining the coordinate information of the signature position comprises:
determining the page number of the signature file according to each label contained in the signature file;
and if the page number is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
Further, the converting the determined resource file, the comment and the attachment for showing data content, and the signature data and the coordinate information of the signature position in the signature file into a hypertext markup language HTML file includes:
if the resource file, the comment and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain characters or data or form lines, converting the attributes of the characters or the data or the form lines into Scalable Vector Graphics (SVG) attributes; determining an HTML file according to the SVG attribute;
if the resource file, the annotation and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain an image or a video or a two-dimensional code, converting the attribute of the image or the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
Further, said converting the attribute of the coordinate information of the signature position into a scalable vector graphics format SVG attribute includes:
and converting the attribute of the coordinate of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute.
Further, the method further comprises:
and displaying the HTML file on a display page of the browser.
The invention provides an OFD file processing device, which comprises:
the acquisition module is used for acquiring a data file and a signature file in the OFD file according to an entry file of the OFD file;
the determining module is used for determining the content in the data file and the signature file according to each label contained in the data file and the signature file;
and the conversion module is used for converting the determined content into a hypertext markup language (HTML) file.
Further, the determining module is specifically configured to determine, according to each tag included in the data file and the signature file, a resource file in the data file, an annotation showing data content, an attachment, and the signature data and coordinate information of a signature position in the signature file;
the conversion module is specifically configured to convert the determined resource file, the annotation showing data content, the attachment, and the coordinate information of the signature data and the signature position into a hypertext markup language HTML file.
Further, the determining module is specifically configured to determine the number of pages of the signature file according to each tag included in the signature file; and if the page number is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
Further, the conversion module is specifically configured to convert attributes of the text, the data, or the form line into scalable vector graphics format SVG attributes if the resource file, the annotation showing the data content, and the attachment, the signature data, and the coordinate information of the signature position contain the text, the data, or the form line; determining an HTML file according to the SVG attribute; if the resource file, the annotation for displaying the data content, the attachment, the signature data and the coordinate information of the signature position contain an image, a video or a two-dimensional code, converting the attribute of the image, the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
Further, the conversion module is specifically configured to convert the attribute of the coordinate of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute.
Further, the apparatus further comprises:
And the display module is used for displaying the HTML file on a display page of the browser.
The present invention provides an electronic apparatus comprising a processor for implementing the steps of the OFD file processing method as described in any one of the above when executing a computer program stored in a memory.
The present invention provides a computer-readable storage medium storing a computer program executable by a terminal, which, when run on the terminal, causes the terminal to execute the steps of any of the above-described OFD file processing methods.
In the embodiment of the invention, the data file and the signature file in the OFD file are obtained according to the entry file of the OFD file, the contents in the data file and the signature file are determined according to the labels contained in the data file and the signature file, and the determined contents are converted into the HTML file of the hypertext markup language.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a schematic process diagram of an OFD file processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an OFD file conversion and browsing process according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an OFD file processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the 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 invention.
In order to avoid a problem that an OFD file cannot be read because OFD format file reading software is not installed or an installation environment does not satisfy a condition, embodiments of the present invention provide an OFD file processing method, apparatus, device, and medium.
Example 1:
fig. 1 is a schematic process diagram of an OFD file processing method according to an embodiment of the present invention, where the process includes the following steps:
s101: and acquiring a data file and a signature file in the OFD file according to the entry file of the OFD file.
The OFD file processing method provided by the embodiment of the invention is applied to electronic equipment, and the electronic equipment can be equipment with processing functions, such as a PC (personal computer), a mobile terminal, a server and the like.
In the embodiment of the present invention, in order to avoid that the file reading software of the OFD format is not installed or the installation environment does not satisfy the condition and the OFD file cannot be read, the OFD file may be converted into a file of another type, and in order to convert the OFD file into a file of another type, an entry file of the OFD file needs to be determined in advance.
After determining an entry file of the OFD file, a data file and a signature file in the OFD file are acquired from the entry file, wherein the entry file contains a plurality of tags, each tag is identified, and thereby the data file and the signature file can be determined.
The data file may include characters, pictures, videos, two-dimensional codes and the like, and each of the characters, the pictures, the videos and the two-dimensional codes has a corresponding format, a corresponding position and the like. The signature file may be a file such as an invoice, an electronic file, etc. that needs to be signed and sealed, and the file may include characters, pictures, signatures, etc. and each of the characters, pictures, signatures, and signatures has its corresponding format, location, etc.
S102: and determining the contents in the data file and the signature file according to each label contained in the data file and the signature file.
In the embodiment of the present invention, in order to convert the OFD file into another type of file, all contents included in the data file and the signature file need to be determined, and specifically, when determining the contents included in the data file and the signature file, since the data file and the signature file include tags, the contents included in the data file and the signature file can be determined by identifying the tags.
S103: converting the determined content into a hypertext markup language (HTML) file.
In the embodiment of the present invention, the OFD file may be converted into an HTML file, and therefore, after the contents included in the data file and the signature file are determined, the determined contents are converted into an HTML file.
In the embodiment of the invention, the OFD file can be converted into the HTML file, so that the problem that the OFD file cannot be read because file reading software of the OFD format is not installed or the installation environment does not meet the conditions can be effectively avoided, and the user experience is improved.
Example 2:
to determine the content in the data file and the signature file, on the basis of the above embodiments, in an embodiment of the present invention, the determining the content in the data file and the signature file according to each tag included in the data file and the signature file includes:
according to the data file and each tag contained in the signature file, determining a resource file in the data file, a note for displaying data content, an attachment, signature data in the signature file and coordinate information of a signature position;
the converting the determined content into a hypertext markup language (HTML) file comprises:
And converting the determined resource file, the annotation showing the data content, the attachment, the signature data and the coordinate information of the signature position into a hypertext markup language (HTML) file.
In the embodiment of the present invention, since the data file includes a plurality of contents, and the signature file includes a plurality of contents, the contents included in the data file can be determined according to each tag included in the data file, and the contents included in the signature file can be determined according to each tag included in the signature file, specifically, the data file includes a resource file, a comment for showing the data contents, and an attachment, and the signature file includes the signature data and coordinate information of a signature position.
The resource file is text, images and the like in the body of the OFD file, the annotation of the display data content includes templates, style sheets and text or characters of the templates, wherein the template refers to a uniform style that can be used by one or more pages in the recorded files, the style sheet is a display style used when the text or characters are displayed, such as length, width, offset and font of the text, and the text or characters of the template are fonts or characters existing in the template. The signature DATA includes a signature ciphertext, a signature issuer, a signature algorithm, and a signature value FILE (DATA FILE, DAT) of the signature, and the coordinate information of the signature position may be position information of a character to be signed or position information of the signature.
And after the resource file, the annotation of the displayed data content, the attachment and the coordinate information of the signature data and the signature position are determined, converting the resource file, the annotation of the displayed data content, the attachment and the coordinate information of the signature data and the signature position into a hypertext markup language (HTML) file.
Example 3:
in order to determine the coordinate information of the signature position, on the basis of the foregoing embodiments, in an embodiment of the present invention, the determining the coordinate information of the signature position includes:
determining the page number of the signature file according to each label contained in the signature file;
and if the page number is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
In the embodiment of the present invention, when the number of pages of the signature file is at least two pages, the script is called based on JS to determine the coordinate information of the signature position of the signature file, where determining the coordinate information of the signature position of the signature file based on JS is a prior art and is not described herein.
Example 4:
to implement the conversion of the OFD file into the HTML file, on the basis of the foregoing embodiments, in an embodiment of the present invention, the converting the determined resource file, the comment and the attachment for showing data content, and the signature data and the coordinate information of the signature position in the signature file into the HTML file includes:
if the resource file, the comment and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain characters or data or form lines, converting the attributes of the characters or the data or the form lines into Scalable Vector Graphics (SVG) attributes; determining an HTML file according to the SVG attribute;
if the resource file, the annotation and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain an image or a video or a two-dimensional code, converting the attribute of the image or the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
In the embodiment of the present invention, after the specific contents included in the data file and the signature file are determined, that is, after the resource file, the comment and the attachment for displaying the data content, and the signature data and the coordinate information of the signature position in the signature file are determined, the determined resource file, the comment and the attachment for displaying the data content, the signature data and the coordinate information of the signature position in the signature file are converted into the HTML file. Specifically, if the resource file, the comment showing the data content, the attachment, the signature data and the coordinate information of the signature position contain characters, data or form lines, the attributes of the characters, the data or the form lines are converted into scalable vector graphics format (SVG) attributes; if the resource file, the annotation showing the data content, the attachment, the signature data and the coordinate information of the signature position contain the image or the video or the two-dimensional code, converting the attribute of the image or the video or the two-dimensional code into a CANVAS (CANVAS) attribute.
The resource file may contain text or data and may also contain pictures or videos, so that attributes of the text or data in the resource file are converted into SVG attributes, and the pictures or videos in the resource file are converted into CANVAS attributes.
The annotation displaying the data content comprises a template, a style sheet and words or characters, wherein the template may have words or data or form lines, and may also comprise pictures or videos or two-dimensional codes, so that the attributes of the words or data or form lines in the template are converted into SVG attributes, and the pictures or videos in the template are converted into CANVAS attributes. The style sheet only contains text or data, so that the attribute of the text or the data in the style sheet is converted into the SVG attribute. The characters or characters in the annotation of the display data content may be ordinary characters or characters, and may also be artistic characters and the like, and the artistic characters are equivalent to pictures, so that the attributes of the ordinary characters or characters in the annotation of the display data content are converted into SVG attributes, and the attributes of the characters or characters of artistic character types are converted into CANVAS attributes.
In addition, for the template for displaying the annotation of the data content, since the absolute coordinate value of the page display position and the offset record are recorded in the annotation of the data content, in converting the attributes of these data into SVG attributes, since the used length unit of the data before the conversion is in millimeters, and the HTML tag is in pixels, therefore, before converting the attributes of the data in the template into the attributes of the SVG, conversion is required once, and for the text or characters showing the annotation of the data content, the annotation of the presentation data content records the absolute position coordinates of the text or characters on the current page, since the absolute position coordinates are used in units of millimeters in length, while HTML tags are in units of pixels, therefore, it is also necessary to perform conversion once before converting the attribute of the text or character showing the annotation of the data content into the SVG attribute. The conversion is prior art and will not be described herein. The display style used for displaying the recorded characters and characters in the style sheet, namely the length, width, font and the like of the characters and characters, is also applicable to the HTML file, and conversion is not needed.
The accessory may have text, data or form lines, and may also include pictures, videos or two-dimensional codes, so that attributes of the text, the data or the form lines in the accessory are converted into SVG attributes, and the pictures, the videos or the two-dimensional codes in the accessory are converted into CANVAS attributes.
The signature data and the coordinate information of the signature position comprise characters or data, and attributes of the characters or the data in the signature data and the coordinate information of the signature position are converted into SVG attributes.
After the signature file is determined, the signature ciphertext, the signature issuer, the signature algorithm, and the signed DAT file of the signature file may be determined according to each tag included in the signature file, where the signature file is the DAT file, and the content in the signature file may be acquired by analyzing the signature ciphertext according to the signature algorithm in order to acquire the content in the signature file. And after the signature file is converted into the HTML file, the data of the signature ciphertext, the signature issuer, the signature algorithm and the signed DAT file are presented in a table manner.
Example 5:
in order to convert the attribute of the coordinate information of the signature position into the attribute of SVG, on the basis of the above embodiments, in an embodiment of the present invention, the converting the attribute of the coordinate information of the signature position into the attribute of scalable vector graphics format SVG includes:
And converting the attribute of the coordinate of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute.
And if the signature file is one page, converting the attribute of the coordinate information of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute, if the signature file is at least two pages, determining the coordinate information of the signature position of the signature file based on a JS script, and after determining the coordinate information of the signature position of the signature file, converting the attribute of the coordinate of the signature position of the signature file into the CSS attribute in the SVG attribute.
Example 6:
in order to facilitate viewing of the converted HTML file, on the basis of the foregoing embodiments, in an embodiment of the present invention, the method further includes:
and displaying the HTML file on a display page of the browser.
In order to avoid that the file reading software of the OFD format is not installed or the installation environment does not meet the condition and cannot be read, in the embodiment of the present invention, after the contents in the data file and the signature file in the OFD file are converted into the HTML file, in order to facilitate browsing the contents of the OFD file, that is, in order to facilitate browsing the contents converted into the HTML file, the converted HTML file is input into the browser, and the browser may be any browser supporting reading of the HTML file, such as a google browser. And directly sending the HTML file to a browser, and displaying the HTML file on a display page of the browser, wherein the content in the HTML file is the content of the OFD file before conversion.
Fig. 2 is a schematic diagram of a process of converting and browsing an OFD file according to an embodiment of the present invention, and now, description is given to fig. 2.
After an OFD format document is acquired, that is, after an OFD file is acquired, a readable file group is formed through parsing, that is, a data file and a signature file are acquired through parsing, where the data file includes a resource file, a comment for displaying data content and an attachment, the comment for displaying data content includes a template, a style sheet and characters or characters of the template, and the signature file includes signature data and coordinate information of a signature position.
Converting character or data or table line attributes contained in coordinate information of resource files, notes and accessories of display data content, signature data and signature positions into scalable vector graphics format SVG attributes, determining SVG labels according to the SVG attributes, converting attributes of the resource files, the notes and accessories of the display data content, the signature data and the signature positions containing images, videos or two-dimensional codes into CANVAS attributes, determining CANVAS labels according to the CANVAS attributes, forming HTML files by the SVG labels and the CANVAS labels, inputting the HTML files into a browser to read, and accordingly achieving OFD file conversion and browsing the contents of the OFD files.
Example 7:
fig. 3 is a schematic structural diagram of an OFD file processing apparatus according to an embodiment of the present invention, where the apparatus includes:
an obtaining module 301, configured to obtain a data file and a signature file in an OFD file according to an entry file of the OFD file;
a determining module 302, configured to determine contents in the data file and the signature file according to each tag included in the data file and the signature file;
a conversion module 303, configured to convert the determined content into a hypertext markup language HTML file.
In a possible implementation manner, the determining module 302 is specifically configured to determine, according to each tag included in the data file and the signature file, a resource file, a note showing data content, and an attachment in the data file, and coordinate information of signature data and a signature position in the signature file;
the conversion module 303 is specifically configured to convert the determined resource file, the annotation showing the data content, the attachment, and the coordinate information of the signature data and the signature position into a hypertext markup language HTML file.
In a possible implementation manner, the determining module 302 is specifically configured to determine the number of pages of the signature file according to each tag included in the signature file; and if the number of pages is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
In a possible embodiment, the conversion module 303 is specifically configured to, if the resource file, the comment for displaying data content, and the attachment and the coordinate information of the signature data and the signature position contain text, data, or form lines, convert the attribute of the text, data, or form lines into scalable vector graphics format SVG attribute; determining an HTML file according to the SVG attribute; if the resource file, the annotation for displaying the data content, the attachment, the signature data and the coordinate information of the signature position contain an image, a video or a two-dimensional code, converting the attribute of the image, the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
In a possible implementation, the converting module 303 is specifically configured to convert the attribute of the coordinate of the signature position into a cascading style sheet CSS attribute in the SVG attribute.
In a possible embodiment, the apparatus further comprises:
and the display module 304 is used for displaying the HTML file on a display page of the browser.
Example 8:
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 4, including: the system comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete mutual communication through the communication bus 404;
The memory 403 has stored therein a computer program which, when executed by the processor 401, causes the processor 401 to perform the steps of:
acquiring a data file and a signature file in the OFD file according to an entry file of the OFD file;
determining the content in the data file and the signature file according to each label contained in the data file and the signature file;
converting the determined content into a hypertext markup language (HTML) file.
Further, the processor 401 is further configured to determine, according to each tag included in the data file and the signature file, a resource file in the data file, an annotation showing data content, and an attachment in the data file, and the signature data and coordinate information of a signature position in the signature file; and converting the determined resource file, the annotation showing the data content, the attachment, the signature data and the coordinate information of the signature position into a hypertext markup language (HTML) file.
Further, the processor 401 is further configured to determine the number of pages of the signature file according to each tag included in the signature file; and if the page number is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
Further, the processor 401 is further configured to, if the resource file, the comment for displaying data content, the attachment, the signature data, and the coordinate information of the signature position include a text, data, or a form line, convert an attribute of the text, data, or form line into an SVG attribute in a scalable vector graphics format; determining an HTML file according to the SVG attribute; if the resource file, the annotation and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain an image or a video or a two-dimensional code, converting the attribute of the image or the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
Further, the processor 401 is further configured to convert an attribute of the coordinate of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute.
Further, the processor 401 is further configured to display the HTML file on a display page of the browser.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface 402 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
Example 9:
on the basis of the foregoing embodiments, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:
the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
Acquiring a data file and a signature file in the OFD file according to an entry file of the OFD file;
determining the content in the data file and the signature file according to each label contained in the data file and the signature file;
converting the determined content into a hypertext markup language (HTML) file.
Further, the determining the content in the data file and the signature file according to each tag included in the data file and the signature file includes:
according to the data file and each tag contained in the signature file, determining a resource file in the data file, a note for displaying data content, an attachment, signature data in the signature file and coordinate information of a signature position;
the converting the determined content into a hypertext markup language (HTML) file comprises:
and converting the determined resource file, the annotation showing the data content, the attachment, the signature data and the coordinate information of the signature position into a hypertext markup language (HTML) file.
Further, the determining the coordinate information of the signature position includes:
determining the number of pages of the signature file according to each label contained in the signature file;
And if the page number is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
Further, the converting the determined resource file, the comment and the attachment for showing data content, and the signature data and the coordinate information of the signature position in the signature file into a hypertext markup language HTML file includes:
if the resource file, the annotation for displaying the data content, the attachment, the signature data and the coordinate information of the signature position contain characters, data or form lines, converting the attributes of the characters, the data or the form lines into Scalable Vector Graphics (SVG) attributes; determining an HTML file according to the SVG attribute;
if the resource file, the annotation for displaying the data content, the attachment, the signature data and the coordinate information of the signature position contain an image, a video or a two-dimensional code, converting the attribute of the image, the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
Further, said converting the attribute of the coordinate information of the signature position into a scalable vector graphics format SVG attribute comprises:
and converting the attribute of the coordinate of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute.
Further, the method further comprises:
and displaying the HTML file on a display page of the browser.
In the embodiment of the invention, the data file and the signature file in the OFD file are obtained according to the entry file of the OFD file, the contents in the data file and the signature file are determined according to the labels contained in the data file and the signature file, and the determined contents are converted into the HTML file of the hypertext markup language.
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 present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to 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.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An OFD file processing method for an open layout document, the method comprising:
acquiring a data file and a signature file in the OFD file according to an entry file of the OFD file;
determining the content in the data file and the signature file according to each label contained in the data file and the signature file;
converting the determined content into a hypertext markup language (HTML) file.
2. The method of claim 1, wherein determining the content of the data file and the signature file according to the respective tags contained in the data file and the signature file comprises:
according to each tag contained in the data file and the signature file, determining a resource file in the data file, a note for displaying data content, an attachment, signature data in the signature file and coordinate information of a signature position;
the converting the determined content into a hypertext markup language (HTML) file comprises:
and converting the determined resource file, the annotation showing the data content, the attachment, the signature data and the coordinate information of the signature position into a hypertext markup language (HTML) file.
3. The method of claim 2, wherein determining the coordinate information of the signature location comprises:
determining the page number of the signature file according to each label contained in the signature file;
and if the page number is at least two pages, determining the coordinate information of the signature position of the signature file based on the JS script.
4. The method according to claim 2, wherein the converting the determined resource file, the comment and the attachment for the presentation data content, and the signature data and the coordinate information of the signature position in the signature file into a hypertext markup language (HTML) file comprises:
If the resource file, the comment and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain characters or data or form lines, converting the attributes of the characters or the data or the form lines into Scalable Vector Graphics (SVG) attributes; determining an HTML file according to the SVG attribute;
if the resource file, the annotation and the attachment for displaying the data content, the signature data and the coordinate information of the signature position contain an image or a video or a two-dimensional code, converting the attribute of the image or the video or the two-dimensional code into a CANVAS CANVAS attribute; and determining an HTML file according to the CANVAS attribute.
5. The method of claim 4, wherein converting the attributes of the coordinate information of the signature location into scalable vector graphics format (SVG) attributes comprises:
and converting the attribute of the coordinate of the signature position into a Cascading Style Sheet (CSS) attribute in the SVG attribute.
6. The method of claim 1, further comprising:
and displaying the HTML file on a display page of the browser.
7. An OFD file processing apparatus, characterized in that the apparatus comprises:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a data file and a signature file in an OFD file according to an entry file of the OFD file;
the determining module is used for determining the contents in the data file and the signature file according to each label contained in the data file and the signature file;
and the conversion module is used for converting the determined content into a hypertext markup language (HTML) file.
8. The apparatus according to claim 7, wherein the determining module is specifically configured to determine, according to each tag included in the data file and the signature file, a resource file in the data file, a comment showing data content, and an attachment, and coordinate information of signature data and a signature position in the signature file;
the conversion module is specifically configured to convert the determined resource file, the annotation showing data content, the attachment, the signature data, and the coordinate information of the signature position into a hypertext markup language HTML file.
9. An electronic device, characterized in that the electronic device comprises a processor and a memory, the memory being adapted to store program instructions, the processor being adapted to carry out the steps of the OFD file processing method according to any of the preceding claims 1-6 when executing a computer program stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the steps of the OFD file processing method according to any one of claims 1 to 6.
CN202011560280.3A 2020-12-25 2020-12-25 OFD file processing method, device, equipment and medium Pending CN114676097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011560280.3A CN114676097A (en) 2020-12-25 2020-12-25 OFD file processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011560280.3A CN114676097A (en) 2020-12-25 2020-12-25 OFD file processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN114676097A true CN114676097A (en) 2022-06-28

Family

ID=82070983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011560280.3A Pending CN114676097A (en) 2020-12-25 2020-12-25 OFD file processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN114676097A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114970487A (en) * 2022-07-27 2022-08-30 中建电子商务有限责任公司 Method for generating OFD electronic contract based on rich text

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114970487A (en) * 2022-07-27 2022-08-30 中建电子商务有限责任公司 Method for generating OFD electronic contract based on rich text
CN114970487B (en) * 2022-07-27 2023-01-06 中建电子商务有限责任公司 Method for generating OFD electronic contract based on rich text

Similar Documents

Publication Publication Date Title
CN106294658B (en) Webpage quick display method and device
US20150046797A1 (en) Document format processing apparatus and document format processing method
CN107301046B (en) Icon processing method and device, computer equipment and storage medium
CN113515928B (en) Electronic text generation method, device, equipment and medium
CN111752557A (en) Display method and device
CN107967344B (en) Method, system, equipment and storage medium for realizing webpage animation effect
US20150178258A1 (en) System and Method for Processing Markup Language Templates from Partial Input Data
CN110780868A (en) Website development method, device, equipment and storage medium based on componentized template
CN111368562A (en) Method and device for translating characters in picture, electronic equipment and storage medium
CN111651966A (en) Data report file generation method and device and electronic equipment
CN110309457B (en) Webpage data processing method, device, computer equipment and storage medium
CN116954450A (en) Screenshot method and device for front-end webpage, storage medium and terminal
CN114791988A (en) Browser-based PDF file analysis method, system and storage medium
CN110970011A (en) Picture processing method, device and equipment and computer readable storage medium
CN111223155A (en) Image data processing method, image data processing device, computer equipment and storage medium
CN114676097A (en) OFD file processing method, device, equipment and medium
CN110633251B (en) File conversion method and equipment
CN112906351A (en) PDF document generation method and device
CN116774973A (en) Data rendering method, device, computer equipment and storage medium
CN113297425B (en) Document conversion method, device, server and storage medium
CN114254229A (en) Webpage rendering method and device
CN111563157B (en) Thumbnail display method and device
CN108376161B (en) Method, device, terminal and storage medium for displaying webpage
CN113987242A (en) File picture visualization method, device, equipment and medium
CN113867718A (en) Picture generation method and device, computer equipment and readable storage medium

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