CN108062297A - A kind of creation method, creating device and the terminal device of pdf document textview field - Google Patents

A kind of creation method, creating device and the terminal device of pdf document textview field Download PDF

Info

Publication number
CN108062297A
CN108062297A CN201711176252.XA CN201711176252A CN108062297A CN 108062297 A CN108062297 A CN 108062297A CN 201711176252 A CN201711176252 A CN 201711176252A CN 108062297 A CN108062297 A CN 108062297A
Authority
CN
China
Prior art keywords
pending page
textview field
text message
default
default object
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
Application number
CN201711176252.XA
Other languages
Chinese (zh)
Other versions
CN108062297B (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.)
Shenzhen Yitu Software Co.,Ltd.
Original Assignee
Wanxing Polytron Technologies Inc
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 Wanxing Polytron Technologies Inc filed Critical Wanxing Polytron Technologies Inc
Priority to CN201711176252.XA priority Critical patent/CN108062297B/en
Publication of CN108062297A publication Critical patent/CN108062297A/en
Application granted granted Critical
Publication of CN108062297B publication Critical patent/CN108062297B/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
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

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)
  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention is suitable for electronic document processing technology field, provides a kind of creation method, creating device and the terminal device of pdf document textview field, including:All default objects in the pending page are obtained, and obtain position of the default object in the pending page;The text message in the preset range of the default object is extracted according to position of the default object in the pending page;For the default Object Creation textview field, and using the text message as the title of the textview field.It realizes and automatically creates textview field for pdf document, solve the problems, such as that in the prior art manually addition form fields size, position be inaccurate and heavy workload.

Description

