CN105528333B - A kind of method and apparatus of document optimization display - Google Patents

A kind of method and apparatus of document optimization display Download PDF

Info

Publication number
CN105528333B
CN105528333B CN201510937873.XA CN201510937873A CN105528333B CN 105528333 B CN105528333 B CN 105528333B CN 201510937873 A CN201510937873 A CN 201510937873A CN 105528333 B CN105528333 B CN 105528333B
Authority
CN
China
Prior art keywords
document
file page
document file
edge
respective edges
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510937873.XA
Other languages
Chinese (zh)
Other versions
CN105528333A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201510937873.XA priority Critical patent/CN105528333B/en
Publication of CN105528333A publication Critical patent/CN105528333A/en
Application granted granted Critical
Publication of CN105528333B publication Critical patent/CN105528333B/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/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing

Abstract

Embodiments of the present invention provide a kind of method and apparatus of document optimization display, comprising: obtain document content position;According to the document content position, the part that four edges of document file page should puncture is determined;According to the identified part that should be punctured, document file page is cut out;And the original size that the document file page after cutting out is amplified to document file page is shown.In this scenario, the part that should be punctured is determined by document content position, then document file page is cut out, the present invention is due to cutting out the part that should be punctured in document file page, and the original size that the document file page after cutting out is amplified to document file page is shown, allow effective content occupancy screen as much as possible in document file page, the area of screen is farthest utilized, therefore, the utilization rate of source of screen can be significantly improved, simultaneously, it can also avoid mistake occur during amplifying PDF document or cause the defect of user's reading difficulty.

Description

