CN113343636B - Method and device for setting marking line width, electronic equipment and storage medium - Google Patents

Method and device for setting marking line width, electronic equipment and storage medium Download PDF

Info

Publication number
CN113343636B
CN113343636B CN202110615371.0A CN202110615371A CN113343636B CN 113343636 B CN113343636 B CN 113343636B CN 202110615371 A CN202110615371 A CN 202110615371A CN 113343636 B CN113343636 B CN 113343636B
Authority
CN
China
Prior art keywords
width
attribute
operation command
marking
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110615371.0A
Other languages
Chinese (zh)
Other versions
CN113343636A (en
Inventor
孙俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110615371.0A priority Critical patent/CN113343636B/en
Publication of CN113343636A publication Critical patent/CN113343636A/en
Application granted granted Critical
Publication of CN113343636B publication Critical patent/CN113343636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for setting a marking line width, relates to the technical field of computer application, and particularly relates to the field of portable file format PDF. The method comprises the following steps: receiving an operation command input by a user and used for setting the width of the marking line through a front-end editor of the PDF document; the operation command carries the width setting parameter of the marking line; updating an original modification description file of the PDF document through an event processing center in response to the operation command to obtain an updated modification description file; updating original labeling object attributes of the PDF document through a merging engine based on the updated modification description file to obtain updated labeling object attributes; and setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute. The embodiment of the application can set the width of the marking line in the PDF document, thereby meeting the real requirement of user marking and realizing the document marking function through richer expression forms.

Description

Method and device for setting marking line width, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computer application, and further relates to a portable file format (PDF) technology, in particular to a method, a device, electronic equipment and a storage medium for setting a marking line width.
Background
The portable file format (Portable Document Format, PDF for short) is an electronic file format that is independent of the operating system platform. Because of its platform-independent nature, PDF has become an ideal document format for electronic document storage and dissemination in mobile Internet for many years, and has become increasingly widely used. The PDF file format can package electronic information such as characters, fonts, formats, colors, graphics and images which are independent of equipment and resolution into one file; in addition, the file can also contain electronic information such as hypertext links, sound, dynamic images and the like, and support special files, and has higher integration level and higher safety and reliability.
Underlining in text labels is a basic function of PDF document editing, and commonly used PDF document software is supported, including Adobe, WPS, and foci, but these software only provide line colors for users to select, but cannot set or modify line widths. The existing PDF document software does not support setting or modifying the bar width for two reasons: first, the requirements for wire thickness are different in different application scenarios. If the display proportion of the PDF document is large and the line width is set too thin, it is not easy to recognize; if the display proportion of the PDF document is small, and the line width is set to be too thick and the characters are easy to be blocked, the conventional PDF document software does not provide the function; 2) The realization difficulty is high, in the definition of the PDF format, the color and the transparency are basic attributes of the marked object, but the line width is not the basic attribute of the marked object, and the line width is much higher than the color in the realization difficulty.
Disclosure of Invention
The disclosure provides a method, a device, electronic equipment and a storage medium for setting a marking line.
In a first aspect, the present application provides a method for setting a marking line, the method comprising:
receiving an operation command input by a user and used for setting the width of the marking line through a front-end editor of the PDF document; the operation command carries the width setting parameter of the marking line;
updating an original modification description file of the PDF document through an event processing center of the PDF document in response to the operation command to obtain an updated modification description file;
updating original labeling object attributes of the PDF document through a merging engine of the PDF document based on the updated modification description file to obtain updated labeling object attributes;
and setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute.
In a second aspect, the present application provides an apparatus for setting a marking line, the apparatus comprising: the device comprises a command receiving module, a file updating module, an attribute updating module and a width setting module; wherein,,
the command receiving module is used for receiving an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of the PDF document; the operation command carries the width setting parameter of the marking line;
the file updating module is used for responding to the operation command and updating the original modification description file of the PDF document through the event processing center of the PDF document to obtain an updated modification description file;
the attribute updating module is used for updating the original labeling object attribute of the PDF document through the merging engine of the PDF document based on the updated modification description file to obtain the updated labeling object attribute;
the width setting module is configured to set the width of the marking line to a width corresponding to the width setting parameter based on the updated marking object attribute.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for setting a callout line width according to any embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a storage medium having stored thereon a computer program, which when executed by a processor, implements the method for setting a marking line width according to any embodiment of the present application.
In a fifth aspect, a computer program product is provided, which when executed by a computer device implements a method of setting a marking line width according to any embodiment of the application.
According to the technical scheme provided by the application, the width of the marking line can be set in the PDF document, so that the real requirement of the user marking can be met, and the document marking function can be realized through richer expression forms.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a first flow chart of a method for setting a marking line width according to an embodiment of the present application;
FIG. 2 is a second flow chart of a method for setting a marking line width according to an embodiment of the present application;
FIG. 3 is a third flow chart of a method for setting a marking line width according to an embodiment of the present application;
FIG. 4 is a diagram of an interface display of a drop down menu for selecting a marking line width provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a structure of labeling object attributes according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a device for setting the width of a marking line according to an embodiment of the present application;
fig. 7 is a block diagram of an electronic device for implementing a method for setting a marking line width according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 1 is a schematic flow chart of a method for setting a marking line width according to an embodiment of the present application, where the method may be performed by an apparatus or an electronic device for setting a marking line width, where the apparatus or the electronic device may be implemented by software and/or hardware, and the apparatus or the electronic device may be integrated into any intelligent device with a network communication function. As shown in fig. 1, the method for setting the marking line width may include the following steps:
s101, receiving an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of a PDF document; the operation command carries the width setting parameter of the marking line.
In the step, the electronic equipment can receive an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of the PDF document; the operation command carries the width setting parameter of the marking line. Specifically, the electronic device may receive a single operation command input by a user through the front-end editor; taking the single operation command as an operation command for setting the width of the marking line; or, the combined operation command input by the user can be received through the front-end editor; the combined operation commands are synthesized into an operation command for setting the width of the marking line. It should be noted that, the marking line in the embodiment of the present application may include any predetermined type of line, for example, a solid line and a dashed line; underline, strikethrough; straight lines, wavy lines, etc.
S102, updating an original modification description file of the PDF document through an event processing center of the PDF document in response to the operation command, and obtaining an updated modification description file.
In this step, the electronic device may update the original modification description file of the PDF document through the event processing center of the PDF document in response to the operation command, resulting in an updated modification description file. Specifically, the electronic device may extract the width setting parameter from the operation command through the event processing center; and then replacing the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file to obtain an updated modification description file.
S103, updating original labeling object attributes of the PDF document through a merging engine of the PDF document based on the updated modification description file, and obtaining updated labeling object attributes.
In this step, the electronic device may update the original labeling object attribute of the PDF document through the merging engine of the PDF document based on the updated modification description file, to obtain the updated labeling object attribute. Specifically, the electronic device may extract the width setting parameter from the updated modification description file; then searching the line width attribute of the marking line in a marking object attribute structure of a predetermined PDF document; if the line width attribute of the marking line is found in the marking object attribute structure of the PDF document, the original width setting parameters on the line width attribute are replaced by the extracted width setting parameters, and the updated marking object attribute is obtained.
S104, setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute.
In this step, the electronic device may set the width of the labeling line to the width corresponding to the width setting parameter based on the updated labeling object attribute. Specifically, the electronic device firstly creates a task executor corresponding to the operation command through a merging engine; then analyzing the updated labeling object attribute by using a task executor corresponding to the operation command to obtain a width setting parameter of a labeling line in the updated labeling object attribute; and setting the original width setting parameters of the marking lines as the corresponding widths of the width setting parameters of the marking lines.
The method for setting the width of the marking line comprises the steps of receiving an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of a PDF document; the operation command carries the width setting parameter of the marking line; then, the original modification description file of the PDF document is updated through an event processing center of the PDF document in response to the operation command, and the updated modification description file is obtained; updating the original labeling object attribute of the PDF document through a merging engine of the PDF document based on the updated modification description file to obtain the updated labeling object attribute; and finally, setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute. That is, the technical solution provided by the present application can support the user to set the width of the marking line in the PDF document, where the marking line may include any predetermined type of line, for example, a solid line, a dashed line; underline, strikethrough; straight lines, wavy lines, etc. In the prior art, since the line width is not a basic attribute of the labeling object, the line width is modified to be much higher than the color in the aspect of implementation, so that the existing PDF document does not support the setting of the labeling line width by a user. Because the application adopts three parts of dividing the editing system of the PDF document into a front-end editor, an event processing center and a merging engine, and respectively executing the three parts: the technical means of receiving the operation command, updating the modification description file and updating the labeling object attribute overcomes the technical problems that the width of the labeling line cannot be set in the PDF document and the real requirement of the user label cannot be met in the prior art; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a second flow chart of a method for setting a marking line width according to an embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 2, the method for setting the marking line width may include the steps of:
s201, receiving an operation command input by a user and used for setting the width of the marking line through a front-end editor of the PDF document; the operation command carries the width setting parameter of the marking line.
S202, extracting a width setting parameter from the operation command through the event processing center.
In this step, the electronic device may extract the width setting parameter in the operation command through the event processing center. Specifically, the electronic device may parse the single operation command through the event processing center, and extract the width setting parameter based on the parsing result for the single operation command; the combined operation command may be parsed by the event processing center, and the width setting parameter may be extracted based on the parsing result for the combined operation command.
S203, replacing the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file to obtain an updated modification description file.
In this step, the electronic device may replace the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file, to obtain an updated modification description file. Specifically, the electronic device may first find the line width attribute in the original modification description file; if the line width attribute is found in the original modification description file, replacing the original width setting parameter of the marking line with the extracted width setting parameter under the found line width attribute, thereby obtaining the updated modification description file.
S204, updating original labeling object attributes of the PDF document through a merging engine of the PDF document based on the updated modification description file, and obtaining updated labeling object attributes.
In this step, the electronic device may update the original labeling object attribute of the PDF document through the merging engine of the PDF document based on the updated modification description file, to obtain the updated labeling object attribute. Specifically, the electronic device may extract the width setting parameter from the updated modification description file; then searching the line width attribute of the marking line in a marking object attribute structure of a predetermined PDF document; if the line width attribute of the marking line is found in the marking object attribute structure of the PDF document, the original width setting parameters on the line width attribute are replaced by the extracted width setting parameters, and the updated marking object attribute is obtained. Further, when the electronic device searches the line width attribute of the marking line in the marking object attribute structure of the predetermined PDF document, the first level attribute of the marking object attribute structure of the PDF document can be used as the current level attribute; then detecting whether one attribute in the current-stage attribute is the same as the line width attribute of the marking line; if each attribute in the current level attribute is different from the line width attribute of the marking line, the electronic equipment can take the next level attribute of the current level attribute as the current level attribute; and repeatedly executing the operation until detecting that one attribute in the current-stage attribute is the same as the line width attribute of the marking line.
S205, setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute.
The method for setting the width of the marking line comprises the steps of receiving an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of a PDF document; the operation command carries the width setting parameter of the marking line; then, the original modification description file of the PDF document is updated through an event processing center of the PDF document in response to the operation command, and the updated modification description file is obtained; updating the original labeling object attribute of the PDF document through a merging engine of the PDF document based on the updated modification description file to obtain the updated labeling object attribute; and finally, setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute. That is, the technical solution provided by the present application can support the user to set the width of the marking line in the PDF document, where the marking line may include any predetermined type of line, for example, a solid line, a dashed line; underline, strikethrough; straight lines, wavy lines, etc. In the prior art, since the line width is not a basic attribute of the labeling object, the line width is modified to be much higher than the color in the aspect of implementation, so that the existing PDF document does not support the setting of the labeling line width by a user. Because the application adopts three parts of dividing the editing system of the PDF document into a front-end editor, an event processing center and a merging engine, and respectively executing the three parts: the technical means of receiving the operation command, updating the modification description file and updating the labeling object attribute overcomes the technical problems that the width of the labeling line cannot be set in the PDF document and the real requirement of the user label cannot be met in the prior art; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 3 is a third flow chart of a method for setting a marking line width according to an embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 3, the method for setting the marking line width may include the steps of:
s301, receiving an operation command input by a user and used for setting the width of the marking line through a front-end editor of the PDF document; the operation command carries the width setting parameter of the marking line.
FIG. 4 is a diagram of an interface display of a drop down menu for selecting a marking line width provided by an embodiment of the present application. As shown in fig. 4, the labeling line width that can be provided to the user selection in the drop-down menu includes: 0.25 lbs, 0.5 lbs, 0.75 lbs, 1 lbs, 1.5 lbs, 2.25 lbs, 3 lbs, 4.5 lbs, 6 lbs. The user can select any one of the labeling line widths as the width setting parameter in the above options.
S302, extracting a width setting parameter from the operation command through the event processing center.
S303, replacing the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file to obtain an updated modification description file.
S304, extracting the width setting parameters from the updated modification description file.
S305, searching a line width attribute of the marking line in a marking object attribute structure of the predetermined PDF document.
In this step, the electronic device may search the labeling object attribute structure of the PDF document for the line width attribute of the labeling line. Specifically, the electronic device may first use a first-level attribute of the labeling object attribute structure of the PDF document as a current-level attribute; then detecting whether one attribute in the current-stage attribute is the same as the line width attribute of the marking line; if each attribute in the current level attribute is different from the line width attribute of the marking line, the electronic equipment can take the next level attribute of the current level attribute as the current level attribute; and repeatedly executing the operation until detecting that one attribute in the current-stage attribute is the same as the line width attribute of the marking line.
Fig. 5 is a schematic structural diagram of an attribute of a labeling object according to an embodiment of the present application. As shown in fig. 5, the labeling object attribute structure may include seven levels of attributes, respectively: first level attributes, second level attributes, third level attributes, fourth level attributes, fifth level attributes, sixth level attributes, and seventh level attributes. Further, the first level attributes are: root directory (Root); the second level attributes may include: page objects (Pages), metadata (Metadata), structure tree root (structTreeRoot), and directory (Catalog); for the page object in the second-level attribute, a corresponding third-level attribute may be partitioned, including: page object 1 (Page 1), page object 2 (Page 2), …, page object N (Page N); wherein N is a natural number greater than or equal to 1; for each page object in the third-level attribute, a corresponding fourth-level attribute may be partitioned, including: annotation sets (antss), page Content (Content), group relationships (Group), page size (MeidaBox), parent object (part), resource index (Resources), font index (Font), attribute identification (ProSet), type (Type); for the annotation set in the fourth-level attribute, a corresponding fifth-level attribute may be partitioned, including: appearance stream (Appearance Streams, AP for short), color (C), creation time (Creation Data), annotation tags (Annotation tags), unique identification (NM), indirect referencing object (P), pop-up box object (pop), default user space (quadrpoints), object location coordinates (Rect), parent node location (structpart), subtype (Subtype), and Type (Type); for the appearance stream in the fifth-level attribute, a corresponding sixth-level attribute may be divided, including: object view coordinate position (BBox), object type code (Form Type XObject), data Length (Length), matrix coordinates (Matrix), resource index (Resources), subtype (Subtype), and data stream (stream); for the data stream in the sixth-level attribute, a corresponding seventh-level attribute may be divided, including: color (Device RGB), line width (w), move position (move to), line position (line to), and close path (close path).
S306, if the line width attribute of the marking line is found in the marking object attribute structure of the PDF document, replacing the original width setting parameter on the line width attribute with the extracted width setting parameter to obtain the updated marking object attribute.
S307, the width of the marking line is set to be the width corresponding to the width setting parameter based on the updated marking object attribute.
The method for setting the width of the marking line comprises the steps of receiving an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of a PDF document; the operation command carries the width setting parameter of the marking line; then, the original modification description file of the PDF document is updated through an event processing center of the PDF document in response to the operation command, and the updated modification description file is obtained; updating the original labeling object attribute of the PDF document through a merging engine of the PDF document based on the updated modification description file to obtain the updated labeling object attribute; and finally, setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute. That is, the technical solution provided by the present application can support the user to set the width of the marking line in the PDF document, where the marking line may include any predetermined type of line, for example, a solid line, a dashed line; underline, strikethrough; straight lines, wavy lines, etc. In the prior art, since the line width is not a basic attribute of the labeling object, the line width is modified to be much higher than the color in the aspect of implementation, so that the existing PDF document does not support the setting of the labeling line width by a user. Because the application adopts three parts of dividing the editing system of the PDF document into a front-end editor, an event processing center and a merging engine, and respectively executing the three parts: the technical means of receiving the operation command, updating the modification description file and updating the labeling object attribute overcomes the technical problems that the width of the labeling line cannot be set in the PDF document and the real requirement of the user label cannot be met in the prior art; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example IV
Fig. 6 is a schematic structural diagram of a device for setting a marking line width according to an embodiment of the present application. As shown in fig. 6, the apparatus 600 includes: a command receiving module 601, a file updating module 602, an attribute updating module 603, and a width setting module 604; wherein,,
the command receiving module 601 is configured to receive, through a front-end editor of a PDF document in a portable file format, an operation command input by a user for setting a width of a marking line; the operation command carries the width setting parameter of the marking line;
the file updating module 602 is configured to update, in response to the operation command, an original modification description file of the PDF document through an event processing center of the PDF document, to obtain an updated modification description file;
the attribute updating module 603 is configured to update, based on the updated modification description file, an original labeling object attribute of the PDF document through a merging engine of the PDF document, to obtain an updated labeling object attribute;
the width setting module 604 is configured to set, based on the updated labeling object attribute, a width of the labeling line to a width corresponding to the width setting parameter.
Further, the file updating module 602 is specifically configured to extract, by the event processing center, the width setting parameter in the operation command; and replacing the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file to obtain the updated modification description file.
Further, the attribute updating module 603 is specifically configured to extract the width setting parameter from the updated modification description file; searching a line width attribute of the marking line in a predetermined marking object attribute structure of the PDF document; if the line width attribute of the marking line is found in the marking object attribute structure of the PDF document, the original width setting parameters on the line width attribute are replaced by the extracted width setting parameters, and the updated marking object attribute is obtained.
Further, the attribute updating module 603 is specifically configured to take a first level attribute of the labeling object attribute structure of the PDF document as a current level attribute; detecting whether one attribute in the current-stage attribute is the same as the line width attribute of the marking line; if each attribute in the current-stage attribute is different from the line width attribute of the marking line, taking the next-stage attribute of the current-stage attribute as the current-stage attribute; and repeatedly executing the operation until detecting that one attribute in the current-stage attribute is identical to the line width attribute of the marking line.
Further, the width setting module 604 is specifically configured to create, by using the merging engine, a task executor corresponding to the operation command; analyzing the updated labeling object attribute by using a task executor corresponding to the operation command to obtain a width setting parameter of the labeling line in the updated labeling object attribute; setting the original width setting parameters of the marking lines as the corresponding widths of the marking lines.
Further, the command receiving module 601 is configured to receive, through the front-end editor, a single operation command input by the user; taking the single operation command as the operation command for setting the width of the marking line; or, receiving, by the front-end editor, a combined operation command entered by the user; and synthesizing the combined operation command into the operation command for setting the width of the marking line.
The device for setting the marking line width can execute the method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment may be referred to the method for setting the width of the marking line provided in any embodiment of the present application.
Example five
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the apparatus 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in device 700 are connected to I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The calculation unit 701 performs the respective methods and processes described above, for example, a method of setting the mark line width. For example, in some embodiments, the method of setting the callout line width can be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 700 via ROM 702 and/or communication unit 709. When a computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method of setting a mark line width described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the method of setting the callout line width by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present disclosure may be performed in parallel, sequentially, or in a different order, so long as the desired result of the technical solution of the present disclosure is achieved, and the present disclosure is not limited herein. In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A method of setting a marking line width, the method comprising:
receiving an operation command input by a user and used for setting the width of the marking line through a front-end editor of the portable file format PDF document; the operation command carries the width setting parameter of the marking line;
updating an original modification description file of the PDF document through an event processing center of the PDF document in response to the operation command to obtain an updated modification description file;
extracting the width setting parameters from the updated modification description file; taking the first-level attribute of the labeling object attribute structure of the PDF document as the current-level attribute; detecting whether one attribute in the current-stage attribute is the same as the line width attribute of the marking line; if each attribute in the current-stage attribute is different from the line width attribute of the marking line, taking the next-stage attribute of the current-stage attribute as the current-stage attribute; repeating the operation until detecting that one attribute in the current-stage attribute is identical to the line width attribute of the marking line; if the line width attribute of the marking line is found in the marking object attribute structure of the PDF document, replacing the original width setting parameter on the line width attribute with the extracted width setting parameter to obtain the updated marking object attribute;
and setting the width of the marking line to be the width corresponding to the width setting parameter based on the updated marking object attribute.
2. The method of claim 1, wherein updating the modification profile of the PDF document in response to the operation command through an event processing center of the PDF document, resulting in an updated modification profile, comprises:
extracting the width setting parameter from the operation command through the event processing center;
and replacing the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file to obtain the updated modification description file.
3. The method of claim 1, wherein the setting the width of the annotation line to the width corresponding to the width setting parameter based on the updated annotation object attribute comprises:
creating a task executor corresponding to the operation command through a merging engine;
analyzing the updated labeling object attribute by using a task executor corresponding to the operation command to obtain a width setting parameter of the labeling line in the updated labeling object attribute;
setting the original width setting parameters of the marking lines as the corresponding widths of the marking lines.
4. The method of claim 1, wherein the receiving, by the front-end editor of the PDF document, an operation command for setting a width of the markup line, which is input by a user, comprises:
receiving, by the front-end editor, the single operation command input by the user; taking the single operation command as the operation command for setting the width of the marking line;
or, receiving, by the front-end editor, a combined operation command entered by the user; and synthesizing the combined operation command into the operation command for setting the width of the marking line.
5. An apparatus for setting a marking line width, the apparatus comprising: the device comprises a command receiving module, a file updating module, an attribute updating module and a width setting module; wherein,,
the command receiving module is used for receiving an operation command which is input by a user and is used for setting the width of the marking line through a front-end editor of the portable file format PDF document; the operation command carries the width setting parameter of the marking line;
the file updating module is used for responding to the operation command and updating the original modification description file of the PDF document through the event processing center of the PDF document to obtain an updated modification description file;
the attribute updating module is used for extracting the width setting parameters from the updated modification description file; taking the first-level attribute of the labeling object attribute structure of the PDF document as the current-level attribute; detecting whether one attribute in the current-stage attribute is the same as the line width attribute of the marking line; if each attribute in the current-stage attribute is different from the line width attribute of the marking line, taking the next-stage attribute of the current-stage attribute as the current-stage attribute; repeating the operation until detecting that one attribute in the current-stage attribute is identical to the line width attribute of the marking line; if the line width attribute of the marking line is found in the marking object attribute structure of the PDF document, replacing the original width setting parameter on the line width attribute with the extracted width setting parameter to obtain the updated marking object attribute;
the width setting module is configured to set the width of the marking line to a width corresponding to the width setting parameter based on the updated marking object attribute.
6. The apparatus according to claim 5, wherein the file updating module is configured to extract the width setting parameter in the operation command by the event processing center; and replacing the original width setting parameters of the marking line with the extracted width setting parameters in the original modification description file to obtain the updated modification description file.
7. The device according to claim 5, wherein the width setting module is specifically configured to create, by means of a merging engine, a task executor corresponding to the operation command; analyzing the updated labeling object attribute by using a task executor corresponding to the operation command to obtain a width setting parameter of the labeling line in the updated labeling object attribute; setting the original width setting parameters of the marking lines as the corresponding widths of the marking lines.
8. The apparatus of claim 5, the command receiving module to receive, via the front-end editor, a single operation command entered by the user; taking the single operation command as the operation command for setting the width of the marking line; or, receiving, by the front-end editor, a combined operation command entered by the user; and synthesizing the combined operation command into the operation command for setting the width of the marking line.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202110615371.0A 2021-06-02 2021-06-02 Method and device for setting marking line width, electronic equipment and storage medium Active CN113343636B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110615371.0A CN113343636B (en) 2021-06-02 2021-06-02 Method and device for setting marking line width, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110615371.0A CN113343636B (en) 2021-06-02 2021-06-02 Method and device for setting marking line width, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113343636A CN113343636A (en) 2021-09-03
CN113343636B true CN113343636B (en) 2023-11-03

