Summary of the invention
The invention provides a kind of in the PDF document method and system of videotex, in order to solve in the prior art, the user is when using PDF documents editing text, system is the problem of videotex normally.
According to an aspect of the present invention, provide a kind of in the PDF document method of videotex, comprising: in PDF document system fontlib, search the font identical with text font; If search failure, then the title of font in the title of text font and the system font storehouse is mated; Obtain the highest font of title similarity degree with text font; The font videotex that use gets access to.
Wherein, in PDF document system fontlib, searching the font identical with text font comprises: in PDF document system fontlib, search the font identical with text font according to font information.
Wherein, above-mentioned font information comprises following at least a: whether the title of font, font are the type of embedded font, font, the type of coding that the coded system of font and font are supported.
Further, said method also comprises: with the man-to-man mapping of font in embedded font in the text and the PDF document system fontlib, generate mapping table; Memory map assignments; Before the title of font is mated in the title of text font and system font storehouse, also comprise:, then in mapping table, search the font corresponding with text font if in fontlib, search failure; If in mapping table, search successfully, then use the font videotex that finds; If in mapping table, search failure, then carry out the step that the title of font in the title of the font of text and the system font storehouse is mated.
Wherein, memory map assignments comprises: mapping table is stored in the PDF system font storehouse.
Wherein, the highest font of obtaining with text font of title similarity degree comprises: obtain the maximum font of like-identified that the title with text font comprises.
According to another aspect of the present invention, provide a kind of in the PDF document system of videotex, comprising: first searches module, is used for searching the font identical with text font at PDF document system fontlib; Matching module was used for when when failure of searching of searching module, and the title of font in the title of text font and the system font storehouse is mated; Acquisition module is used to obtain the highest font of title similarity degree with text font; First display module is used to use the font videotex that gets access to.
Wherein above-mentioned first searches module specifically is used for, and in PDF document system fontlib, searches the font identical with text font according to font information.
Further, said system also comprises: generation module, be used for the embedded font of text and the man-to-man mapping of font in the PDF document system fontlib, and generate mapping table; Memory module is used for memory map assignments; Second searches module, is used for searching module after fontlib is searched failure first, in mapping table, searches the font corresponding with the font of text; Second display module is used for searching module after mapping table is searched successfully second, uses the font videotex that finds; Execution module is used for searching module after mapping table is searched failure second, carries out the operation that the title of font in the title of the font of text and the system font storehouse is mated.
Wherein, above-mentioned acquisition module specifically is used for, and obtains the maximum font of like-identified that comprises in the title with text font.
Through technical scheme of the present invention, be employed in the PDF document system fontlib and search the font identical with text font; If search failure, then the title of font in the title of the font of text and the system font storehouse is mated, obtain the highest font of title similarity degree with text font; The font videotex that use gets access to.Can realize the user when PDF document inediting text, the normal purpose of videotex font, so that convenient for users to use.
Embodiment
For make above-mentioned purpose of the present invention, feature and advantage can be more obviously understandable, below in conjunction with accompanying drawing and embodiment the embodiment of the invention done further detailed explanation.
Embodiment 1
Fig. 1 is the process flow diagram of the method for videotex in the PDF document according to the embodiment of the invention 1.
As shown in Figure 1, this method may further comprise the steps:
Step 101: in PDF document system fontlib, search the font identical with text font;
In this step; Can in PDF document system fontlib, search the font identical according to font information with text font; Particularly, the information of font comprises following at least a: whether the title of font, font are the type of embedded font, font, the coded system of font and the type of coding that font is supported.
Step 102:, then the title of font in the title of the font of text and the system font storehouse is mated if search failure;
Step 103: obtain the highest font of title similarity degree with text font;
Wherein, the font that similarity degree is the highest is the maximum font of like-identified that the title with text font comprises, for example; The name of certain font is called Ariat, then the font name in this title and the PDF system font storehouse is carried out font and matees, and matches that to comprise the maximum font name of same letter with this font in the system font storehouse be Arial; Then Arial then is and the highest font of Ariat similarity degree; In addition, also the similarity degree matching list can be set in advance, can list a plurality of similar letters in this table; For example i is a pair of similar letter with l; The number of the similar font that comprises according to certain font and font in the fontlib calculates the similarity degree value of the two, when similarity degree reaches predetermined threshold value, can confirm with the highest font of font similarity degree to be identified be the font that matches.The method of videotex in the PDF document of present embodiment can solve the problem that the text that causes owing to text font information dropout can not show in the PDF document, through this matching process, can improve the efficient at PDF document inediting text.
Step 104: use the font videotex that gets access to.
Embodiment 2
Fig. 2 is the process flow diagram of the method for videotex in the PDF document according to the embodiment of the invention 2.
Step 201: start font coupling flow process;
Step 202: in PDF document system fontlib, search the font identical with text font;
Step 203:, then searching the font corresponding in the stored mapping table in advance with the font of text if in fontlib, search failure; If in mapping table, search successfully, then execution in step 205, use the font videotex that finds;
Step 204: if in mapping table, search failure, then carry out approximate match, promptly then the title of font in the title of the font of text and the system font storehouse is mated, obtain the highest font of title similarity degree with text font; If mate successfully, then execution in step 205, use the font videotex that gets access to.
Step 206: process ends.
Before carrying out above-mentioned steps; Can set up the mapping table of the font in embedded font and the PDF system font storehouse in advance, particularly, with text in embedded font and the man-to-man mapping of font in the PDF document system fontlib; Generate mapping table; Further, can also be directed against different embedded fonts, set up the mapping table of different types of embedded font.Simultaneously; For the ease of follow-up use; The mapping table of at every turn setting up is stored to PDF document system fontlib, can when follow-up use, in system font storehouse and mapping table, searches the needed font of Edit Text simultaneously like this; Improved PDF document Chinese version editor's efficient, convenient for users to use.
The method of videotex in the PDF document of present embodiment can solve owing to comprising the problem that embedded font causes text in system, can not normally show in the text.
Embodiment 3
Fig. 3 is the structured flowchart of the system of videotex in the PDF document according to the embodiment of the invention 3.
As shown in Figure 3, should in the PDF document, the system 30 of videotex comprise:
First searches module 31, is used for searching the font identical with text font at PDF document system fontlib;
Wherein, this first is searched module 31 and specifically is used for, and in PDF document system fontlib, searches the font identical with text font according to font information.
Matching module 32 was used for when when failure of searching of searching module, and the title of font in the title of the font of text and the system font storehouse is mated;
Acquisition module 33 is used to obtain the highest font of title similarity degree with text font;
This acquisition module 33 specifically is used for, and obtains the maximum font of like-identified that comprises in the title with text font.
First display module 34 is used to use the font videotex that gets access to.
Fig. 4 is the structured flowchart according to another kind system of videotex in the PDF document of the embodiment of the invention 3.
This system 40 comprises with lower module:
Generation module 41, be used for embedded font and the man-to-man mapping of font in the PDF document system fontlib of text, generate mapping table;
Memory module 42 is used for memory map assignments;
First searches module 43, is used for searching the font identical with text font at PDF document system fontlib;
Second searches module 44, is used for searching module after fontlib is searched failure first, in mapping table, searches the font corresponding with the font of text;
Second display module 45 is used for searching module after mapping table is searched successfully second, uses the font videotex that finds;
Execution module 46 is used for searching module after mapping table is searched failure second, carries out the operation that the title of font in the title of the font of text and the system font storehouse is mated.
Need to prove; In this article; Relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint relation or the order that has any this reality between these entities or the operation.And; Term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability; Thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements; But also comprise other key elements of clearly not listing, or also be included as this process, method, article or equipment intrinsic key element.Under the situation that do not having much more more restrictions, the key element that limits by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises said key element and also have other identical element.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.All any modifications of within spirit of the present invention and principle, being done, be equal to replacement, improvement etc., all be included in protection scope of the present invention.