A kind of method and apparatus of document optimization display
Technical field
Embodiments of the present invention are related to document processing field, more specifically, embodiments of the present invention are related to a kind of text The method and apparatus of shelves optimization display.
Background technique
Background that this section is intended to provide an explanation of the embodiments of the present invention set forth in the claims or context.Herein Description recognizes it is the prior art not because not being included in this section.
PDF (Portable Document Format, portable document format) is a kind of electronic document format, this text Part format is unrelated with operating system platform, that is to say, that PDF document is either in Windows operating system, Unix operating system Or in other operating systems be all it is general, since PDF document has the above advantages, it becomes in Internet The upper ideal document format for carrying out electronic document distribution and digital information propagation.Currently, more and more e-books, product Illustrate, company's proclamation, network data, Email etc. are widely used PDF document.
Currently, more and more users can be in intelligence since PDF document is using more and more extensive and intelligent terminal universal PDF document can be checked in terminal, for example, being read by Netease's cloud in intelligent terminal to check PDF document.
For the PDF document of scanned version, finally the presentation effect in the reading application of intelligent terminal is exactly to reality The transplanting of body book is derived from this, and in current PDF document display methods, the screen of intelligent terminal is in addition to having in display document It imitates except content, in screen edge with there is also a part of white spaces between effective content in document, as shown in Figure 1A.From Figure 1A can be seen that in the screen in intelligent terminal other than effective content of display document, and in the horizontal direction, screen hangs down There is the white space that distance is X between straight edge and effective content of document, similarly, in vertical direction, the horizontal sides of screen There is the white space that distance is Y between edge and effective content of document.
Meanwhile the prior art is the content typesetting again by PDF reordering technique to PDF document, is amplified in PDF document Content, still, if having the contents such as table, code in PDF document, amplified PDF document will appear mistake, typesetting changes Become or table be likely to the case where being isolated in the different pages, reads and bring inconvenience to user, as shown in Figure 1B, it is assumed that Initial p DF document is shown in Figure 1A, by PDF reordering technique to the content of PDF document again typesetting after, PDF document becomes figure Shown in 1B, the typesetting that can be seen that PDF document from Figure 1A to Figure 1B changes, and reads and brings inconvenience to user, reduces and reads Efficiency.
Summary of the invention
The prior art is since there are a part of white space, prior art document display methods in limited screen Have the defects that source of screen waste, and source of screen portable terminal device limited for display area is extremely important, meanwhile, The content for amplifying PDF document by PDF reordering technique haves the defects that appearance is wrong or causes user's reading difficulty, this It is very bothersome process.
Thus, it is also very desirable to a kind of improved document optimization display methods and device, so that in limited source of screen In avoid the occurrence of white space, or reduce white space ratio shared in screen, farthest utilize the face of screen Product, and then the utilization rate of source of screen is improved, while can also avoid occurring mistake during amplifying PDF document or make At the defect of user's reading difficulty.
In the present context, the method and apparatus that embodiments of the present invention are intended to provide a kind of document optimization display.
In the first aspect of embodiment of the present invention, a kind of method of document optimization display is provided, comprising: obtain text Shelves location of content;According to the document content position, the part that four edges of document file page should puncture is determined;According to really The fixed part that should be punctured, is cut out document file page;And the document file page after cutting out is amplified to document file page Original size shown.
In the second aspect of embodiment of the present invention, a kind of device of document optimization display is provided, comprising: in document Hold position acquisition module, is configured as obtaining document content position;Portion determination module is cut out, is configured as according to the document Location of content determines the part that four edges of document file page should puncture;Module is cut out, is configured as answering according to determined by The part punctured, is cut out document file page;And amplification display module, it is configured as the document file page after cutting out The original size for being amplified to document file page is shown.
The method and apparatus for the document optimization display that embodiment provides according to the present invention, can first obtain document content position It sets;According to the document content position, the part that four edges of document file page should puncture is determined;It should be cut according to identified The part dismissed, is cut out document file page;And the document file page after cutting out is amplified to the original big of document file page It is small to be shown, in this scenario, document file page contents are cut out, is finally shown in limited source of screen and cuts Document file page after sanction reduces white space to screen without also showing the white space in document file page in screen The occupancy of curtain resource, is farthest utilized the area of screen, to avoid the waste to source of screen significantly, together When, the present invention, which is that the original size that the document file page after cutting out is amplified to document file page is shown, to be reset by PDF Technology amplifies PDF document, and hence it is also possible to avoid occurring mistake amplify PDF document during or user is caused to read Read difficult defect.
Detailed description of the invention
The following detailed description is read with reference to the accompanying drawings, above-mentioned and other mesh of exemplary embodiment of the invention , feature and advantage will become prone to understand.In the accompanying drawings, if showing by way of example rather than limitation of the invention Dry embodiment, in which:
Figure 1A schematically shows the schematic diagram for the method that document according to prior art is shown;
Figure 1B schematically shows the schematic diagram of the method for document amplification display according to prior art;
Fig. 2A schematically shows the flow diagram of embodiment according to the present invention;
Fig. 2 B schematically shows the schematic diagram of the position near respective edges of embodiment according to the present invention;
Fig. 2 C schematically shows a kind of schematic diagram of the part that should be punctured of embodiment according to the present invention;
Fig. 2 D schematically shows another schematic diagram of the part that should be punctured of embodiment according to the present invention;
Fig. 3 schematically shows the schematic diagram of the device of document optimization display according to another embodiment of the present invention;
Fig. 4 schematically shows the schematic diagrames of the device of the document of another embodiment according to the present invention optimization display;
Fig. 5 schematically shows the schematic diagram of the device of the optimization display of document according to yet another embodiment of the invention;
In the accompanying drawings, identical or corresponding label indicates identical or corresponding part.
Specific embodiment
The principle and spirit of the invention are described below with reference to several illustrative embodiments.It should be appreciated that providing this A little embodiments are used for the purpose of making those skilled in the art can better understand that realizing the present invention in turn, and be not with any Mode limits the scope of the invention.On the contrary, these embodiments are provided so that this disclosure will be more thorough and complete, and energy It is enough that the scope of the present disclosure is completely communicated to those skilled in the art.
Those skilled in the art will understand that embodiments of the present invention can be implemented as a kind of system, device, equipment, Method or computer program product.Therefore, the present disclosure may be embodied in the following forms, it may be assumed that complete hardware, complete soft The form that part (including firmware, resident software, microcode etc.) or hardware and software combine.
Embodiment according to the present invention proposes a kind of method and apparatus of document optimization display.
Herein, it is to be understood that any number of elements in attached drawing be used to example rather than limit and it is any Name is only used for distinguishing, without any restrictions meaning.
Below with reference to several representative embodiments of the invention, the principle and spirit of the present invention are explained in detail.
Summary of the invention
The inventors discovered that during document display, available document content position;And according in the document Hold position, determines the part that four edges of document file page should puncture;Then, according to the identified part that should be punctured, Document file page is cut out;And show the original size that the document file page after cutting out is amplified to document file page, In this scenario, since the white space in document file page being cut out, allow effective content in document file page as far as possible More occupancy screens, is farthest utilized the area of screen, therefore, can significantly improve the utilization rate of source of screen, together When, the present invention, which is that the original size that the document file page after cutting out is amplified to document file page is shown, to be reset by PDF Technology amplifies PDF document, and hence it is also possible to avoid occurring mistake amplify PDF document during or user is caused to read Read difficult defect.
After introduced the basic principles of the present invention, lower mask body introduces various non-limiting embodiment party of the invention Formula.
Application scenarios overview
In the embodiment of the present invention, PDF document can be opened using a variety of applications, for example, reading using Netease's cloud, seeing more and read Reading, Adobe Reader, the palm read iReader etc..Method provided in an embodiment of the present invention can be used for being equipped with Netease's cloud and read It reads, sees reading more, Adobe Reader, slaps the terminal for readding the applications such as iReader.Terminal herein can be it is any it is existing, Smart phone, non-smart mobile phone, tablet computer, personal computers etc. researching and developing or research and development in the future, the present invention, which is not done, to be had Body limits.
Using the terminal of method provided in an embodiment of the present invention when opening document, can will should be cut out in document file page The position fallen punctures, and the original size that the document file page after cutting out is amplified to document file page is shown, that is to say, that Inactive portion in document file page is removed, live part is retained.
It will be understood by those skilled in the art that the application that can open PDF document described above is only reality of the invention The mode of applying can be in an example being wherein achieved.The scope of application of embodiment of the present invention is unrestricted.
Illustrative methods
Below with reference to above-mentioned application scenarios, described with reference to Fig. 2A illustrative embodiments according to the present invention for document Optimize the method for display.It should be noted that above-mentioned application scenarios be merely for convenience of understanding spirit and principles of the present invention and It shows, embodiments of the present invention are not limited in this respect.On the contrary, embodiments of the present invention can be applied to be applicable in Any scene.
Fig. 2A schematically shows the process of the method 20 for document optimization display of embodiment according to the present invention Schematic diagram.As shown in Figure 2 A, this method may include step 200,210,220 and 230.
This method starts from step 200, wherein obtaining document content position.
In practical applications, the color value that white space is followed by the region of text or picture is different, and calculates edge Start different the distance between positions with color value, if document content is misaligned, there may be multiple and different distance values, The part that lowest distance value in multiple distance values can be punctured as corresponding edge.
Therefore, in some possible embodiments, step 200, can be according to difference when obtaining document content position Color value between region determines document content position, for example, can be in the following way:
Color value situation of change from four edges of document file page on the angle detecting page of corresponding page center line respectively; And
By each edge of document file page detect greater than threshold value predetermined color value change position near The position of nearly respective edges is determined as the document content position at respective edges.
It should be noted that can refer to the smallest position of the distance between respective edges near the position of respective edges It sets, that is to say, that can be determined according to the distance between the position of chromatic aberration and respective edges parameter near corresponding The position at edge, it is of course also possible to be determined according to other parameters near the position of respective edges.
For example, participating in, for first edge, being detected at first edge greater than threshold value predetermined shown in Fig. 2 B There are first position, the second position, the third place, the 4th position and the 5th position, first position and first in the position of chromatic aberration The distance between edge is first distance, and the distance between the second position and first edge are second distance, the third place and the The distance between one edge be third distance, the distance between the 4th position and first edge be the 4th distance, the 5th position and The distance between first edge is the 5th distance, and first distance, second distance, third distance, the 4th distance and the 5th are in First distance, second distance and the 5th distance are minimum value, then any one position in first position, the 4th position and the 5th position It sets as near the position of first edge, and any one position in first position, the 4th position and the 5th position is true It is set to the document content position at first edge.
It should be noted that the present invention is not specifically limited document content, for example, for example document content may include text Word also may include picture, or also may include table etc..
After above-mentioned steps 200, step 210 can also be performed, wherein determining document according to the document content position The part that four edges of the page should puncture.
In some possible embodiments, step 210 determines document file page according to the document content position described When the part that four edges should puncture, it is alternatively possible in the following way: the document along each edge of document file page Location of content makes the first straight line for being parallel to respective edges;And it will be between the first straight line and respective edges of each edge Part be determined as the part that should be punctured at respective edges.
Such as: refering to shown in Fig. 2 C, for first edge, document content position is first position, the second position and/or the Any one position in five positions illustrates so that document content position is first position as an example, makes along first position and be parallel to the The first straight line at one edge, the part between first straight line and first edge are the part that should be punctured.It is with the first side herein It is illustrated the part that should be punctured for first edge for edge, determines that second edge, third edge and the 4th edge are opposite The part that should be punctured answered, the part that should be punctured corresponding with first edge is determined is similar, is no longer described in detail herein.
Foregoing description is directly to puncture the part between first straight line and corresponding edge, in practical applications, Further, can be mobile to respective edges by first straight line in order to realize better visual effect, the position after movement is obtained To straight line and corresponding edge between part puncture, in this way, being left white side between document content position and respective edges Away from better visual effect may be implemented.
Therefore, in some possible embodiments, document is determined according to the document content position described in step 210 When the part that four edges of the page should puncture, it is alternatively possible in the following way: along each edge of document file page Make the first straight line for being parallel to respective edges in document content position;The first straight line of each edge is translated to respective edges It is predetermined to be left white back gauge, to obtain the second straight line at respective edges;And by the second straight line of each edge and phase The part between edge is answered to be determined as the part that should be punctured at respective edges.
It is still illustrated by taking example shown in fig. 2 C as an example, the first straight line at first edge is translated in advance to first edge What is first defined is left white back gauge, to obtain the second straight line at respective edges;And by the portion between second straight line and first edge Divide the part for being determined as to puncture at respective edges, refering to shown in Fig. 2 D.
After above-mentioned steps 210, step 220 can also be performed, wherein the part that should be punctured according to determined by, right It is cut out in document file page.
Next, step 230 can be executed, wherein the document file page after cutting out to be amplified to the original size of document file page It is shown.
In some possible embodiments, it in order to show document content to greatest extent in limited screen, improves The utilization rate of source of screen, and user experience is promoted, step 230 is in the original that the document file page after cutting out is amplified to document file page When beginning size is shown, it is alternatively possible in the following way: opposite according to the width of the document file page after cutting out or height In the width of the original size of document file page or the ratio of height, amplify to document file page equal proportion after cutting out aobvious Show.In this way, the region that initially display punctures part in screen also shows document content, the face of screen is farthest utilized Product, this improves the utilization rates of source of screen, meanwhile, amplify display to document file page equal proportion after cutting out Words can also avoid mistake occur during amplifying PDF document or cause the defect of user's reading difficulty.
In the embodiment of the present invention, document content position can be first obtained;According to the document content position, documentation page is determined The part that four, face edge should puncture;According to the identified part that should be punctured, document file page is cut out;With And show the original size that the document file page after cutting out is amplified to document file page, it in this scenario, will be in document file page Appearance is cut out, and the document file page after cutting out finally is shown in limited source of screen, without will be in document file page The part that should be punctured also shown in screen, reduce the part that should puncture to the occupancy of source of screen, utmostly The area of screen is utilized in ground, so that the waste to source of screen is avoided significantly, meanwhile, the present invention is by the text after cutting out The original size that the shelves page is amplified to document file page is shown, is not to amplify PDF document by PDF reordering technique, therefore, It can also avoid mistake occur during amplifying PDF document or cause the defect of user's reading difficulty.
Example devices
After describing the method for exemplary embodiment of the invention, next, with reference to Fig. 3 to the exemplary reality of the present invention The device for document optimization display for applying mode is illustrated.
Fig. 3 schematically shows the signal of the device 30 for document optimization display of embodiment according to the present invention Figure.As shown in figure 3, the device 30 may include:
Document content position acquisition module 300, for obtaining document content position;
Portion determination module 310 is cut out, for determining that four edges of document file page are answered according to the document content position The part punctured;
Module 320 is cut out, the part for that should puncture according to determined by is cut out document file page;And
Amplify display module 330, the original size for the document file page after cutting out to be amplified to document file page is shown Show.
In practical applications, the color value that white space is followed by the region of text or picture is different, and calculates edge Start different the distance between positions with color value, if document content is misaligned, there may be multiple and different distance values, The part that lowest distance value in multiple distance values can be punctured as corresponding edge.
Therefore, in some possible embodiments, document content position acquisition module 300 includes color value detection module 300A and document content position determination module 300B, color value detection module 300A are configured as: respectively from four sides of document file page Color value situation of change of the edge on the angle detecting page of corresponding page center line;Document content position determination module 300B is matched It is set to: near phase in the position that the color value greater than threshold value predetermined that each edge of document file page is detected changes The document content position for answering the position at edge to be determined as at respective edges.
It should be noted that can refer to the smallest position of the distance between respective edges near the position of respective edges It sets, that is to say, that can be determined according to the distance between the position of chromatic aberration and respective edges parameter near corresponding The position at edge, it is of course also possible to be determined according to other parameters near the position of respective edges.
For example, participating in, for first edge, being detected at first edge greater than threshold value predetermined shown in Fig. 2 B There are first position, the second position, the third place, the 4th position and the 5th position, first position and first in the position of chromatic aberration The distance between edge is first distance, and the distance between the second position and first edge are second distance, the third place and the The distance between one edge be third distance, the distance between the 4th position and first edge be the 4th distance, the 5th position and The distance between first edge is the 5th distance, and first distance, second distance, third distance, the 4th distance and the 5th are in First distance, second distance and the 5th distance are minimum value, then any one position in first position, the 4th position and the 5th position It sets as near the position of first edge, and any one position in first position, the 4th position and the 5th position is true It is set to the document content position at first edge.
It should be noted that the present invention is not specifically limited document content, for example, for example document content may include text Word also may include picture, or also may include table etc..
In some possible embodiments, portion determination module 310 is cut out to include straight line determining module 310A and should cut Cutout portion determining module 310B, straight line determining module 310A are configured as: the document content along each edge of document file page Make the first straight line for being parallel to respective edges in position;Portion determination module 310B should be punctured to be configured as: by each edge Part between the first straight line and respective edges at place is determined as the part that should be punctured at respective edges.
Such as: refering to shown in Fig. 2 C, for first edge, document content position is first position, the second position and/or the Any one position in five positions illustrates so that document content position is first position as an example, makes along first position and be parallel to the The first straight line at one edge, the part between first straight line and first edge are the part that should be punctured.It is with the first side herein It is illustrated the part that should be punctured for first edge for edge, determines that second edge, third edge and the 4th edge are opposite The part that should be punctured answered, the part that should be punctured corresponding with first edge is determined is similar, is no longer described in detail herein.
Foregoing description is directly to puncture the part between first straight line and corresponding edge, in practical applications, Further, can be mobile to respective edges by first straight line in order to realize better visual effect, the position after movement is obtained To straight line and corresponding edge between part puncture, in this way, being left white side between document content position and respective edges Away from better visual effect may be implemented.
Therefore, in some possible embodiments, straight line determining module 310A is configured as: along each side of document file page Make the first straight line for being parallel to respective edges in document content position at edge;Cutting out portion determination module 310 further includes straight line Translation module 310C, is configured as: the first straight line of each edge is left white back gauge to respective edges translation is predetermined, To obtain the second straight line at respective edges;Portion determination module 310B should be punctured to be configured as: by the of each edge Part between two straight lines and respective edges is determined as the part that should be punctured at respective edges.
It is still illustrated by taking example shown in fig. 2 C as an example, the first straight line at first edge is translated in advance to first edge What is first defined is left white back gauge, to obtain the second straight line at respective edges;And by the portion between second straight line and first edge Divide the part for being determined as to puncture at respective edges, refering to shown in Fig. 2 D.
In some possible embodiments, it in order to show document content to greatest extent in limited screen, improves The utilization rate of source of screen, and user experience is promoted, amplification display module 330 is configured as: according to the document file page after cutting out Width or height relative to document file page original size width or height ratio, by document file page after cutting out etc. compare Amplify display to example.In this way, the region that initially display punctures part in screen also shows document content, farthest The area of screen is utilized, this improves the utilization rates of source of screen, meanwhile, document file page equal proportion after cutting out If amplifying display, it can also avoid occurring mistake during amplifying PDF document or cause user's reading difficulty Defect.
In the embodiment of the present invention, document content position can be first obtained;According to the document content position, documentation page is determined The part that four, face edge should puncture;According to the identified part that should be punctured, document file page is cut out;With And show the original size that the document file page after cutting out is amplified to document file page, it in this scenario, will be in document file page Appearance is cut out, and the document file page after cutting out finally is shown in limited source of screen, without will be in document file page The part that should be punctured also shown in screen, reduce the part that should puncture to the occupancy of source of screen, utmostly The area of screen is utilized in ground, so that the waste to source of screen is avoided significantly, meanwhile, the present invention is by the text after cutting out The original size that the shelves page is amplified to document file page is shown, is not to amplify PDF document by PDF reordering technique, therefore, It can also avoid mistake occur during amplifying PDF document or cause the defect of user's reading difficulty.
Example devices
After describing the method and apparatus of exemplary embodiment of the invention, next, introducing according to the present invention The device for document optimization display of another exemplary embodiment.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as circuit, " module " or " system ".
In some possible embodiments, the device according to the present invention for instant messaging application can include at least At least one processing unit and at least one storage unit.Wherein, the storage unit is stored with program code, when described When program code is executed by the processing unit, so that the processing unit executes above-mentioned " illustrative methods " part of this specification Described according to the present invention various illustrative embodiments for document optimization display methods in step.For example, described Processing unit can execute step 200 as shown in Figure 2 A: obtain document content position;Step 210: according in the document Hold position, determines the part that four edges of document file page should puncture;Step 220: according to the identified portion that should be punctured Point, document file page is cut out;And step 230: the document file page after cutting out is amplified to the original big of document file page It is small to be shown.
The device 10 for document optimization display of this embodiment according to the present invention is described referring to Fig. 4. The device 10 for document optimization display that Fig. 4 is shown is only an example, function to the embodiment of the present invention and should not be made With range band come any restrictions.
As shown in figure 4, the device 10 for document optimization display is showed in the form of universal computing device.It is excellent for document The component for changing the device 10 of display can include but is not limited to: at least one above-mentioned processing unit 16, at least one above-mentioned storage Unit 28, the bus 18 for connecting different system components (including storage unit 28 and processing unit 16).
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.
Storage unit 28 may include the readable medium of form of volatile memory, such as random access memory (RAM) 23 and/or cache memory 32, it can also further read-only memory (ROM) 34.
Storage unit 28 can also include program/utility 40 with one group of (at least one) program module 42, this The program module 42 of sample includes but is not limited to: operating system, one or more application program, other program modules and program It may include the realization of network environment in data, each of these examples or certain combination.
Device 10 for document optimization display (such as keyboard, can also be directed toward and set with one or more external equipments 14 Standby, bluetooth equipment etc.) communication, the friendship of device 10 that document optimization display is used for this can be also enabled a user to one or more Mutual equipment communication, and/or optimize the device 10 shown and one or more of the other calculating equipment with enabling this to be used for document Any equipment (such as the router, modem etc.) communication communicated.This communication can pass through input/output (I/O) interface 22 carries out.Also, for the device 10 of document optimization display can also by network adapter 21 and one or Multiple networks (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.As shown, net Network adapter 21 is communicated by bus 18 with other modules of the device 10 for document optimization display.Although should be understood that figure In be not shown, other hardware and/or software module can be used in conjunction with the device 10 for document optimization display, including it is but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Exemplary process product
In some possible embodiments, various aspects of the invention are also implemented as a kind of shape of program product Formula comprising program code, when described program product is run on the terminal device, said program code is for making the terminal Equipment executes described in above-mentioned " illustrative methods " part of this specification the use of various illustrative embodiments according to the present invention Step in the method for document optimization display, for example, the terminal device can execute step 200 as shown in Figure 2 A: Obtain document content position;Step 210: according to the document content position, determining that four edges of document file page should puncture Part;Step 220: according to the identified part that should be punctured, document file page being cut out;And step 230: will The original size that document file page after cutting out is amplified to document file page is shown.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, red The system of outside line or semiconductor, device or device, or any above combination.The more specific example of readable storage medium storing program for executing (non exhaustive list) includes: the electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc Read memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
As shown in figure 5, the program product 50 for document optimization display of embodiment according to the present invention is described, Can be using portable compact disc read only memory (CD-ROM) and including program code, and it can be such as a in terminal device It is run on people's computer.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be any Include or the tangible medium of storage program, the program can be commanded execution system, device or device and use or tie with it It closes and uses.
Readable signal medium may include in a base band or as the data-signal that carrier wave a part is propagated, wherein carrying Readable program code.The data-signal of this propagation can take various forms, including --- but being not limited to --- electromagnetism letter Number, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be other than readable storage medium storing program for executing it is any can Read medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Program in connection.
The program code for including on readable medium can transmit with any suitable medium, including --- but being not limited to --- Wirelessly, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind --- including local area network (LAN) or extensively Domain net (WAN)-be connected to user calculating equipment, or, it may be connected to external computing device (such as utilize Internet service Provider is connected by internet).
If it should be noted that although be referred in the above detailed description for document optimization display equipment equipment for drying or Sub-device, but this division is only not enforceable.In fact, embodiment according to the present invention, above-described two The feature and function of a or more device can embody in one apparatus.Conversely, the feature of an above-described device It can be to be embodied by multiple devices with further division with function.
In addition, although describing the operation of the method for the present invention in the accompanying drawings with particular order, this do not require that or Hint must execute these operations in this particular order, or have to carry out shown in whole operation be just able to achieve it is desired As a result.Additionally or alternatively, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/or by one Step is decomposed into execution of multiple steps.
Although detailed description of the preferred embodimentsthe spirit and principles of the present invention are described by reference to several, it should be appreciated that, this It is not limited to the specific embodiments disclosed for invention, does not also mean that the feature in these aspects cannot to the division of various aspects Combination is benefited to carry out, this to divide the convenience merely to statement.The present invention is directed to cover appended claims spirit and Included various modifications and equivalent arrangements in range.

Claims (4)

1. a kind of method of document optimization display, comprising:
Terminal obtains document content position when opening document;
According to the document content position, the part that four edges of document file page should puncture is determined;
According to the identified part that should be punctured, document file page is cut out;And
The original size that document file page after cutting out is amplified to document file page is shown;
Wherein the step of acquisition document content position includes:
Color value situation of change from four edges of document file page on the angle detecting page of corresponding page center line respectively;And
Near phase in the position that the color value greater than threshold value predetermined that each edge of document file page is detected changes The document content position for answering the position at edge to be determined as at respective edges;
The wherein the step of part that four edges of document file page should puncture is determined according to document content position packet It includes:
The first straight line for being parallel to respective edges is made along the document content position of each edge of document file page;
The first straight line of each edge is left white back gauge to respective edges translation is predetermined, to obtain at respective edges Second straight line;And
Part between the second straight line and respective edges of each edge is determined as the part that should be punctured at respective edges;
The step of wherein original size that the document file page after cutting out is amplified to document file page is shown include:
According to the width of the document file page after cutting out or height relative to the width of the original size of document file page or the ratio of height It is worth, amplifies display to the document file page equal proportion after cutting out.
2. the method as described in claim 1, wherein described determine four edges of document file page according to the document content position The step of part that place should puncture includes:
The first straight line for being parallel to respective edges is made along the document content position of each edge of document file page;And
Part between the first straight line and respective edges of each edge is determined as the part that should be punctured at respective edges.
3. a kind of device of document optimization display, comprising:
Document content position acquisition module is configured as terminal when opening document, obtains document content position;
Portion determination module is cut out, is configured as determining that four edges of document file page should be cut according to the document content position The part dismissed;
Module is cut out, the part that should be punctured according to determined by is configured as, document file page is cut out;And
Amplify display module, the original size for being configured as the document file page after cutting out being amplified to document file page is shown;
Wherein the document content position acquisition module includes:
Color value detection module is configured to the angle detecting page from four edges of document file page to corresponding page center line On color value situation of change;
Document content position determination module, be configured as detecting each edge of document file page is greater than threshold predetermined It is determined as the document content position at respective edges in the position of the color value variation of value near the position of respective edges;
Cutting out portion determination module described in wherein includes:
Straight line determining module, is configured as making along the document content position of each edge of document file page and is parallel to respective edges First straight line;
Rectilinear translation module is configured as the first straight line of each edge being left white side to respective edges translation is predetermined Away to obtain the second straight line at respective edges;And
Portion determination module should be punctured, the part being configured as between the second straight line and respective edges by each edge is true It is set to the part that should be punctured at respective edges;
Wherein the amplification display module is configured as:
According to the width of the document file page after cutting out or height relative to the width of the original size of document file page or the ratio of height It is worth, amplifies display to the document file page equal proportion after cutting out.
4. device as claimed in claim 3, cuts out portion determination module wherein described and include:
Straight line determining module, is configured as making along the document content position of each edge of document file page and is parallel to respective edges First straight line;
Portion determination module should be punctured, the part being configured as between the first straight line and respective edges by each edge is true It is set to the part that should be punctured at respective edges.
CN201510937873.XA 2015-12-15 2015-12-15 A kind of method and apparatus of document optimization display Active CN105528333B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510937873.XA CN105528333B (en) 2015-12-15 2015-12-15 A kind of method and apparatus of document optimization display

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510937873.XA CN105528333B (en) 2015-12-15 2015-12-15 A kind of method and apparatus of document optimization display

Publications (2)

Publication Number Publication Date
CN105528333A CN105528333A (en) 2016-04-27
CN105528333B true CN105528333B (en) 2019-06-07

Family

ID=55770570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510937873.XA Active CN105528333B (en) 2015-12-15 2015-12-15 A kind of method and apparatus of document optimization display

Country Status (1)

Country Link
CN (1) CN105528333B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678635A (en) * 2016-08-01 2018-02-09 广州市动景计算机科技有限公司 The webpage representation method and apparatus of electronic equipment
CN107678636A (en) * 2016-08-01 2018-02-09 广州市动景计算机科技有限公司 The webpage representation method and apparatus of electronic equipment
CN109614923B (en) * 2018-12-07 2022-06-21 上海智臻智能网络科技股份有限公司 OCR document recognition method and device
CN111414111A (en) * 2019-01-04 2020-07-14 珠海金山办公软件有限公司 Page cutting method and device
CN111832423A (en) * 2020-06-19 2020-10-27 北京邮电大学 Bill information identification method, device and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101128816A (en) * 2005-03-04 2008-02-20 微软公司 Method and system for displaying and interacting with paginated content
CN101609661A (en) * 2008-06-19 2009-12-23 富士施乐株式会社 Information display device and method for information display
CN101820489A (en) * 2009-02-27 2010-09-01 佳能株式会社 Image processing equipment and image processing method
CN101911006A (en) * 2007-10-24 2010-12-08 造型逻辑有限公司 Electronic document reader
CN103970723A (en) * 2014-05-16 2014-08-06 山西大学 Electronic document screen display method based on image detecting and cutting
CN104094586A (en) * 2012-01-31 2014-10-08 夏普株式会社 Image processing device, image formation device, image processing method, program, and memory medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143181B2 (en) * 2000-08-31 2006-11-28 Yohoo! Inc. System and method of sending chunks of data over wireless devices
US7392473B2 (en) * 2005-05-26 2008-06-24 Xerox Corporation Method and apparatus for determining logical document structure
CN102833459A (en) * 2011-06-15 2012-12-19 富士通株式会社 Image processing method, image processing device and scanner
CN103150291B (en) * 2013-01-31 2015-09-09 小米科技有限责任公司 File method for cutting edge, terminal and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101128816A (en) * 2005-03-04 2008-02-20 微软公司 Method and system for displaying and interacting with paginated content
CN101911006A (en) * 2007-10-24 2010-12-08 造型逻辑有限公司 Electronic document reader
CN101609661A (en) * 2008-06-19 2009-12-23 富士施乐株式会社 Information display device and method for information display
CN101820489A (en) * 2009-02-27 2010-09-01 佳能株式会社 Image processing equipment and image processing method
CN104094586A (en) * 2012-01-31 2014-10-08 夏普株式会社 Image processing device, image formation device, image processing method, program, and memory medium
CN103970723A (en) * 2014-05-16 2014-08-06 山西大学 Electronic document screen display method based on image detecting and cutting

Also Published As

Publication number Publication date
CN105528333A (en) 2016-04-27

Similar Documents

Publication Publication Date Title
CN105528333B (en) A kind of method and apparatus of document optimization display
JP5952428B2 (en) Borderless table detection engine
US9928225B2 (en) Formula detection engine
CN105426103B (en) Message editing method and apparatus in a kind of mobile device
US10528670B2 (en) Amendment source-positioning method and apparatus, computer device and readable medium
CN109669657B (en) Method and equipment for conducting remote document collaboration
CN104714942B (en) Method and system for the content availability for natural language processing task
KR101780905B1 (en) Method and apparatus for establishing ultra-large character library and method and apparatus for displaying character
US10146755B2 (en) Assisting users to generate desired meme in document
KR101690656B1 (en) Method and apparatus for generating media signal
WO2023226371A1 (en) Target object interactive reproduction control method and apparatus, device and storage medium
US11847812B2 (en) Image generation method and apparatus, device, and storage medium
CN109739456A (en) A kind of adaptive UI adaptation method and system
US20220392101A1 (en) Training method, method of detecting target image, electronic device and medium
CN108345440A (en) A kind of method and its device of the geometric figure auxiliary line of display addition
CN109145164A (en) Data processing method, device, equipment and medium
CN105790999A (en) Equipment configuration method and device
CN105786378B (en) A kind of method and apparatus scaling foul papers interface
CN109753644A (en) A kind of RichText Edition method, apparatus, mobile terminal and storage medium
CN109068010A (en) voice content recording method and device
CN105471998A (en) Method and device for synchronizing application data in multiple terminals
CN107741839B (en) A kind of text display method and device based on text file reader
CN107515720A (en) A kind of message treatment method, medium, device and computing device
CN105760062B (en) A kind of method and apparatus that examination question is presented
WO2022105120A1 (en) Text detection method and apparatus from image, computer device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Chen Gang

Inventor after: Gu Hongqing

Inventor after: Luo Shanghu

Inventor before: Gu Hongqing

Inventor before: Luo Shanghu

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant