CN115796133A - OFD document annotation object drawing method, system and storage medium - Google Patents

OFD document annotation object drawing method, system and storage medium Download PDF

Info

Publication number
CN115796133A
CN115796133A CN202211496181.2A CN202211496181A CN115796133A CN 115796133 A CN115796133 A CN 115796133A CN 202211496181 A CN202211496181 A CN 202211496181A CN 115796133 A CN115796133 A CN 115796133A
Authority
CN
China
Prior art keywords
annotation object
annotation
ofd
node level
sequence
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
CN202211496181.2A
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.)
Fuxin Kunpeng Beijing Information Technology Co ltd
Original Assignee
Fuxin Kunpeng Beijing Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuxin Kunpeng Beijing Information Technology Co ltd filed Critical Fuxin Kunpeng Beijing Information Technology Co ltd
Priority to CN202211496181.2A priority Critical patent/CN115796133A/en
Publication of CN115796133A publication Critical patent/CN115796133A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a method, a system and a storage medium for drawing an annotation object of an OFD document, wherein the method comprises the following steps: constructing a ZOrder attribute value of each annotation object in each OFD page of the target OFD document; acquiring a weight set of each annotation object in each OFD page of the target OFD document; drawing all annotation objects of any OFD page based on a preset annotation object drawing sequence, and a ZOrder attribute value and a weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated. The invention can better process the hierarchy problem when the annotation object in the OFD document is displayed by setting the drawing sequence of the object in the OFD document.

Description