Family

ID=77473049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110615371.0A Active CN113343636B (en) 2021-06-02 2021-06-02 Method and device for setting marking line width, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113343636B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016018604A1 (en) * 2014-07-30 2016-02-04 Bluebeam Software, Inc. Optimized rendering of shared documents on client devices with document raster representations
CN111857893A (en) * 2019-04-08 2020-10-30 百度在线网络技术(北京)有限公司 Method and device for generating label graph
CN111914517A (en) * 2020-06-20 2020-11-10 北京海金格医药科技股份有限公司 Document hyperlink creating method and device, electronic equipment and readable storage medium
CN112765110A (en) * 2021-01-22 2021-05-07 广州文石信息科技有限公司 PDF annotation data generation method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016018604A1 (en) * 2014-07-30 2016-02-04 Bluebeam Software, Inc. Optimized rendering of shared documents on client devices with document raster representations
CN111857893A (en) * 2019-04-08 2020-10-30 百度在线网络技术(北京)有限公司 Method and device for generating label graph
CN111914517A (en) * 2020-06-20 2020-11-10 北京海金格医药科技股份有限公司 Document hyperlink creating method and device, electronic equipment and readable storage medium
CN112765110A (en) * 2021-01-22 2021-05-07 广州文石信息科技有限公司 PDF annotation data generation method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Research on Lane-Marking Line Based Camera Calibration;Kunfeng Wang等;《 IEEE Xplore》;全文 *
科技文档对象在标签PDF中的表示研究;刘平;廖兆存;于俊清;;计算机工程与设计(13);全文 *