A kind of creation method, creating device and the terminal device of pdf document textview field
Technical field
The invention belongs to electronic document processing technology field more particularly to a kind of creation method of pdf document textview field, wounds Build device and terminal device.
Background technology
PDF (Portable Document Format, Portable document form) is one developed by Adobe Systems Kind is for the electronic document format of exchange files, and this file format can be applied to various operating systems, so more and more E-book, the description of product, company's proclamation, network data, Email etc. begin to use pdf document, and in many feelings Under condition, in order to pursue the stability of file and compatibility, Word file can be converted into passing again after pdf document by user It is defeated.
If the list filled in Word file comprising user in need, then such Word file is converted into After pdf document, the list in file will become not could fill out.Except non-user is that each needs the region of fill substance manual Ground adds corresponding form fields, and it is cautious be sized and position, so that them is allowed to appear at correct place. But manually form fields are added it is possible that the form fields size of addition, the problem of position is inaccurate, and this work Time-consuming, laborious, quite cumbersome, with the increase of number of documents, workload will be very big.
The content of the invention
In view of this, an embodiment of the present invention provides a kind of creation method, creating device and the terminals of pdf document textview field Equipment, to solve the problems, such as that in the prior art manually addition form fields size, position be inaccurate and heavy workload.
The first aspect of the embodiment of the present invention provides a kind of creation method method of pdf document textview field, including:
All default objects in the pending page are obtained, and obtain the default object in the pending page Position;
It is extracted according to position of the default object in the pending page in the preset range of the default object Text message;
For the default Object Creation textview field, and using the text message as the title of the textview field.
The second aspect of the embodiment of the present invention provides a kind of creating device of pdf document textview field, including:
Acquiring unit for obtaining all default objects in the pending page, and obtains the default object described Position in the pending page;
Extraction unit, for extracting the default object according to position of the default object in the pending page Preset range in text message;
Creating unit, for for the default Object Creation textview field, and using the text message as the textview field Title.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor performs the computer program The step of realizing the method that first aspect of the embodiment of the present invention provides.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the embodiment of the present invention the is realized when the computer program is executed by one or more processors On the one hand the step of the method provided.
Existing advantageous effect is the embodiment of the present invention compared with prior art:
The present invention obtains the default object and waits to locate described by obtaining all default objects in the pending page Manage the position in the page;The default of the default object is extracted according to position of the default object in the pending page In the range of text message;For the default Object Creation textview field, and using the text message as the name of the textview field Claim;Solve the problems, such as that manually addition form fields size, position be inaccurate in the prior art and heavy workload.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the realization flow diagram of the creation method of pdf document textview field provided in an embodiment of the present invention;
Fig. 2 is the reality that default object method is obtained in the creation method of pdf document textview field provided in an embodiment of the present invention Existing flow diagram;
Fig. 3 is the reality that default object method is obtained in the creation method of pdf document textview field provided in an embodiment of the present invention Existing flow diagram;
Fig. 4 is the realization that the creation method of pdf document textview field provided in an embodiment of the present invention obtains default object method Flow diagram;
Fig. 5 is the schematic diagram of the creating device of pdf document textview field provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific embodiment
In being described below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specifically The present invention can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity Road and the detailed description of method, in case unnecessary details interferes description of the invention.
It it should be appreciated that ought be special described by the instruction of term " comprising " use in this specification and in the appended claims Sign, entirety, step, operation, the presence of element and/or component, but be not precluded from one or more of the other feature, entirety, step, Operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combinations and all possible combinations of one or more of the associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Fig. 1 is the realization flow diagram of the creation method of pdf document textview field provided in an embodiment of the present invention, as schemed institute It states, the method may include following steps:
Step S101 obtains all default objects in the pending page, and obtains the default object and wait to locate described Manage the position in the page.
Wherein, the pending page can be the page for needing to create textview field in pdf document, in practical applications, at least There are the pending pages of one page, can handle the pending page of every page respectively according to page number order, can also handle institute simultaneously The pending page having.If handling the pending page of every page respectively according to page number order, the institute in the pending page is obtained There is default object to refer to obtain all default objects in the currently pending page;If all pending pages are handled simultaneously Face obtains all default objects in the pending page and refers to obtain all default pairs in the pending page of every page respectively As.In other words, it is necessary to be grouped according to the pending page to default object, it is impossible to not pre- in the same pending page If object is handled.
Wherein, presetting object includes following any one:Cell, horizontal line, radio box, check box.Need what is illustrated It is that default object includes but not limited to each object listed above, is not specifically limited herein.
Step S102 extracts the pre- of the default object according to position of the default object in the pending page If the text message in scope.
Wherein, the preset range for presetting object can be it is artificial preset, including:The inside of default object is preset The surface of object, the front of default object, the left side of default object, the top of default object, default object underface, The dead astern of default object.It should be noted that the preset range of default object includes but not limited to each model listed above It encloses, is not specifically limited herein.In practical applications, it is necessary to be set according to actual conditions the preset range of default object, for example, Default object is cell, can set the preset range of default object as the left side of cell or the top of cell.It needs Illustrate, in order to meet conventional reading habit, user is facilitated to read pdf document, the preset range of the default object can Be with face the visual angle of the user of pdf document come it is definite.
Step S103 is the default Object Creation textview field, and using the text message as the name of the textview field Claim.
Optionally, it is described to obtain in the pending page if the default object to be obtained is cell referring to Fig. 2 All default objects, including:
Step S201 obtains all lines in the pending page, to all lines in the pending page It is pre-processed, and the division form of the overlapping relation based on the pretreated lines.
Wherein, pretreatment can include any one of following:Classification, duplicate removal, connection, sequence.It should be noted that pretreatment Various processing methods including but not limited to listed above, are not specifically limited herein.
In practical applications, all line classifications got, duplicate removal, connection, sequence are first done into standard for identification form It is standby.Overlapping relation division form based on the pretreated lines can be the line that will intersect or be indirectly connected directly with one another Item is divided into same form, that is, identifies form.
Step S202 determines table border line of the lines being divided into same form with the presence or absence of closing.
In practical applications, after form is identified, also need to judge whether this form is effective form, it can be by determining The lines being divided into same form judge with the presence or absence of the mode of the table border line of closing.If it is divided into same form There is the table border line of closing in interior lines, then it is effective form to illustrate the form identified;If it is divided into same form For interior lines there is no the table border line of closing, then it is invalid form to illustrate the form identified.
Step S203 if the lines being divided into same form have the table border line of closing, obtains the form Cell.
In practical applications, it is necessary to find out list out of this effective form after the form for determining to identify is effective form First lattice can find cell by way of confirming the lines in effective form with the presence or absence of the form line of closing. After finding out cell, also need to determine the ranks span of each cell, in order to determine the size of textview field.Need what is illustrated It is that the form line of closing is different from the table border line closed, the table border line of closing can be the line for forming table border Item, the form line of closing can be the lines of form Inner Constitution cell.
Further, the default object is extracted in the position according to the default object in the pending page Preset range in text message, including:
Whether judge inside the cell comprising text message;
If not including text message inside the cell, it is adjacent to extract the cell in the pending page Cell in text message.
In practical applications, if comprising text message inside cell, illustrate need not to be that the cell creates text This domain;If not including text message in cell, illustrate to need to create textview field for the cell.Create textview field it Before, it is thus necessary to determine that the textview field title of the cell, i.e., in the pending page in the adjacent cell of extraction unit lattice Text message.The adjacent cell of cell can be the cell of on the left of cell or top.It is adjacent in extraction unit lattice Cell text message after, textview field is created for the cell, and using the text message of extraction as text domain Title.
Optionally, if the default object to be obtained is horizontal line, it is in the lines for determining to be divided into same form After the no table border line that there is closing, further include:
Step S204 if the lines being divided into same form have the table border line of closing, obtains the form Inside it is not belonging to the horizontal line of closing form line.
In practical applications, table border line of the lines being divided into same form with the presence or absence of closing is determined, if drawing The table border line that the lines in same form have closing is assigned to, then it is effective form to illustrate the form;In effective form There may be the cell for needing to create textview field, there may also be the horizontal lines for needing establishment textview field.In effective form If there is the form line of closing, then illustrate that there are cells in effective form;If there is not closing in effective form Form line, there may be horizontal lines in these form lines do not closed.So after effective form is identified, it can also be from this The horizontal line for being not belonging to closing form line is obtained in effective form.
Further, the default object is extracted in the position according to the default object in the pending page Preset range in text message, including:
According to the front position of horizontal line described in location determination of the horizontal line in the pending page Or position directly below;
Extract the text message on the front position or position directly below of the horizontal line;
Described is the default Object Creation textview field, and using the text message as the title of the textview field, bag It includes:
Textview field is created in the top of position of the horizontal line in the pending page, so that the textview field Width and the horizontal line equal length;
Using the text message as the title of the textview field;
The horizontal line includes:Horizontal route object, continuous underscore character.
In practical applications, continuous underscore character can also regard horizontal line as.It obtains in the pending page All lines include:Obtain all lines in the pending page, all continuous underscore words in the pending page of acquisition Symbol.Continuous underscore character is specifically made of several continuous underscore characters and can not be limited herein taking human as presetting It is fixed.
In addition, in practical applications, if the default object obtained is check box, since check box can be regarded as one The form of very little, so the creation method of check box textview field may be referred to step S101-S103 and S201- in pdf document Method described in S203.
For the creation method in PDF file digital signature domain, institute in step S101-S103 and S201-S204 is referred to The creation method for the pdf document textview field stated, unlike, it is to make the text message extracted in the creation method of textview field For the title of textview field, and it is text message using predetermined keyword is included in the creation method in digital signature domain as text The title in domain.For example, in English pdf document, predetermined keyword can be set to " signature ", will include Title of the text message of " signature " as textview field;In Chinese pdf document, predetermined keyword can be set to " label Name ", will include the title of the text message as textview field of " signature ".
The embodiment of the present invention obtains the default object in institute by obtaining all default objects in the pending page State the position in the pending page;The default object is extracted according to position of the default object in the pending page Preset range in text message;For the default Object Creation textview field, and using the text message as the text The title in domain;It realizes and automatically generates cell textview field and horizontal line textview field for pdf document, solve in the prior art Manually addition form fields size, position be inaccurate and the problem of heavy workload.
Fig. 3 is the realization flow diagram of the creation method for the pdf document textview field that further embodiment of this invention provides, such as Shown in figure, if the default object obtained is radio box, all default objects obtained in the pending page further include:
Step S301 obtains all roads being made of four sections of end to end Beziers in the pending page Footpath object.
In practical applications, judge path objects whether by four sections of end to end Beziers form can include with Lower step:Whether the point for judging to form path objects is 13;If forming the point of path objects as 13, the path is judged Whether whether the starting point of object include comprising Move To marks, remaining point comprising Bezier To marks, terminal Close Figure indicate.Wherein, Move To marks, Bezier To marks, Close Figure marks can be in program Instruction.
Step S302 judges whether each section of Bezier in the path objects is 1/4 arc section.
Step S303, if each section of Bezier of the path objects is 1/4 arc section, by the path pair As being defined as first kind radio box, and obtain the first kind radio box.
Further, the default object is extracted in the position according to the default object in the pending page Preset range in text message, including:
According to first kind radio box described in location determination of the first kind radio box in the pending page just Rear position;
Extract the text message on the dead astern position of the first kind radio box;
Described is the default Object Creation textview field, and using the text message as the title of the textview field, tool Body is:
Textview field is created for the first kind radio box, and using the text message as the title of the textview field.
Step S304, if abandoning the path in the presence of the Bezier for not being 1/4 arc section in the path objects Object.
Optionally, it is described to obtain owning in the pending page if the default object obtained is radio box referring to Fig. 4 Default object, further includes:
Step S401 obtains all text objects in the pending page;
Step S402 judges to whether there is preset characters in the text object;
The character definition is the second class radio box if there are preset characters in the text object by step S403, and Obtain the second class radio box.
In practical applications, preset characters can be that character shape is the circular or Unicode identical with radio box shape Code or ASCII character.In other words, the shape of some text objects is circular or, such text object identical with radio box shape, Such as Unicode codes, ASCII character, radio box can be regarded as.It should be noted that preset characters are not limited to Unicode, ASCII Code, is not especially limited herein.
Further, the default object is extracted in the position according to the default object in the pending page Preset range in text message, be specially:
The adjacent bit of the second class radio box is extracted according to position of the second class radio box in the pending page The text message put;
Described is the default Object Creation textview field, and using the text message as the title of the textview field, tool Body is:
Textview field is created for the second class radio box, and using the text message as the title of the textview field.
Wherein, the adjacent position of the second class radio box can be included any one of following:The Front, dead astern, surface, the underface of two class radio boxes.It is not specifically limited herein.
Further, for the default Object Creation textview field, and using the text message as the textview field After title, including:
The radio box is grouped according to position of the radio box in the pending page.
In practical applications, it is title category in order to ensure the radio box textview field in same group radio box to be grouped Uniterming mutual exclusion in same category and/or same group.Such as:In effective form, text message " payment frequency " is residing The dead astern of position is arranged in sequence with 3 radio boxes, and the title of each radio box textview field is respectively " daily ", " monthly ", " often Year ";This 3 radio boxes can be divided into one group according to this position of 3 radio boxes in the pending page, this 3 radio boxes The title of textview field belongs to same category, i.e. " payment frequency ", and this 3 uniterming mutual exclusions.
The embodiment of the present invention obtains the default object in institute by obtaining all default objects in the pending page State the position in the pending page;The default object is extracted according to position of the default object in the pending page Preset range in text message;For the default Object Creation textview field, and using the text message as the text The title in domain;It realizes and automatically generates radio box textview field for pdf document, it is big to solve artificial addition form fields in the prior art Small, position is inaccurate and the problem of heavy workload.
It is to be understood that the size of the sequence number of each step is not meant to the priority of execution sequence, each process in above-described embodiment Execution sequence should determine that the implementation process without tackling the embodiment of the present invention forms any limit with its function and internal logic It is fixed.
Fig. 5 is the schematic diagram of the creating device of pdf document textview field provided in an embodiment of the present invention, for convenience of description, It illustrates only and the relevant part of the embodiment of the present invention.
The creating device 5 of the pdf document textview field includes:
Acquiring unit 51 for obtaining all default objects in the pending page, and obtains the default object in institute State the position in the pending page;
Extraction unit 52, for described default pair of the position extraction according to the default object in the pending page Text message in the preset range of elephant;
Creating unit 53, for for the default Object Creation textview field, and using the text message as the text The title in domain.
Optionally, the acquiring unit 51 includes:
Preprocessing module, for obtaining all lines in the pending page, to the institute in the pending page There are lines to be pre-processed, and the division form of the overlapping relation based on the pretreated lines;
Determining module, for determining table border line of the lines being divided into same form with the presence or absence of closing;
Cell acquisition module if the lines for being divided into same form have the table border line of closing, obtains Take the cell of the form;
Further, the extraction unit 52 includes:
Judgment module, for whether judging inside the cell comprising text message;
Extraction module if for not including text message inside the cell, extracts in the pending page Text message in the adjacent cell of the cell.
Optionally, the acquiring unit 51 further includes:
Horizontal line acquisition module, for the form side in the lines for determining to be divided into same form with the presence or absence of closing After wire, if the lines being divided into same form have the table border line do not closed, obtain and do not belong in the form In the horizontal line of closing form line;
The horizontal line includes:Horizontal route object, continuous underscore character.
Optionally, the acquiring unit 51 further includes:
Path objects acquisition module, it is all by four sections of end to end Bezier in the pending page for obtaining The path objects of curve composition;
Arc section judgment module, for judging whether each section of Bezier in the path objects is 1/4 circular arc Section;
First definition module, if being 1/4 arc section for each section of Bezier of the path objects, by institute It states path objects and is defined as first kind radio box, and obtain the first kind radio box;
Discard module, if in the path objects exist be not 1/4 arc section Bezier, abandon described in Path objects.
Optionally, the acquiring unit 51 further includes:
Text object acquisition module, for obtaining all text objects in the pending page;
Code value judgment module, for judging to whether there is preset characters in the text object;
Second definition module, if in the text object there are preset characters, be the second class by the character definition Radio box, and obtain the second class radio box.
Further, the creating device 5 further includes:
Grouped element, for for the default Object Creation textview field, and using the text message as the text After the title in domain, the radio box is grouped according to position of the radio box in the pending page.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each work( Can unit, module division progress for example, in practical application, can be as needed and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device are divided into different functional units or module, more than completion The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used To be that unit is individually physically present, can also two or more units integrate in a unit, it is above-mentioned integrated The form that hardware had both may be employed in unit is realized, can also be realized in the form of SFU software functional unit.In addition, each function list Member, the specific name of module are not limited to the protection domain of the application also only to facilitate mutually distinguish.Above system The specific work process of middle unit, module may be referred to the corresponding process in preceding method embodiment, and details are not described herein.
Fig. 6 is the schematic diagram of terminal device provided in an embodiment of the present invention.As shown in fig. 6, the terminal device 6 of the embodiment Including:Processor 60, memory 61 and it is stored in the calculating that can be run in the memory 61 and on the processor 60 Machine program 62.The processor 60 realizes the establishment side of above-mentioned each pdf document textview field when performing the computer program 62 Step in method embodiment, such as step S101 to S107 shown in FIG. 1.Alternatively, the processor 60 performs the computer The function of each module/unit in above-mentioned each device embodiment, such as the function of module 51 to 53 shown in Fig. 5 are realized during program 62.
Illustratively, the computer program 62 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 61, and are performed by the processor 60, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 62 in the terminal device 6 is described.For example, the computer program 62 can be divided Acquiring unit, extraction unit, creating unit are cut into, each unit concrete function is as follows:
Acquiring unit for obtaining all default objects in the pending page, and obtains the default object described Position in the pending page;
Extraction unit, for extracting the default object according to position of the default object in the pending page Preset range in text message;
Creating unit, for for the default Object Creation textview field, and using the text message as the textview field Title.
Optionally, the acquiring unit includes:
Preprocessing module, for obtaining all lines in the pending page, to the institute in the pending page There are lines to be pre-processed, and the division form of the overlapping relation based on the pretreated lines;
Determining module, for determining table border line of the lines being divided into same form with the presence or absence of closing;
Cell acquisition module if the lines for being divided into same form have the table border line of closing, obtains Take the cell of the form;
Further, the extraction unit includes:
Judgment module, for whether judging inside the cell comprising text message;
Extraction module if for not including text message inside the cell, extracts in the pending page Text message in the adjacent cell of the cell.
Optionally, the acquiring unit further includes:
Horizontal line acquisition module, for the form side in the lines for determining to be divided into same form with the presence or absence of closing After wire, if the lines being divided into same form have the table border line do not closed, obtain and do not belong in the form In the horizontal line of closing form line;
The horizontal line includes:Horizontal route object, continuous underscore character.
Optionally, the acquiring unit further includes:
Path objects acquisition module, it is all by four sections of end to end Bezier in the pending page for obtaining The path objects of curve composition;
Arc section judgment module, for judging whether each section of Bezier in the path objects is 1/4 circular arc Section;
First definition module, if being 1/4 arc section for each section of Bezier of the path objects, by institute It states path objects and is defined as first kind radio box, and obtain the first kind radio box;
Discard module, if in the path objects exist be not 1/4 arc section Bezier, abandon described in Path objects.
Optionally, the acquiring unit further includes:
Text object acquisition module, for obtaining all text objects in the pending page;
Code value judgment module, for judging to whether there is preset characters in the text object;
Second definition module, if in the text object there are preset characters, be the second class by the character definition Radio box, and obtain the second class radio box.
Further, the creating device further includes:
Grouped element, for for the default Object Creation textview field, and using the text message as the text After the title in domain, the radio box is grouped according to position of the radio box in the pending page.
The terminal device 6 can be that the calculating such as desktop PC, notebook, palm PC and cloud server are set It is standby.The terminal device may include, but be not limited only to, processor 60, memory 61.It will be understood by those skilled in the art that Fig. 6 The only example of terminal device 6 does not form the restriction to terminal device 6, can include than illustrating more or fewer portions Part either combines some components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 61 can be the internal storage unit of the terminal device 6, such as the hard disk of terminal device 6 or interior It deposits.The memory 61 can also be the External memory equipment of the terminal device 6, such as be equipped on the terminal device 6 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 61 can also both include the storage inside list of the terminal device 6 Member also includes External memory equipment.The memory 61 is used to store needed for the computer program and the terminal device Other programs and data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
In the above-described embodiments, all emphasize particularly on different fields to the description of each embodiment, be not described in detail or remember in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may realize that each exemplary lists described with reference to the embodiments described herein Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is performed with hardware or software mode, specific application and design constraint depending on technical solution.Professional technician Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, is only a kind of division of logic function, there can be other dividing mode in actual implementation, such as Multiple units or component may be combined or can be integrated into another system or some features can be ignored or does not perform.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be by some interfaces, device Or the INDIRECT COUPLING of unit or communication connection, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical location, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be employed in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit realized in the form of SFU software functional unit and be independent production marketing or In use, it can be stored in a computer read/write memory medium.Based on such understanding, the present invention realizes above-mentioned implementation All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method..Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or some intermediate forms etc..Computer-readable Jie Matter can include:Can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, Magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It is it should be noted that described The content that computer-readable medium includes can carry out appropriate increasing according to legislation in jurisdiction and the requirement of patent practice Subtract, such as in some jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and Telecommunication signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to foregoing each Technical solution recorded in embodiment modifies or carries out equivalent substitution to which part technical characteristic;And these are changed Or replace, the essence of appropriate technical solution is not made to depart from the spirit and scope of various embodiments of the present invention technical solution, it should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of creation method of pdf document textview field, which is characterized in that including:
All default objects in the pending page are obtained, and obtain position of the default object in the pending page It puts;
The text in the preset range of the default object is extracted according to position of the default object in the pending page This information;
For the default Object Creation textview field, and using the text message as the title of the textview field.
2. the creation method of pdf document textview field as described in claim 1, which is characterized in that described to obtain the pending page Interior all default objects, including:
All lines in the pending page are obtained, all lines in the pending page are pre-processed, and Overlapping relation division form based on the pretreated lines;
Determine table border line of the lines being divided into same form with the presence or absence of closing;
If the lines being divided into same form have the table border line of closing, the cell of the form is obtained;
It extracts in the preset range of the default object position according to the default object in the pending page Text message, including:
Whether judge inside the cell comprising text message;
If not including text message inside the cell, the adjacent list of the cell is extracted in the pending page Text message in first lattice.
3. the creation method of pdf document textview field as claimed in claim 2, which is characterized in that determining to be divided into same table After lines in lattice whether there is the table border line of closing, further include:
If the lines being divided into same form have the table border line of closing, obtain and closing table is not belonging in the form The horizontal line of ruling;
The horizontal line includes:Horizontal route object, continuous underscore character.
4. the creation method of pdf document textview field as described in claim 1, which is characterized in that described to obtain the pending page Interior all default objects, further include:
Obtain all path objects being made of four sections of end to end Beziers in the pending page;
Judge whether each section of Bezier in the path objects is 1/4 arc section;
If each section of Bezier of the path objects is 1/4 arc section, the path objects are defined as first Class radio box, and obtain the first kind radio box;
If the path objects are abandoned in the presence of the Bezier for not being 1/4 arc section in the path objects.
5. the creation method of pdf document textview field as described in claim 1, which is characterized in that described to obtain the pending page Interior all default objects, further include:
Obtain all text objects in the pending page;
Judge to whether there is preset characters in the text object;
If it is the second class radio box by the character definition, and obtains described second there are preset characters in the text object Class radio box.
6. the creation method of pdf document textview field as described in claim 4 or 5, which is characterized in that for the default object Create textview field, and using the text message as the title of the textview field after, including:
The radio box is grouped according to position of the radio box in the pending page.
7. a kind of creating device of pdf document textview field, which is characterized in that including:
Acquiring unit for obtaining all default objects in the pending page, and obtains the default object and waits to locate described Manage the position in the page;
Extraction unit, for extracting the pre- of the default object according to position of the default object in the pending page If the text message in scope;
Creating unit, for for the default Object Creation textview field, and using the text message as the name of the textview field Claim.
8. the creating device of pdf document textview field as claimed in claim 7, which is characterized in that the acquiring unit includes:
Preprocessing module, it is wired to the institute in the pending page for obtaining all lines in the pending page Item is pre-processed, and the division form of the overlapping relation based on the pretreated lines;
Determining module, for determining table border line of the lines being divided into same form with the presence or absence of closing;
Acquisition module if the lines for being divided into same form have the table border line of closing, obtains the form Cell;
The extraction unit includes:
Judgment module, for whether judging inside the cell comprising text message;
Extraction module, if for not including text message inside the cell, in the pending page described in extraction Text message in the adjacent cell of cell.
9. a kind of terminal device, including memory, processor and it is stored in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 6 when performing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of realization such as any one of claim 1 to 6 the method.
CN201711176252.XA 2017-11-22 2017-11-22 PDF file text field creating method and device and terminal equipment Active CN108062297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711176252.XA CN108062297B (en) 2017-11-22 2017-11-22 PDF file text field creating method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711176252.XA CN108062297B (en) 2017-11-22 2017-11-22 PDF file text field creating method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN108062297A true CN108062297A (en) 2018-05-22
CN108062297B CN108062297B (en) 2021-06-15

Family

ID=62134998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711176252.XA Active CN108062297B (en) 2017-11-22 2017-11-22 PDF file text field creating method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN108062297B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030028451A1 (en) * 2001-08-03 2003-02-06 Ananian John Allen Personalized interactive digital catalog profiling
US20140195347A1 (en) * 2013-01-08 2014-07-10 American Express Travel Related Services Company, Inc. Method, system, and computer program product for business designation
CN104063364A (en) * 2013-03-19 2014-09-24 福建福昕软件开发股份有限公司北京分公司 PDF document recognition method
CN104462160A (en) * 2013-09-25 2015-03-25 北大方正集团有限公司 Method and system for editing formula
CN105988996A (en) * 2015-01-27 2016-10-05 腾讯科技(深圳)有限公司 Index file generation method and device
CN107291919A (en) * 2017-06-28 2017-10-24 四川妥妥递科技有限公司 A kind of system and method for add fields online in pdf document

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030028451A1 (en) * 2001-08-03 2003-02-06 Ananian John Allen Personalized interactive digital catalog profiling
US20140195347A1 (en) * 2013-01-08 2014-07-10 American Express Travel Related Services Company, Inc. Method, system, and computer program product for business designation
CN104063364A (en) * 2013-03-19 2014-09-24 福建福昕软件开发股份有限公司北京分公司 PDF document recognition method
CN104462160A (en) * 2013-09-25 2015-03-25 北大方正集团有限公司 Method and system for editing formula
CN105988996A (en) * 2015-01-27 2016-10-05 腾讯科技(深圳)有限公司 Index file generation method and device
CN107291919A (en) * 2017-06-28 2017-10-24 四川妥妥递科技有限公司 A kind of system and method for add fields online in pdf document

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XIN TAO 等: ""Logical Labeling of Fixed Layout PDF Documents Using Multiple Contexts"", 《2014 11TH IAPR INTERNATIONAL WORKSHOP ON DOCUMENT ANALYSIS SYSTEMS》 *
边巴次仁 等: "" 用Acrobat制作PDF文档格式的科室报告系统"", 《西藏科技》 *

Also Published As

Publication number Publication date
CN108062297B (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112035667B (en) Knowledge graph display method and device and terminal equipment
CN107885499A (en) A kind of interface document generation method and terminal device
CN107590291A (en) A kind of searching method of picture, terminal device and storage medium
CN108628811A (en) The matching process and device of address text
CN104517112A (en) Table recognition method and system
CN109408113A (en) A kind of code text processing method, system and terminal device
CN107784063B (en) Algorithm generation method and terminal equipment
CN104915334A (en) Automatic extraction method of key information of bidding project based on semantic analysis
CN108376364A (en) A kind of method, equipment and the terminal device of payment system reconciliation
CN107463683A (en) The naming method and terminal device of code element
CN107578659A (en) Electronic title generation method and device and terminal
CN103500332B (en) Character displaying method and device in picture
CN110020312A (en) The method and apparatus for extracting Web page text
CN108446968A (en) A kind of method, apparatus and terminal device of accounting entry
CN108038093A (en) PDF text extraction methods and device
CN110110213A (en) Excavate method, apparatus, computer readable storage medium and the terminal device of user's occupation
CN110263791A (en) A kind of method and apparatus in identification function area
CN107402999A (en) Scene data storehouse method for building up and device
CN107748772A (en) A kind of brand recognition method and device
CN114092948A (en) Bill identification method, device, equipment and storage medium
CN110135814A (en) The correlating method of BIM and project data, system and terminal device
CN113836272A (en) Key information display method and system, computer equipment and readable storage medium
Kucher et al. Analysis of VINCI 2009-2017 proceedings
CN107783953A (en) Information input method and terminal device
CN108256005A (en) Internet product monitoring method and terminal device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 850000 No.2, floor 6, unit 2, building 8, east of Liuwu building, west of East Ring Road, north of 1-4 Road, south of 1-3 Road, east of Liuwu building, Lhasa City, Tibet Autonomous Region

Applicant after: Wanxing Technology Group Co.,Ltd.

Address before: 850000 No.2, floor 6, unit 2, building 8, east of Liuwu building, west of East Ring Road, north of 1-4 Road, south of 1-3 Road, east of Liuwu building, Lhasa City, Tibet Autonomous Region

Applicant before: WONDERSHARE TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210415

Address after: 518000 a1204, building 11, Shenzhen Bay science and technology ecological park, No.16, Keji South Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Yitu Software Co.,Ltd.

Address before: 850000 No.2, floor 6, unit 2, building 8, east of Liuwu building, west of East Ring Road, north of 1-4 Road, south of 1-3 Road, east of Liuwu building, Lhasa City, Tibet Autonomous Region

Applicant before: Wanxing Technology Group Co.,Ltd.

GR01 Patent grant
GR01 Patent grant