CN111460760A - PDF document editing method and device - Google Patents
PDF document editing method and device Download PDFInfo
- Publication number
- CN111460760A CN111460760A CN201910005333.6A CN201910005333A CN111460760A CN 111460760 A CN111460760 A CN 111460760A CN 201910005333 A CN201910005333 A CN 201910005333A CN 111460760 A CN111460760 A CN 111460760A
- Authority
- CN
- China
- Prior art keywords
- target
- font
- identifier
- character
- identification
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000002372 labelling Methods 0.000 claims description 5
- 238000004891 communication Methods 0.000 description 14
- 238000004590 computer program Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 230000006399 behavior Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000002427 irreversible effect Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 238000005336 cracking Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
The embodiment of the invention provides a PDF document editing method and device. The scheme is as follows: receiving an editing request of a user for target characters in a PDF document to be edited, determining a target font identification of the target characters based on the editing request, determining a target font type corresponding to the target font identification according to a pre-stored corresponding relation between the font identification and the font type, and refusing to edit the target characters if the target font type is not determined. By the scheme provided by the embodiment of the invention, the target font identification of the target character in the PDF document can be processed aiming at the target character in the PDF document, and when the target font type of the target character cannot be found, a user cannot edit the target character, so that the editing function of the PDF document is limited according to the character, and the safety of the PDF document is improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a PDF document editing method and device.
Background
At present, in order to improve the security of a PDF Document, when a PDF (Portable Document Format) Document is stored, a user is restricted from editing the PDF Document by encrypting the entire PDF Document or setting an editing authority. However, after encrypting the PDF document, the entire PDF document will not be able to undergo any editing operation. The way of limiting PDF document editing is not flexible enough.
Disclosure of Invention
The embodiment of the invention aims to provide a PDF document editing method and a PDF document editing device so as to improve the flexibility of limiting the PDF document editing. The specific technical scheme is as follows:
the embodiment of the invention provides a PDF document editing method, which comprises the following steps:
receiving an editing request of a user for target characters in a PDF document to be edited;
determining a target font identifier of the target character based on the editing request;
determining a target font type corresponding to the target font identification according to a pre-stored corresponding relation between the font identification and the font type;
and if the target font type is not determined, refusing to edit the target character.
Optionally, before receiving an editing request of a user for a target text in a PDF document to be edited, the method further includes:
acquiring a character string allocated to the target font type of the target character, using the character string as the target font identifier, and labeling the target character by using the target font identifier; or
And encrypting the identifier of the target font type of the target character according to a preset encryption algorithm to obtain an encrypted identifier, taking the encrypted identifier as the target font identifier, and labeling the target character by using the target font identifier.
Optionally, before determining the target font type corresponding to the target font identifier according to the pre-stored correspondence between the font identifier and the font type, the method further includes:
judging whether the target font identification is an encrypted identification to obtain a judgment result;
the step of determining the target font type corresponding to the target font identification according to the corresponding relationship between the pre-stored font identification and the font type comprises the following steps:
and if the judgment result is negative, determining the target font type corresponding to the target font identification according to the corresponding relation between the pre-stored font identification and the font type.
Optionally, the method further includes:
and if the judgment result is yes, refusing to edit the target character.
Optionally, the method further includes:
and if the target font type is determined, allowing the target character to be edited according to the target font type.
The embodiment of the invention also provides a PDF document editing device, which comprises:
the receiving module is used for receiving an editing request of a user for target characters in a PDF document to be edited;
the first determining module is used for determining the target font identification of the target character based on the editing request;
the second determining module is used for determining the target font type corresponding to the target font identification according to the corresponding relation between the pre-stored font identification and the font type;
and the first rejection module is used for rejecting editing of the target character after the second determination module does not determine the target font type.
Optionally, the apparatus further comprises:
the marking module is used for acquiring a character string distributed for the target font type of the target character, using the character string as the target font identifier and marking the target character by using the target font identifier; or according to a preset encryption algorithm, encrypting the identification of the target font type of the target character to obtain an encrypted identification, using the encrypted identification as the target font identification, and marking the target character by using the target font identification.
Optionally, the apparatus further comprises:
the judgment module is used for judging whether the target font identifier is an encrypted identifier or not to obtain a judgment result;
the second determining module is specifically configured to determine, after the determination result of the determining module is negative, the target font type corresponding to the target font identifier according to a pre-stored correspondence between the font identifier and the font type.
Optionally, the apparatus further comprises:
and the second rejection module is used for rejecting editing of the target character after the judgment result of the judgment module is yes.
Optionally, the apparatus further comprises:
and the allowing module is used for allowing the target character to be edited according to the target font type after the second determining module determines the target font type.
The embodiment of the invention also provides electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the steps of the PDF document editing method when executing the program stored in the memory.
The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above-mentioned PDF document editing methods are implemented.
An embodiment of the present invention further provides a computer program product including instructions, which when run on a computer, causes the computer to execute any one of the above PDF document editing methods.
In the method and the device for editing the PDF document, provided by the embodiments of the present invention, an editing request of a user for a target character in a PDF document to be edited may be received, a target font identifier of the target character is determined based on the editing request, a target font type corresponding to the target font identifier is determined according to a correspondence between a pre-stored font identifier and a font type, and if the target font type is not determined, the target character is rejected from being edited. By the technical scheme provided by the embodiment of the invention, the target font identification of the target character in the PDF document can be processed aiming at the target character in the PDF document, and when the target font type of the target character cannot be found, a user cannot edit the target character, so that the editing function of the PDF document is limited according to the character, and the safety of the PDF document is improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a first flowchart of a PDF document editing method according to an embodiment of the present invention;
FIG. 2 is a first schematic diagram of an application interface of PDF software;
FIG. 3 is a second schematic diagram of an application interface of PDF software;
fig. 4 is a second flowchart of a PDF document editing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a PDF document editing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, in order to improve the security of a PDF document, when the PDF document is stored, a user is restricted from editing the PDF document by encrypting the entire PDF document or setting an editing authority. However, after encrypting the PDF document, the entire PDF document will not be able to undergo any editing operation. The way of limiting PDF document editing is not flexible enough.
In order to solve the problem that the mode of limiting the PDF document editing function is not flexible enough, the embodiment of the invention provides a PDF document editing method and a PDF document editing device. The method may be applied to any electronic device. In the method provided by the embodiment of the present invention, an editing request of a user for a target character in a PDF document to be edited may be received, a target font identifier of the target character is determined based on the editing request, a target font type corresponding to the target font identifier is determined according to a correspondence between a pre-stored font identifier and a font type, and if the target font type is not determined, the target character is rejected from being edited.
By the method provided by the embodiment of the invention, the target font identification of the target character in the PDF document can be processed aiming at the target character in the PDF document, and when the target font type of the target character cannot be found, a user cannot edit the target character, so that the editing function of the PDF document is limited according to the character, and the safety of the PDF document is improved.
The following examples illustrate the present invention.
As shown in fig. 1, fig. 1 is a first flowchart of a PDF document editing method according to an embodiment of the present invention. The method comprises the following steps.
Step S101, receiving an editing request of a user for target characters in a PDF document to be edited.
In this step, the electronic device detects the operation behavior of the user in the PDF software interface, and determines whether the operation behavior of the user includes an operation behavior for editing a target character in a PDF document to be edited. And if so, generating an editing request aiming at the target character according to the operation behavior.
For example, as shown in FIG. 2, in view interface 202, a portion of the textual content of a PDF document is presented. When it is detected that the user selects the target text 203, it may be determined whether the user moves the cursor to the position of the editing text 201, and a click operation is performed. If it is determined that the user clicked at the position of the editing text 201, an editing request for the target text 203 may be generated. In practice, the edit text 201 may be a text edit key or icon.
In the embodiment of the invention, the editing operation of the target characters in the PDF document to be edited by the user can modify the contents of the target characters, and also can modify the format of the target characters. In addition, the target text may be a text, a segment of text, or a plurality of segments of text in the PDF document to be edited. The determination can be specifically made according to the operation behavior of the user in the PDF document. For example, when a user selects a piece of text content in the PDF document and selects to edit the piece of text content, the target words are all words in the piece of text content. The above-mentioned target words are not particularly limited in the embodiments of the present invention.
And step S102, determining the target font identification of the target character based on the editing request.
In this step, the electronic device may determine the target font identification of the target text after receiving the editing request.
In a PDF document, text content and font types corresponding to the text content are stored separately. For example, the text content may be encoded in the PDF document by using Unicode (uniform) encoding, and the encoded text content may be embedded in the PDF document at a corresponding position. And storing the font type corresponding to the text content separately. Generating font identification according to the attribute characteristics of the text content, marking the text content by using the font identification, and establishing the corresponding relation between the text content and the font identification. Wherein the attribute characteristics of the text content at least comprise a font type and a font format. The electronic device may determine a target font identification for the target text after the received edit request.
In one example, the target font identification may be generated according to attribute characteristics of the text content. For example, if the font type of the target font in the PDF document is a song-like font and the target font is italicized, the font identification of the target font may be song-like and italicized.
In another example, the target font identification may be one or more meaningless character strings. E.g., a _1, ac, etc.
In the embodiment of the present invention, the font identifier of the text content in the PDF document may be composed of words, letters, underlines, and the like. The specific form of font identification is not particularly limited herein.
And step S103, determining the target font type corresponding to the target font identification according to the corresponding relation between the pre-stored font identification and the font type. If the font type of the target font is not determined, step S104 is executed.
In this step, in the PDF document, the font identifier is used to label the text content, and the font identifier may be generated according to the attribute feature of the font type corresponding to the text content. The electronic device may determine a target font type corresponding to the target font identifier according to the target font identifier of the target text.
In the above-described determining of the target font type corresponding to the target font identifier, the following may occur.
In case one, the target font identifier of the target character is generated according to the characteristic attribute of the text content, and then the font type corresponding to the target character can be determined according to the target font identifier. For example, if the target font identifier of a target character is the song imitation font and the italic font, the target font type corresponding to the target font may be determined to be the song imitation font according to the target font identifier.
And in the second case, if the target font identifier of the target character is the one or more meaningless character strings, the font type corresponding to the target character cannot be determined according to the target font identifier. For example, if the target font identifier of a target text is a _1, the target font type corresponding to the target font may not be determined according to the target font identifier.
And step S104, refusing to edit the target character.
In this step, if the target font type corresponding to the target font identifier is not determined according to the correspondence between the pre-stored font identifier and the font type, the editing request of the user may be rejected, so that the user may not edit the target font identifier.
In one embodiment, if the target font type corresponding to the target font identifier can be determined according to the pre-stored correspondence between the font identifier and the font type, the editing request of the user is accepted, and the target text is allowed to be edited according to the target font type, so that the user can edit the target text in the PDF document to be edited.
In one embodiment, if the target font type of the target text is determined, the editing request may be accepted, and a rectangular area may appear around the target text as an editable area, as shown at 301 in fig. 3. The user can edit the target characters in the PDF document to be edited in the editable area.
In one embodiment, if the target font type of the target text is not determined, the editing request may be rejected, and the editable area does not appear around the target text, so that the user cannot edit the target text in the PDF document to be edited.
Whether the editable area appears or not is only one expression form for showing whether the user can edit the target characters in the PDF document to be edited or not. In practice, other manifestations may also occur. For example, when the target text is rejected from being edited, a prompt box which cannot be edited may be popped up in the application interface.
In an optional embodiment, in step S101, before the user receives an editing request for the target text in the PDF document to be edited, the user may be restricted from editing the target text in the PDF document to be edited. The restricting means may include at least the following two means.
In the first mode, a character string allocated to a target font type of a target character is acquired and used as a target font identifier, and the target character is labeled by the target font identifier.
Specifically, in the PDF document, the font type corresponding to the text content may be determined according to the font identifier of the text content. Aiming at the original target font identification corresponding to the target character in the PDF document to be edited, one or more meaningless character strings can be redistributed to the target character, and the original target font identification is replaced by the character strings to obtain a new target font identification. Therefore, according to the new target font identification, the target font type corresponding to the target character cannot be determined, and the user is limited to edit the target character in the PDF document to be edited.
For example, the original target font of a target text is identified as the simulated song and italics described above, denoted as simulated song _ italics. And (4) re-allocating character strings for the target font identification, and if the re-allocated character strings are A1 and the simulated Song _ italics are replaced by A1, then the target font identification of the target character is A1. According to the target font identification A1, the font type corresponding to the target font cannot be determined to be the imitation Song font, so that the user is limited from editing the target characters in the PDF document to be edited.
In the first manner, regarding the allocation of the target font identifier of the target text, in an embodiment, one or more character strings may be randomly generated according to the original target font identifier of the target text, so as to obtain a new target font identifier. In another embodiment, a mapping table may be randomly generated according to the original target font identifier of the target word, and the target font identifier of the target word may be re-determined according to the mapping table. In one embodiment, one or more character strings may be assigned to the target text by the user, resulting in a new target font identification. In the embodiment of the present invention, the method for assigning the character string is not particularly limited.
And secondly, encrypting the identifier of the target font type of the target character according to a preset encryption algorithm to obtain an encrypted identifier, taking the encrypted identifier as the target font identifier, and labeling the target character by using the target font identifier. Wherein the identification of the target font type can be identified by the original target font.
In one embodiment, the original target font identifier of the target text may be irreversibly encrypted by using an irreversible encryption algorithm, such as MD5 (Message-Digest) algorithm, to obtain an encrypted identifier. And replacing the original target font identification of the target character with the encrypted identification to serve as a new target font identification. And marking the target characters by using the new target character mark, so that the user cannot obtain the target character type according to the new target character mark, and the user is limited to edit the target characters in the PDF document to be edited.
In another embodiment, a plurality of encryption algorithms may be preset. And randomly selecting one preset encryption algorithm from the plurality of preset encryption algorithms, and encrypting the original target font identification of the target character by using the selected preset encryption algorithm to obtain an encrypted identification. And replacing the original target font identification of the target character with the encrypted identification to serve as a new target font identification. And marking the target characters by using the new target font identification. The user cannot determine a specific encryption algorithm, and further cannot decrypt the new target font identifier to obtain the original target font identifier, and further cannot obtain the target font type according to the new target font identifier, so that the user is limited to edit the target characters in the PDF document to be edited.
By the first mode and the second mode, both the character string is distributed to the original target font identifier and the encryption operation of the original target font identifier belongs to irreversible operation, so that the cracking difficulty is increased, and the safety of the PDF document is improved.
In an alternative embodiment, as shown in fig. 4, fig. 4 is a second flowchart of a PDF document editing method according to an embodiment of the present invention. The method comprises the following steps.
Step S401, receiving an editing request of a user for target characters in a PDF document to be edited.
Step S402, based on the editing request, determining the target font identification of the target character.
The above steps S401 to S402 are the same as the above steps S101 to S102.
Step S403, determining whether the target font identifier is an encrypted identifier, and obtaining a determination result. If the determination result is negative, step S404 is executed. If yes, go to step S405.
In this step, whether the target font identifier is an encrypted identifier is determined according to the target font identifier of the target character, and a determination result is obtained.
In an embodiment, after the encrypted identifier is used as the target font identifier of the target text, the font identifier may be marked, and according to the mark, whether the target font identifier is the encrypted identifier is determined. For example, the encrypted font identifier may be marked with an encrypted identifier, and whether the target font identifier is an encrypted identifier is determined according to whether the target font identifier has the encrypted identifier, so as to obtain a determination result.
Step S404, determining the target font type corresponding to the target font identification according to the corresponding relation between the pre-stored font identification and the font type. If the font type of the target font is not determined, step S305 is performed. If the font type of the target font is determined, step S306 is executed.
In step S405, editing of the target character is rejected.
The above steps S404 to S405 are the same as the above steps S103 to S104.
Step S406, allowing editing of the target character.
In this step, the editing request may be accepted, and the user is allowed to edit the target text.
In summary, with the method provided by the embodiment of the present invention, for the target text in the PDF document, the target font identifier of the target text in the PDF document can be processed, and when the target font type of the target text cannot be found, the user cannot edit the target text, which realizes that the editing function of the PDF document is limited according to the text, and improves the security of the PDF document.
Based on the same inventive concept, according to the PDF document editing method provided by the above embodiment of the present invention, the embodiment of the present invention further provides a PDF document editing apparatus. Fig. 5 is a schematic structural diagram of a PDF document editing apparatus according to an embodiment of the present invention, shown in fig. 5. The apparatus may include the following modules.
The receiving module 501 is configured to receive an editing request of a user for a target text in a PDF document to be edited.
The first determining module 502 is configured to determine a target font identifier of a target text based on the editing request.
The second determining module 503 is configured to determine, according to a pre-stored correspondence between the font identifier and the font type, a target font type corresponding to the target font identifier.
The first rejecting module 504 is configured to reject editing of the target text after the second determining module 503 does not determine the target font type.
Optionally, the PDF document editing apparatus may further include:
and the marking module is used for acquiring the character string distributed for the target font type of the target character, using the character string as the target font identifier and marking the target character by using the target font identifier. Or according to a preset encryption algorithm, encrypting the identification of the target font type of the target character to obtain an encrypted identification, using the encrypted identification as the target font identification, and marking the target character by using the target font identification.
Optionally, the PDF document editing apparatus may further include:
and the judging module is used for judging whether the target font identifier is an encrypted identifier or not to obtain a judgment result.
The second determining module 503 may be specifically configured to determine, after the determination result of the determining module is negative, the target font type corresponding to the target font identifier according to the pre-stored correspondence between the font identifier and the font type.
Optionally, the PDF document editing apparatus may further include:
and the second rejection module is used for rejecting editing of the target character after the judgment result of the judgment module is yes.
Optionally, the PDF document editing apparatus may further include:
and an allowing module, configured to allow the target text to be edited according to the target font type after the second determining module 503 determines the target font type.
By the device provided by the embodiment of the invention, the target font identification of the target character in the PDF document can be processed aiming at the target character in the PDF document, and when the target font type of the target character cannot be found, a user cannot edit the target character, so that the editing function of the PDF document is limited according to the character, and the safety of the PDF document is improved.
Based on the same inventive concept, according to the PDF document editing method provided by the above embodiment of the present invention, an embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604;
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
receiving an editing request of a user for target characters in a PDF document to be edited;
determining a target font identifier of the target character based on the editing request;
determining a target font type corresponding to the target font identification according to a pre-stored corresponding relation between the font identification and the font type;
and if the target font type is not determined, refusing to edit the target character.
By the electronic equipment provided by the embodiment of the invention, the target font identification of the target character in the PDF document can be processed aiming at the target character in the PDF document, and when the target font type of the target character cannot be found, a user cannot edit the target character, so that the editing function of the PDF document is limited according to the character, and the safety of the PDF document is improved.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Based on the same inventive concept, according to the PDF document editing method provided in the above embodiments of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above PDF document editing methods.
Based on the same inventive concept, according to the PDF document editing method provided in the above embodiments of the present invention, an embodiment of the present invention further provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute any of the PDF document editing methods in the above embodiments.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website site, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DS L)) or wireless (e.g., infrared, wireless, microwave, etc.) manner to another website site, computer, server, or data center.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for embodiments such as the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is simple, and for relevant points, reference may be made to part of the description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. A portable document format PDF document editing method is characterized by comprising the following steps:
receiving an editing request of a user for target characters in a PDF document to be edited;
determining a target font identifier of the target character based on the editing request;
determining a target font type corresponding to the target font identification according to a pre-stored corresponding relation between the font identification and the font type;
and if the target font type is not determined, refusing to edit the target character.
2. The method of claim 1, before receiving a user request for editing a target text in a PDF document to be edited, further comprising:
acquiring a character string allocated to the target font type of the target character, using the character string as the target font identifier, and labeling the target character by using the target font identifier; or
And encrypting the identifier of the target font type of the target character according to a preset encryption algorithm to obtain an encrypted identifier, taking the encrypted identifier as the target font identifier, and labeling the target character by using the target font identifier.
3. The method according to claim 1 or 2, before determining the target font type corresponding to the target font identifier according to the pre-stored correspondence between the font identifier and the font type, further comprising:
judging whether the target font identification is an encrypted identification to obtain a judgment result;
the step of determining the target font type corresponding to the target font identification according to the corresponding relationship between the pre-stored font identification and the font type comprises the following steps:
and if the judgment result is negative, determining the target font type corresponding to the target font identification according to the corresponding relation between the pre-stored font identification and the font type.
4. The method of claim 3, further comprising:
and if the judgment result is yes, refusing to edit the target character.
5. The method of claim 1, further comprising:
and if the target font type is determined, allowing the target character to be edited according to the target font type.
6. A portable document format PDF document editing apparatus, comprising:
the receiving module is used for receiving an editing request of a user for target characters in a PDF document to be edited;
the first determining module is used for determining the target font identification of the target character based on the editing request;
the second determining module is used for determining the target font type corresponding to the target font identification according to the corresponding relation between the pre-stored font identification and the font type;
and the first rejection module is used for rejecting editing of the target character after the second determination module does not determine the target font type.
7. The apparatus of claim 6, further comprising:
the marking module is used for acquiring a character string distributed for the target font type of the target character, using the character string as the target font identifier and marking the target character by using the target font identifier; or according to a preset encryption algorithm, encrypting the identification of the target font type of the target character to obtain an encrypted identification, using the encrypted identification as the target font identification, and marking the target character by using the target font identification.
8. The apparatus of claim 6 or 7, further comprising:
the judgment module is used for judging whether the target font identifier is an encrypted identifier or not to obtain a judgment result;
the second determining module is specifically configured to determine, after the determination result of the determining module is negative, the target font type corresponding to the target font identifier according to a pre-stored correspondence between the font identifier and the font type.
9. The apparatus of claim 8, further comprising:
and the second rejection module is used for rejecting editing of the target character after the judgment result of the judgment module is yes.
10. The apparatus of claim 6, further comprising:
and the allowing module is used for allowing the target character to be edited according to the target font type after the second determining module determines the target font type.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910005333.6A CN111460760B (en) | 2019-01-03 | 2019-01-03 | PDF document editing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910005333.6A CN111460760B (en) | 2019-01-03 | 2019-01-03 | PDF document editing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111460760A true CN111460760A (en) | 2020-07-28 |
CN111460760B CN111460760B (en) | 2024-04-30 |
Family
ID=71679734
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910005333.6A Active CN111460760B (en) | 2019-01-03 | 2019-01-03 | PDF document editing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111460760B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112084388A (en) * | 2020-08-07 | 2020-12-15 | 广州力挚网络科技有限公司 | Data encryption method and device, electronic equipment and storage medium |
CN113869003A (en) * | 2021-09-28 | 2021-12-31 | 泰山信息科技有限公司 | Font dynamic switching method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5528742A (en) * | 1993-04-09 | 1996-06-18 | Microsoft Corporation | Method and system for processing documents with embedded fonts |
CN1573641A (en) * | 2003-06-11 | 2005-02-02 | 微软公司 | Method and apparatus for protecting electronic file area |
CN102681978A (en) * | 2012-05-15 | 2012-09-19 | 深圳市万兴软件有限公司 | Method and system for displaying text in PDF (portable document format) document |
-
2019
- 2019-01-03 CN CN201910005333.6A patent/CN111460760B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5528742A (en) * | 1993-04-09 | 1996-06-18 | Microsoft Corporation | Method and system for processing documents with embedded fonts |
CN1573641A (en) * | 2003-06-11 | 2005-02-02 | 微软公司 | Method and apparatus for protecting electronic file area |
CN102681978A (en) * | 2012-05-15 | 2012-09-19 | 深圳市万兴软件有限公司 | Method and system for displaying text in PDF (portable document format) document |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112084388A (en) * | 2020-08-07 | 2020-12-15 | 广州力挚网络科技有限公司 | Data encryption method and device, electronic equipment and storage medium |
CN112084388B (en) * | 2020-08-07 | 2024-04-30 | 广州力挚网络科技有限公司 | Data encryption method and device, electronic equipment and storage medium |
CN113869003A (en) * | 2021-09-28 | 2021-12-31 | 泰山信息科技有限公司 | Font dynamic switching method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111460760B (en) | 2024-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109981297B (en) | Block chain processing method, device, equipment and storage medium | |
CN109214196B (en) | Data interaction method, device and equipment | |
CN107426173B (en) | File protection method and device | |
WO2018196661A1 (en) | Image processing device and method | |
KR102090982B1 (en) | How to identify malicious websites, devices and computer storage media | |
CN111190603B (en) | Private data detection method and device and computer readable storage medium | |
JP2016085609A (en) | Method for supporting secondary use of content of electronic copyrighted work, server computer for supporting secondary use of content of electronic copyrighted work, and program for server computer | |
CN112036125B (en) | Document management method and device and computer equipment | |
CN111460760A (en) | PDF document editing method and device | |
CN112559526A (en) | Data table export method and device, computer equipment and storage medium | |
CN115114599A (en) | Method, device and equipment for processing database watermark and storage medium | |
CN113961768A (en) | Sensitive word detection method and device, computer equipment and storage medium | |
US9449306B2 (en) | User identifier management | |
CN114036561A (en) | Information hiding method, information acquiring method, information hiding device, information acquiring device, storage medium and electronic equipment | |
CN111832062A (en) | Method and device for desensitizing selected area data in table file | |
CN108229137B (en) | Method and device for distributing document permission | |
CN112215015A (en) | Translation text revision method, translation text revision device, computer equipment and storage medium | |
CN109359274B (en) | Method, device and equipment for identifying character strings generated in batch | |
CN111553130A (en) | Chapter title style conversion method and device, electronic equipment and storage medium | |
CN115098877A (en) | File encryption and decryption method and device, electronic equipment and medium | |
CN112882924B (en) | Test environment building method, device, equipment and medium based on registration center | |
WO2021077862A1 (en) | File synchronization method and device | |
CN115310059A (en) | Data security processing method and device | |
CN112597851A (en) | Signature acquisition method and device, electronic equipment and storage medium | |
CN111125567A (en) | Equipment marking 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 |