METHOD FOR CREATING GARBLED PDF TEXT
20180352104 ยท 2018-12-06
Inventors
Cpc classification
G06F21/10
PHYSICS
G06F21/6209
PHYSICS
International classification
H04N1/00
ELECTRICITY
Abstract
A method for creating a garbled PDF text comprises the following steps: upon creating a PDF document or saving the PDF document as a new document, embedding a PDF font in the created or newly saved PDF document (S110); using a random encoding method to change an embedded PDF font code such that it maps to a Unicode dictionary (S120); and converting codes in text content of the PDF document into random codes (S130).
Claims
1. A method for creating a garbled PDF text, comprising the following steps: when a PDF document is created, or the PDF document is newly saved as a new document, embedding a PDF font(s) in the created or newly saved PDF document; changing a ToUnicode mapping dictionary for codes of the embedded PDF font(s), by random encoding; and converting codes for a text content of the PDF document into random codes according to the changed ToUnicode mapping dictionary.
2. The method for creating a garbled PDF text according to claim 1, wherein the random codes are meaningless scrambled numerical codes.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0011] To illustrate the technical solution in embodiments of the present disclosure or in the prior art more clearly, the accompanying drawings for describing the embodiments or the prior art are introduced briefly in the following. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. Persons of ordinary skill in the art can obtain other drawings according to the accompanying drawings without paying any creative efforts.
[0012]
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0013] The technical solutions in the embodiments of the present disclosure will be clearly and fully described below with reference to the accompanying drawings in the embodiments of the present disclosure. It is obvious that the embodiments to be described are only a part rather than all of the embodiments of the present disclosure. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without making creative efforts should fall within the protection scope of the present disclosure.
[0014]
[0015] S110. when a PDF document is created, or the PDF document is newly saved as a new document, embedding a PDF font(s) in the created or newly saved PDF document;
[0016] S120. changing a ToUnicode mapping dictionary for codes of the embedded PDF font(s), by random encoding; and
[0017] S130. converting codes for a text content of the PDF document into random codes according to the changed ToUnicode mapping dictionary.
[0018] For example, the random codes may be meaningless scrambled numerical codes. In this way, by means of changing code mapping in a font library, stealers cannot find a Unicode code of a text content of the document from the font library, and can only find meaningless internal codes such as 01 and 02.
[0019] A specific process according to a preferred embodiment of the present disclosure is as follows:
[0020] 1. when a PDF document is created, or is newly saved as a new document, embedding a PDF font(s).
[0021] 2. changing a ToUnicode mapping dictionary for codes of the embedded PDF font(s), by random encoding.
[0022] 3. converting codes for a text content of the PDF document into random codes.
[0023] In the foregoing embodiment, after a character-font mapping relationship is changed, a PDF text can still be displayed as usual, although it cannot be normally mapped to a Unicode code. Users have to construct Unicode codes if stealing PDF content by using a computer (operations such as copy and cut). Therefore, business costs may increase greatly. The present disclosure is aimed at further protecting text content of PDF documents and increasing the difficulty in maliciously copying and commercially stealing texts of the PDF documents. By using a technology of the present disclosure, the users can share some of their documents over the Internet without any step of encryption.
[0024] Persons skilled in the art may understand that a drawing is merely a schematic diagram of an embodiment, and a module or procedure in the drawing is not necessarily mandatory to implement the present disclosure.
[0025] Persons of ordinary skill in the art may understand that modules in an apparatus in an embodiment may be distributed in the apparatus in the embodiment according to embodiment description, and may also be correspondingly changed and located in one or more apparatuses different from that in the embodiment. The modules in the embodiment may be combined into one module, and may also be divided into a plurality of submodules.
[0026] Finally, it should be noted that the above embodiment is merely provided for describing the technical solution of the present disclosure, but not intended to limit the present disclosure. It should be understood by persons of ordinary skill in the art that although the present disclosure has been described in detail with reference to the foregoing embodiment, modifications can be made to the technical solution described in the foregoing embodiment, or equivalent replacements can be made to some technical features in the technical solution, as long as such modifications or replacements do not cause the essence of the corresponding technical solution to depart from the spirit and scope of the technical solution in the embodiment of the present disclosure.