OFD document annotation object drawing method, system and storage medium
Technical Field
The invention relates to the technical field of IT digitization, in particular to a method, a system and a storage medium for drawing an annotation object of an OFD document.
Background
In the OFD specification, namely 'electronic file storage and interchange format document, GB/T33190-2016', the rendering sequence of page layers related to texts is specified, and the range of the rendering sequence relates to 6 layers such as a foreground layer and a text layer. When primitives located in different layers overlap, an upper layer object may cover the overlapping portion of a lower layer object. But the annotation object does not belong to any layer of the above text-related and the OFD specification does not specify the overlapping relationship of the annotation page and the text page. Furthermore, annotation objects located in the same annotation page also have no provision for overlap. Therefore, a general OFD reader renders text first and then annotations, and when there is overlap between annotation objects, renders according to the sequence of the annotation objects appearing in the OFD file.
However, in some cases, such a process has some disadvantages. For example, the purpose of watermarking annotations on OFD documents by users is mainly to represent rights, and it is not desirable to obscure the text. When the watermark is opaque or of low transparency, large blocks or dense annotations may obscure the text and prevent reading. Especially when image objects are used in the annotation, large opaque images can obscure large areas underneath them, which is often not the user's intention. Furthermore, if there are multiple annotation objects containing images, an opaque large image may make a small image invisible if the large image is overlaid on the small image.
Therefore, it is desirable to provide a technical solution to solve the above technical problems.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method, a system and a storage medium for drawing an annotation object of an OFD document.
The technical scheme of the annotation object drawing method of the OFD document is as follows:
constructing a zonder attribute value of each annotation object in each OFD page of the target OFD document;
acquiring a weight set of each annotation object in each OFD page of the target OFD document; wherein, the weight set of any annotation object comprises: the node level of any annotation object, the maximum drawing area of an image in any annotation object, and the appearance sequence of any annotation object at the corresponding node level;
drawing all the annotation objects of any OFD page based on a preset annotation object drawing sequence and a ZOrder attribute value and a weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated.
The annotation object drawing method of the OFD document has the following beneficial effects:
the method of the invention can better process the hierarchy problem when the annotation object in the OFD document is displayed by setting the drawing sequence of the object in the OFD document.
On the basis of the above scheme, the annotation object rendering method for the OFD document of the present invention may be further improved as follows.
Further, the ZOrder attribute value of any annotation object is: a background attribute or a foreground attribute; the preset annotation object drawing sequence is as follows: and sequentially drawing an annotation object with each ZOrder attribute value as a background attribute, a text object and an annotation object with each ZOrder attribute value as a foreground attribute in any OFD page.
Further, the process of drawing the annotation object with each ZOrder attribute value as the background attribute comprises the following steps:
determining an annotation object with each ZOrder attribute value as a background attribute as a first annotation object;
acquiring a first annotation object with each node level as a first node level, and performing descending order arrangement on the first annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a first sequence;
when the first annotation object with any node level as the first node level is a composite annotation object, sequentially arranging each first annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of first subsequences, and sequentially replacing the corresponding first annotation object in the previous node level with each first subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the first sequence according to the target subsequence corresponding to each composite annotation object in the first sequence to obtain a first target sequence, and drawing each first annotation object in the first target sequence in sequence.
Further, the process of drawing the annotation object with each ZOrder attribute value as the foreground attribute comprises the following steps:
determining the annotation object with each ZOrder attribute value as the foreground attribute as a second annotation object;
acquiring a second annotation object with each node level as a first node level, and performing descending order arrangement on the second annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a second sequence;
when any one of the second annotation objects with the node level being the first node level is a composite annotation object, sequentially arranging each second annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of second subsequences, and sequentially adopting each second subsequence to replace the corresponding second annotation object in the previous node level based on the ascending order of the node levels until a target subsequence corresponding to the composite annotation object is obtained;
and updating the second sequence according to the target subsequence corresponding to each composite annotation object in the second sequence to obtain a second target sequence, and drawing each second annotation object in the second target sequence in sequence.
Further, still include: and when the maximum drawing area and the node level of the images in any two annotation objects are the same, arranging the annotation objects according to the sequence of the annotation objects appearing at the node level.
The technical scheme of the annotation object drawing system of the OFD document is as follows:
the method comprises the following steps: the system comprises a construction module, a processing module and an operation module;
the building module is used for: constructing a ZOrder attribute value of each annotation object in each OFD page of the target OFD document;
the processing module is used for: acquiring a weight set of each annotation object in each OFD page of the target OFD document; wherein, the weight set of any annotation object comprises: the node level of any annotation object, the maximum drawing area of an image in any annotation object, and the appearance sequence of any annotation object at the corresponding node level;
the operation module is used for: drawing all the annotation objects of any OFD page based on a preset annotation object drawing sequence and a ZOrder attribute value and a weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated.
The annotation object drawing system of the OFD document has the following beneficial effects:
the system of the invention can better deal with the hierarchy problem when the annotation object in the OFD document is displayed by setting the drawing sequence of the object in the OFD document.
On the basis of the above scheme, the annotation object rendering system for the OFD document of the present invention may be further improved as follows.
Further, the ZOrder attribute value of any annotation object is: a background attribute or a foreground attribute; the preset annotation object drawing sequence is as follows: and sequentially drawing an annotation object with each ZOrder attribute value as a background attribute, a text object and an annotation object with each ZOrder attribute value as a foreground attribute in any OFD page.
Further, the process of drawing the annotation object with each ZOrder attribute value as the background attribute comprises the following steps:
determining an annotation object with each ZOrder attribute value as a background attribute as a first annotation object;
acquiring a first annotation object with each node level as a first node level, and performing descending order arrangement on the first annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a first sequence;
when the first annotation object with any node level being a first node level is a composite annotation object, sequentially arranging each first annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of first subsequences, and sequentially adopting each first subsequence to replace the corresponding first annotation object in the previous node level based on the ascending order of the node levels until a target subsequence corresponding to the composite annotation object is obtained;
and updating the first sequence according to the target subsequence corresponding to each composite annotation object in the first sequence to obtain a first target sequence, and drawing each first annotation object in the first target sequence in sequence.
Further, the process of drawing the annotation object with each ZOrder attribute value as the foreground attribute comprises the following steps:
determining the annotation object with each ZOrder attribute value as the foreground attribute as a second annotation object;
acquiring a second annotation object with each node level as a first node level, and performing descending order arrangement on the second annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a second sequence;
when any second annotation object with the node level as the first node level is a composite annotation object, sequentially arranging each second annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of second subsequences, and sequentially replacing the corresponding second annotation object in the previous node level with each second subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the second sequence according to the target subsequence corresponding to each composite annotation object in the second sequence to obtain a second target sequence, and drawing each second annotation object in the second target sequence in sequence.
The technical scheme of the storage medium of the invention is as follows:
the storage medium has stored therein instructions that, when read by a computer, cause the computer to execute the steps of an annotation object rendering method for an OFD document according to the present invention.
Drawings
Fig. 1 is a schematic flowchart of an annotation object rendering method for an OFD document according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an xml file of an OFD page in an annotation object drawing method for an OFD document according to an embodiment of the present invention;
fig. 3 is a tree diagram corresponding to an xml file of an OFD page in an annotation object drawing method for an OFD document according to an embodiment of the present invention;
fig. 4 is an original drawing effect diagram of an OFD page in an annotation object drawing method for an OFD document according to an embodiment of the present invention;
fig. 5 is a tree diagram containing a weight group corresponding to each annotation object in an OFD page in the annotation object drawing method for an OFD document according to the embodiment of the present invention;
fig. 6 is a diagram illustrating a target rendering effect of an OFD page in an annotation object rendering method for an OFD document according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an annotation object rendering system for an OFD document according to an embodiment of the present invention.
Detailed Description
As shown in fig. 1, a method for drawing an annotation object of an OFD document according to an embodiment of the present invention includes the following steps:
s1, constructing a ZOrder attribute value of each annotation object in each OFD page of the target OFD document.
Wherein, (1) the target OFD document is: an OFD document containing at least one OFD page. (2) The OFD pages are: an OFD page containing at least one annotation object. (3) Types of annotation objects include: link, path, highlight, stamp, watermark. An annotation object may contain one or more primitive objects (text, image, graphics, etc. objects are collectively referred to as primitive objects) whose display is accomplished by rendering the primitive objects it contains. The annotation object is described in xml on the annotation page, and the annotation object in xml and the primitive object contained in xml form a tree structure. (4) The ZOrder attribute value is a custom attribute value, specifically, one of Parameter attributes of the annotation object, and represents the order of the annotation object in the Z-axis direction. The types of attribute values include: background attribute (Background) and Foreground attribute (forego).
It should be noted that (1) the concrete definition of the ZOrder attribute value is:
Figure BDA0003962022560000071
wherein, the Background attribute (Background) indicates that the annotation is drawn on the lower layer of the text, and the Foreground attribute (Foreground) indicates that the annotation is drawn on the upper layer of the text. Annotation objects without a ZOrder attribute value, treated by default as a Foreground attribute (Foreground), may be user specified via an interface. (2) The annotation objects in this embodiment are all opaque annotation objects. (3) The ZOrder attribute value of each annotation object can be set according to user requirements. (4) The annotation object is composed of primitive object(s) directly or indirectly contained below the annotation object, forming a tree structure, the topmost node is the annotation object, and each node below the annotation object is a primitive object. For simplicity, each node in subsequent pairs of trees is collectively referred to as an annotation object without confusion.
S2, acquiring a weight set of each annotation object in each OFD page of the target OFD document.
Wherein, (1) the weight group of any annotation object comprises: the node level of any annotation object, the maximum drawing area of the image in any annotation object, and the appearance sequence of any annotation object at the corresponding node level. (2) The node level is: the OFD describes the objects on the page with xml, which is a tree structure, the node level, i.e. the level of the annotated object in the tree. (3) The maximum rendering area of the image is: annotating rendering area values of image primitives in the object. (4) The order in which the node levels appear is: the annotation object and the primitive object contained in the page are described by xml and are in a tree structure, the annotation and the primitive object contained in the annotation form a tree, and if the primitive is a composite object, the primitive object can also have a sub-primitive of the primitive object. In the tree structure, there may be multiple direct child nodes under a parent node, and the order values of the child nodes appearing in xml are the order of appearance at the node level.
In addition, (1) when an image is rendered in an area of 30mm × 30mm, for example, with respect to the maximum rendering area of the image, the rendering area of the image primitive object is 900. If the annotation contains only this one image primitive, then the maximum rendering area of the image of the annotation object is the rendering area of that image primitive. If an annotated object contains multiple image primitives (primitives contained directly, or sub-primitives contained in a composite primitive object), then the annotated image drawing area is the maximum of these image drawing areas. For primitives of non-image type, the drawing area is 0. If all the primitives contained in a certain annotation are non-image primitives, the drawing area of the annotation object is 0.
And S3, drawing all the annotation objects of any OFD page based on a preset annotation object drawing sequence and the ZOrder attribute value and the weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated.
Wherein, (1) the preset annotation object drawing sequence is as follows: and sequentially drawing an annotation object with each ZOrder attribute value as a background attribute, a text object and an annotation object with each ZOrder attribute value as a foreground attribute in any OFD page. (2) The rendered OFD page is: and drawing the obtained OFD page according to a preset annotation object drawing sequence.
Preferably, the process of drawing the annotation object with each ZOrder attribute value as the background attribute comprises the following steps:
an annotation object in which each ZOrder attribute value is a background attribute is determined as a first annotation object.
Wherein the first annotation object is: the ZOrder attribute value is an annotation object for the background attribute.
And acquiring a first annotation object of which each node level is a first node level, and performing descending order arrangement on the first annotation objects of which each node level is the first node level based on the size of the maximum drawing area of the image to obtain a first sequence.
Wherein (1) the node level comprises: a first node level, a second node level, a third node level, and the like, and the number of specific node level layers is determined according to the actual situation, which is not limited herein. (2) The first sequence is: and sequencing the first annotation objects of each node level as the first node level in a descending order based on the maximum drawing area of the image of the first annotation object of each node level as the first node level.
Specifically, for example, there are three first annotation objects at the first node level, the weight value set of the first annotation object is [1, 500,1], the area of the second first annotation object is [1, 600,2], the area of the third first annotation object is [1, 100,3], and the order of the first sequence is: [1, 600,2] → [1, 500,1] → [1, 100,3].
When the first annotation object with any node level as the first node level is a composite annotation object, sequentially arranging each first annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of first subsequences, and sequentially replacing the corresponding first annotation object in the previous node level with each first subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained.
Wherein, (1) the compound annotation object is: the first annotation object at the first node level comprises at least one first annotation object at a child node level. (2) The first subsequence is: the sequence of the first annotation object at any child node level is drawn in the same order as the first annotation object at the first node level. (3) The target subsequence is: containing at least the sequence of the first annotation object at the lowest node level of the composite annotation object.
It should be noted that, in the above example, it is assumed that the first annotation object includes: two second node-level first annotation objects: [2, 300,1] and [2, 500,2], then the first subsequence is [2, 500,2] → [2, 300,1]. In this case, if [2, 500,2] also includes: first annotation objects at two third node levels: [3, 500,1], [3, 400,2], then the target subsequence is: [3, 500,1] → [ [3, 400,2] → [ [2, 300,1].
And updating the first sequence according to the target subsequence corresponding to each composite annotation object in the first sequence to obtain a first target sequence, and drawing each first annotation object in the first target sequence in sequence.
Wherein the first target sequence is: including the target subsequence of each composite annotation object and the sequence of the other first annotation objects. For example, in the above example, the first target sequence is: [1, 600,2] → [3, 500,1] → [ [3, 400,2] → [ [2, 300,1] → [1, 100,3].
Preferably, the process of drawing the annotation object with each ZOrder attribute value as the foreground attribute comprises the following steps:
and determining the annotation object with each ZOrder attribute value as the foreground attribute as a second annotation object.
Wherein the second annotation object is: the ZOrder attribute value is an annotation object for the foreground attribute.
And acquiring a second annotation object with each node level as the first node level, and performing descending order arrangement on the second annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a second sequence.
Wherein, (1) the second sequence is: and sequencing the second annotation objects of each node level as the first node level in a descending order based on the size of the maximum drawing area of the image of the second annotation object of each node level as the first node level.
When any second annotation object with the node level as the first node level is a composite annotation object, sequentially arranging each second annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of second subsequences, and sequentially replacing the corresponding second annotation object in the previous node level with each second subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained.
Wherein, (1) the second subsequence is: a sequence of second annotation objects at an arbitrary child node level. (2) The target subsequence is: a sequence of at least a second annotation object at the lowest node level of the composite annotation object.
And updating the second sequence according to the target subsequence corresponding to each composite annotation object in the second sequence to obtain a second target sequence, and drawing each second annotation object in the second target sequence in sequence.
Wherein the second target sequence is: including the target subsequence of each composite annotation object and other second annotation objects.
It should be noted that the process of drawing the annotation object with each zonder attribute value as the foreground attribute is substantially the same as the process of drawing the annotation object with each zonder attribute value as the background attribute, and details thereof are omitted here.
Preferably, the method further comprises the following steps: when the maximum drawing area and the node level of the images in any two annotation objects are the same, arranging the annotation objects according to the appearance sequence of the annotation objects at the node level.
Specifically, when the maximum rendering area and the node level of the images in any two annotation objects are the same, and the ZOrder attribute values of the two annotation objects are both foreground attributes or background attributes, the two annotation objects are arranged according to the appearance sequence of the any two annotation objects at the node level.
For example, when any two annotation objects are the first annotation object corresponding to the background attribute, the weight groups of the two annotation objects are: [1, 500,1] and [1, 500,2]; at this time, the maximum drawing area and the node level of the two first annotation objects are the same, and the two annotation objects are arranged in the order of appearance at the node level, i.e., [1, 500,1] → [1, 500,2].
The technical scheme of the embodiment can better deal with the hierarchy problem when the annotation object in the OFD document is displayed by setting the drawing sequence of the object in the OFD document.
To better explain the technical solution in the above embodiment, an example of an OFD page is adopted for explanation. Specifically, the method comprises the following steps:
fig. 2 shows an xml file of a certain OFD page, and the tree structure shown in fig. 3 is constructed by the xml file. The OFD interface according to the tree structure of fig. 3 and drawn by the prior art is shown in fig. 4, and the drawing order is: text objects, 51, 52 (9466, 9459), 53 (9515, 9520), 54, 55. It can be seen that since the last annotation object (ID 55) contains one and large-area image primitive object, the underlying text and most other annotations are occluded by it.
At this time, by adopting the steps of the above-described embodiment, the ZOrder attribute value is set for the Parameter attribute of each annotation object (51, 52, 53, 54, 55, 9466, 9459, 9515, 9520), respectively. Assume that the ZOrder attribute values of 52 and 55 are set to the Background attribute (Background). Other objects are not set and default is Foreground property (forego). The steps of the above embodiments are respectively adopted to obtain the weight set of each annotation object, and the specific result is shown in fig. 5. Since 52 and 55 are background attributes, the final rendering order is: 55 → 9459 → 9466 → text object → 51 → 9515 → 9520 → 54. The effect diagram of the OFD page shown in fig. 6 is obtained by performing the rendering in the above order.
As shown in fig. 7, an annotation object rendering system 200 for an OFD document according to an embodiment of the present invention includes: a building module 210, a processing module 220, and an execution module 230;
the building module 210 is configured to: constructing a ZOrder attribute value of each annotation object in each OFD page of the target OFD document;
the processing module 220 is configured to: acquiring a weight set of each annotation object in each OFD page of the target OFD document; wherein, the weight set of any annotation object comprises: the node level of any annotation object, the maximum drawing area of an image in any annotation object, and the appearance sequence of any annotation object at the corresponding node level;
the execution module 230 is configured to: drawing all the annotation objects of any OFD page based on a preset annotation object drawing sequence and a ZOrder attribute value and a weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated.
Preferably, the ZOrder attribute value for any annotation object is: a background attribute or a foreground attribute; the preset annotation object drawing sequence is as follows: and sequentially drawing an annotation object with each ZOrder attribute value as a background attribute, a text object and an annotation object with each ZOrder attribute value as a foreground attribute in any OFD page.
Preferably, the process of drawing the annotation object with each ZOrder attribute value as the background attribute comprises the following steps:
determining an annotation object with each ZOrder attribute value as a background attribute as a first annotation object;
acquiring a first annotation object with each node level as a first node level, and performing descending order arrangement on the first annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a first sequence;
when the first annotation object with any node level as the first node level is a composite annotation object, sequentially arranging each first annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of first subsequences, and sequentially replacing the corresponding first annotation object in the previous node level with each first subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the first sequence according to the target subsequence corresponding to each composite annotation object in the first sequence to obtain a first target sequence, and drawing each first annotation object in the first target sequence in sequence.
Preferably, the process of rendering the annotation object with each ZOrder attribute value as a foreground attribute comprises:
determining the annotation object with each ZOrder attribute value as the foreground attribute as a second annotation object;
acquiring a second annotation object with each node level as a first node level, and performing descending order arrangement on the second annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a second sequence;
when any second annotation object with the node level as the first node level is a composite annotation object, sequentially arranging each second annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of second subsequences, and sequentially replacing the corresponding second annotation object in the previous node level with each second subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the second sequence according to the target subsequence corresponding to each composite annotation object in the second sequence to obtain a second target sequence, and drawing each second annotation object in the second target sequence in sequence.
The technical scheme of the embodiment can better deal with the hierarchy problem when the annotation object in the OFD document is displayed by setting the drawing sequence of the object in the OFD document.
The above-mentioned parameters and steps of the annotation object drawing system 200 for an OFD document according to the present embodiment for implementing corresponding functions of each module may refer to the above-mentioned parameters and steps in the embodiment of the annotation object drawing method for an OFD document, and are not described herein again.
An embodiment of the present invention provides a storage medium, including: the storage medium stores instructions, and when the instructions are read by a computer, the computer is caused to execute the steps of the annotation object drawing method for the OFD document, for example, reference may be specifically made to the above parameters and steps in an embodiment of the annotation object drawing method for the OFD document, which are not described herein again.
Computer storage media such as: flash disks, portable hard disks, and the like.
As will be appreciated by one skilled in the art, the present invention may be embodied as methods, systems, and storage media.
Thus, the present invention may be embodied in the form of: may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software, and may be referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied in the medium. Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. An annotation object drawing method for an OFD document, comprising:
constructing a ZOrder attribute value of each annotation object in each OFD page of the target OFD document;
acquiring a weight set of each annotation object in each OFD page of the target OFD document; wherein, the weight set of any annotation object comprises: the node level of any annotation object, the maximum drawing area of an image in any annotation object, and the appearance sequence of any annotation object at the corresponding node level;
drawing all annotation objects of any OFD page based on a preset annotation object drawing sequence, and a ZOrder attribute value and a weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated.
2. The OFD document annotation object rendering method according to claim 1, wherein the ZOrder attribute value of any annotation object is: a background attribute or a foreground attribute; the preset annotation object drawing sequence is as follows: and sequentially drawing an annotation object with each ZOrder attribute value as a background attribute, a text object and an annotation object with each ZOrder attribute value as a foreground attribute in any OFD page.
3. The OFD document annotation object rendering method according to claim 2, wherein said process of rendering an annotation object for which each ZOrder attribute value is a background attribute comprises:
determining an annotation object with each ZOrder attribute value as a background attribute as a first annotation object;
acquiring a first annotation object with each node level as a first node level, and performing descending order arrangement on the first annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a first sequence;
when the first annotation object with any node level as the first node level is a composite annotation object, sequentially arranging each first annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of first subsequences, and sequentially replacing the corresponding first annotation object in the previous node level with each first subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the first sequence according to the target subsequence corresponding to each composite annotation object in the first sequence to obtain a first target sequence, and drawing each first annotation object in the first target sequence in sequence.
4. The OFD document annotation object rendering method according to claim 2, wherein said process of rendering an annotation object whose each ZOrder attribute value is a foreground attribute comprises:
determining the annotation object with each ZOrder attribute value as the foreground attribute as a second annotation object;
acquiring a second annotation object with each node level as a first node level, and performing descending order arrangement on the second annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a second sequence;
when any one of the second annotation objects with the node level being the first node level is a composite annotation object, sequentially arranging each second annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of second subsequences, and sequentially adopting each second subsequence to replace the corresponding second annotation object in the previous node level based on the ascending order of the node levels until a target subsequence corresponding to the composite annotation object is obtained;
and updating the second sequence according to the target subsequence corresponding to each composite annotation object in the second sequence to obtain a second target sequence, and drawing each second annotation object in the second target sequence in sequence.
5. The OFD document annotation object rendering method according to claim 3 or 4, further comprising: when the maximum drawing area and the node level of the images in any two annotation objects are the same, arranging the annotation objects according to the appearance sequence of the annotation objects at the node level.
6. An annotation object rendering system for an OFD document, comprising: the system comprises a construction module, a processing module and an operation module;
the building module is used for: constructing a ZOrder attribute value of each annotation object in each OFD page of the target OFD document;
the processing module is used for: acquiring a weight set of each annotation object in each OFD page of the target OFD document; wherein, the weight set of any annotation object comprises: the node level of any annotation object, the maximum drawing area of an image in any annotation object, and the appearance sequence of any annotation object at the corresponding node level;
the operation module is used for: drawing all the annotation objects of any OFD page based on a preset annotation object drawing sequence and a ZOrder attribute value and a weight value group of each annotation object in any OFD page of the target OFD document, and generating a drawn OFD page corresponding to any OFD page until the drawn OFD page corresponding to each OFD page in the target OFD document is generated.
7. The OFD document annotation object rendering system according to claim 6, wherein the ZOrder attribute value of any annotation object is: a background attribute or a foreground attribute; the preset annotation object drawing sequence is as follows: and sequentially drawing an annotation object with each ZOrder attribute value as a background attribute, a text object and an annotation object with each ZOrder attribute value as a foreground attribute in any OFD page.
8. The OFD document annotation object rendering system according to claim 7, wherein said process of rendering an annotation object in which each ZOrder attribute value is a background attribute comprises:
determining an annotation object with each ZOrder attribute value as a background attribute as a first annotation object;
acquiring a first annotation object with each node level as a first node level, and performing descending order arrangement on the first annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a first sequence;
when the first annotation object with any node level as the first node level is a composite annotation object, sequentially arranging each first annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of first subsequences, and sequentially replacing the corresponding first annotation object in the previous node level with each first subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the first sequence according to the target subsequence corresponding to each composite annotation object in the first sequence to obtain a first target sequence, and drawing each first annotation object in the first target sequence in sequence.
9. The OFD document annotation object rendering system of claim 7, wherein said process of rendering annotation objects for which each ZOrder attribute value is a foreground attribute comprises:
determining the annotation object with each ZOrder attribute value as the foreground attribute as a second annotation object;
acquiring a second annotation object with each node level as a first node level, and performing descending order arrangement on the second annotation objects with each node level as the first node level based on the size of the maximum drawing area of the image to obtain a second sequence;
when any second annotation object with the node level as the first node level is a composite annotation object, sequentially arranging each second annotation object in each node level corresponding to the composite annotation object according to the size of the maximum drawing area of the image to obtain a plurality of second subsequences, and sequentially replacing the corresponding second annotation object in the previous node level with each second subsequence based on the ascending order of the node level until a target subsequence corresponding to the composite annotation object is obtained;
and updating the second sequence according to the target subsequence corresponding to each composite annotation object in the second sequence to obtain a second target sequence, and drawing each second annotation object in the second target sequence in sequence.
10. A storage medium characterized in that an instruction is stored therein, which when read by a computer, causes the computer to execute the annotation object drawing method for an OFD document according to any one of claims 1 to 5.
CN202211496181.2A 2022-11-24 2022-11-24 OFD document annotation object drawing method, system and storage medium Pending CN115796133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211496181.2A CN115796133A (en) 2022-11-24 2022-11-24 OFD document annotation object drawing method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211496181.2A CN115796133A (en) 2022-11-24 2022-11-24 OFD document annotation object drawing method, system and storage medium

Publications (1)

Publication Number Publication Date
CN115796133A true CN115796133A (en) 2023-03-14

Family

ID=85441897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211496181.2A Pending CN115796133A (en) 2022-11-24 2022-11-24 OFD document annotation object drawing method, system and storage medium

Country Status (1)

Country Link
CN (1) CN115796133A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578376A (en) * 2023-07-12 2023-08-11 福昕鲲鹏(北京)信息科技有限公司 Open format document OFD page display method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578376A (en) * 2023-07-12 2023-08-11 福昕鲲鹏(北京)信息科技有限公司 Open format document OFD page display method, device and equipment

Similar Documents

Publication Publication Date Title
JP6953588B2 (en) Systems and methods for automatic conversion of interactive sites and applications that support mobile and other viewing environments
US7647553B2 (en) View templates for HTML source documents
US9817804B2 (en) System for comparison and merging of versions in edited websites and interactive applications
US7350142B2 (en) Method and system for creating a table version of a document
US7149967B2 (en) Method and system for creating a table version of a document
CN104111922A (en) Processing method and device of streaming document
CN115796133A (en) OFD document annotation object drawing method, system and storage medium
JP2016224936A (en) Structure of electronic file, computer-readable storage medium, electronic file generation device, electronic file generation method, and electronic file
CN111190519A (en) File and control processing method, device, equipment and storage medium thereof
CN114647409A (en) Large-screen visualization application creation platform, method, computing device and storage medium
AU2019226189A1 (en) A system for comparison and merging of versions in edited websites and interactive applications
CN113255289A (en) Method and system for composing and distributing file
CN117648293A (en) PSD file processing method, PSD file processing device, computer equipment and medium
CN112417345B (en) Rendering method, rendering device, electronic equipment and storage medium
CN111659121B (en) Method and device for processing effect graph, electronic equipment and readable storage medium
CN118096927A (en) Vector diagram optimization method, device, development tool, equipment, medium and product
JP2005284396A (en) Circuit diagram preparation device, circuit diagram preparation method, its program, and recording medium storing this program
CN117112812A (en) PPT file generation method and device, computer equipment and medium
JP2023049773A (en) Image output apparatus, control method and program of image output device
CN118657131A (en) Text processing method and device and electronic equipment
CN117234610A (en) Rendering method, device, equipment and medium of document object model component
CN115688694A (en) Document processing method, device, equipment and storage medium
KR20150041352A (en) Apparatus and Method for creating web application
JP2001268506A (en) Multimedia program production system

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