Also Published As

Publication number Publication date
CN113343636A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN106294493B (en) Method and device for realizing document format conversion
CN112328489B (en) Test case generation method and device, terminal equipment and storage medium
EP3961433A2 (en) Data annotation method and apparatus, electronic device and storage medium
CN113836877B (en) Text labeling method, device, equipment and storage medium
CN112784588B (en) Method, device, equipment and storage medium for labeling text
CN113849581A (en) Alarm information processing method, device, equipment and storage medium
CN113836316A (en) Processing method, training method, device, equipment and medium for ternary group data
CN113343636B (en) Method and device for setting marking line width, electronic equipment and storage medium
CN107423271B (en) Document generation method and device
CN114239562A (en) Method, device and equipment for identifying program code blocks in document
CN114489639A (en) File generation method, device, equipment and storage medium
CN114880498A (en) Event information display method and device, equipment and medium
CN114417862A (en) Text matching method, and training method and device of text matching model
CN114461886A (en) Labeling method, labeling device, electronic equipment and storage medium
CN113961672A (en) Information labeling method and device, electronic equipment and storage medium
CN113722642B (en) Webpage conversion method and device, electronic equipment and storage medium
CN113407890B (en) Information extraction method, device, electronic equipment and medium
US11835356B2 (en) Intelligent transportation road network acquisition method and apparatus, electronic device and storage medium
US20240126978A1 (en) Determining attributes for elements of displayable content and adding them to an accessibility tree
CN113901214B (en) Method and device for extracting form information, electronic equipment and storage medium
CN114491040B (en) Information mining method and device
US20230222827A1 (en) Method and apparatus for processing document image, and electronic device
CN116301753A (en) Webpage engineering file generation method and device, electronic equipment and storage medium
CN117407468A (en) Method and device for displaying generated content, electronic equipment and storage medium
CN118151901A (en) Code file management method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant