CN109445652A - A kind of PDF document display methods and terminal device - Google Patents
A kind of PDF document display methods and terminal device Download PDFInfo
- Publication number
- CN109445652A CN109445652A CN201811122297.3A CN201811122297A CN109445652A CN 109445652 A CN109445652 A CN 109445652A CN 201811122297 A CN201811122297 A CN 201811122297A CN 109445652 A CN109445652 A CN 109445652A
- Authority
- CN
- China
- Prior art keywords
- image
- display
- character
- area
- monocase
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04842—Selection of displayed objects or displayed text elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04847—Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04806—Zoom, i.e. interaction techniques or interactors for controlling the zooming operation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present invention provides a kind of PDF document display methods and terminal devices, suitable for technical field of data processing, this method comprises: when calculating according to the preset loading page display for scaling rule for the first image scaling in PDF document to entire PDF, the area of maximum closing white space in the first image;The display size for filtering out single character in the first image is less than the character block of preset monocase display size;Display area needed for calculating character block based on monocase display size;If display area is less than the area of maximum closing white space, by the character in character block to load on maximum closing white space not less than monocase display size after, show the first image.The embodiment of the present invention ensure that normal reading of the user to the first image in PDF document including character.
Description
Technical field
The invention belongs to technical field of data processing more particularly to PDF document display methods and terminal devices.
Background technique
The prior art is all that PDF document is directly zoomed to it to add in display screen when showing to PDF document
It carries page size size to be shown, but in actual conditions, since loading page small must be equal to display screen size, for one
For a little lesser terminal devices of display screen size such as mobile phone, if being only merely to be amplified to loading page size, user
Or the content of normal reading PDF document can be difficult to, especially to embedded with comprising character image (have character content on image,
Such as one include distich photo) PDF document for, PDF document is simply zoomed into display screen size size more
It not can guarantee to image and the wherein display effect of character, so that user can not normal reading PDF document.Therefore, the prior art
It is poor to the Zoom display effect of PDF document, it is difficult to guarantee normal reading of the user to the image in PDF document including character.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of PDF document display methods and terminal device, to solve existing skill
It is poor to the Zoom display effect of PDF document in art, it is difficult to guarantee normal reading of the user to the image in PDF document including character
The problem of.
The first aspect of the embodiment of the present invention provides a kind of PDF document display methods, comprising:
It calculates and shows the loading page of the first image scaling to entire PDF in PDF document according to preset scaling rule
When showing, the area of maximum closing white space in the first image;
The display size for filtering out single character in the first image is less than the character of preset monocase display size
Block;
Display area needed for calculating the character block based on the monocase display size;
If the display area is less than the area of the maximum closing white space, by the character in the character block with not
After loading on the maximum closing white space less than the monocase display size, the first image is shown.
The second aspect of the embodiment of the present invention provides a kind of terminal device, and the terminal device includes memory, processing
Device, the computer program that can be run on the processor is stored on the memory, and the processor executes the calculating
Following steps are realized when machine program.
It calculates and shows the loading page of the first image scaling to entire PDF in PDF document according to preset scaling rule
When showing, the area of maximum closing white space in the first image;
The display size for filtering out single character in the first image is less than the character of preset monocase display size
Block;
Display area needed for calculating the character block based on the monocase display size;
If the display area is less than the area of the maximum closing white space, by the character in the character block with not
After loading on the maximum closing white space less than the monocase display size, the first image is shown.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, comprising: is stored with computer
Program, which is characterized in that the computer program realizes the step of PDF document display methods as described above when being executed by processor
Suddenly.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by calculating image scaling to loaded page
Existing maximum white space area in it when face, and determine the character that display size is too small in image at this time, so that it is determined that
Even if having gone out in image scaling to loading page, the character that user can not still see clearly, then in maximum white space area foot
When clearly showing these characters, the size that these characters can be checked clearly with user is in maximum white space and image
It shows together, to ensure that normal reading of the user to the image in PDF document including character.
Detailed description of the invention
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 is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram for the PDF document display methods that the embodiment of the present invention one provides;
Fig. 2 is the implementation process schematic diagram of PDF document display methods provided by Embodiment 2 of the present invention;
Fig. 3 is the implementation process schematic diagram for the PDF document display methods that the embodiment of the present invention three provides;
Fig. 4 is the implementation process schematic diagram for the PDF document display methods that the embodiment of the present invention four provides;
Fig. 5 is the implementation process schematic diagram for the PDF document display methods that the embodiment of the present invention five provides;
Fig. 6 is the structural schematic diagram for the PDF document display device that the embodiment of the present invention six provides;
Fig. 7 is the schematic diagram for the terminal device that the embodiment of the present invention seven provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
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 specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
In order to make it easy to understand, be first briefly described to the embodiment of the present invention herein: when PDF document loads in actual conditions
When the page is smaller, even if the image scaling in PDF document to loading page is shown, the final display of the character in image
Size may also can be too small, it is contemplated that in actual conditions character display effect be by each character in loading page actual displayed
When be particularly shown size decision, i.e., for a user end user's view result how to see each character display when tool
Body display size size 0.3cm*0.3cm in this way or 1cm*1cm, if display size is too small, such as 0.1cm*0.1cm, at this time
User can not see character clearly, can not normal reading character so as to cause user.Therefore, in order to guarantee user to comprising character
The normal reading of image shows the need of size to character when checking character according to user in practical application in embodiments of the present invention
It asks, is provided with corresponding monocase display size, and calculate when by image scaling to loading page maximum blank in image
Region area identifies the character that display size is too small in image, and calculates these undersized characters according to individual character
Symbol display size display area required when being shown, then display area demand is sufficient in maximum white space area
When, by these undersized characters in maximum white space to be shown not less than monocase display size, so that
The character user finally shown can clearly check, ensure that user to the normal reading of the image comprising character, details are as follows:
Fig. 1 shows the implementation flow chart of the PDF document display methods of the offer of the embodiment of the present invention one, and details are as follows:
S101 is calculated according to the regular loaded page by the first image scaling in PDF document to entire PDF of preset scaling
When face is shown, the area of maximum closing white space in the first image.
Wherein, the first image is the image of Zoom display needed for the embodiment of the present invention, specific in the embodiment of the present invention
Scaling rule can not be limited herein by technical staff's sets itself according to actual needs, and including but not limited to such as: filling is aobvious
Show, stretch display and image original aspect ratio show.Loading page refers to that PDF document within display screen can loaded and displayed
The page, due to PDF document carry out loaded and displayed when be not necessarily full screen display, in embodiments of the present invention add
Carry the size that page size is less than or equal to display screen.
In the embodiment of the present invention, by the calculating of maximum closing white space area when the size of image scaling to loading page
Method, can be by technical staff's sets itself, including but not limited to such as: 1, calculating and extremely loaded image scaling according to scaling rule
The actual displayed size of image when the size of the page, while maximum closing white space identification is carried out to image, and calculate maximum
Closing white space area accounts for the ratio of image area, when calculating the size by image scaling to loading page according still further to ratio
The area of maximum closing white space, 2, according to scaling rule by the size of image scaling to loading page, then to scaling after
Image carries out maximum closing white space identification, and counts the area of maximum closing white space.
Wherein, since the display size that different scaling rules will lead to final image has differences, the present invention is real
It applies and needs to carry out the calculating of image actual displayed size in example based on the scaling rule specifically set, such as when scaling rule is root
When being zoomed in and out according to image original aspect ratio, it is assumed that the original aspect ratio of image is 4:3, if the length-width ratio of loading page is also 4:
3, then the actual displayed size of image is the size of loading page.Meanwhile the embodiment of the present invention does not close blank area to maximum
The identification in domain and area statistics method are defined, specifically can be by technical staff's sets itself, including but not limited to such as to image
Enclosed graphic zone wherein included is determined after carrying out image binaryzation processing, then wherein maximum envelope is carried out based on gray threshold
The identification screening of white space is closed, pattern cut finally is carried out to the maximum closing white space identified, and it is right to calculate its
The size answered.
S102, the display size for filtering out single character in the first image are less than the character of preset monocase display size
Block.
Wherein, monocase display size refers to bulk size of the single character in loading page display, such as 1cm*
1cm, character block refer to that the language being made of in image one or more adjacent characters is whole.
Since the character content in actual conditions in image is generally with the formal distribution of character block in each region of image,
Such as respectively there are passage in image two sides, and the character boundary in same character block is generally identical, but between kinds of characters block
Character boundary may have differences, thus in order to determine the too small user of display size can not normal reading character, this hair
Bright embodiment first integrally can carry out character recognition to image, and be handled as unit of character block, determine wherein include
Character block and character block in specifically include character, then the display size to the single character in character block each in image
It is counted, filters out character block (the character display ruler that includes of the single character display size less than monocase display size
Very little smaller, user can not clearly check), it is required when for subsequent display.
S103, display area needed for calculating character block based on monocase display size.
It is subsequent to character in these character blocks in order to guarantee after determining the too small character block of monocase display size
Effective display, the embodiment of the present invention can calculate the number of characters for including in monocase display size and character block according to setting
Deng calculating display area when showing to the size that can clearly check character block character with user entirely, at least needed.Its
In, it is calculated aobvious in embodiments of the present invention since the too small character block of monocase display size may be one piece more than
Show area, it may be that the display area summation of the too small character block of all monocase display sizes.
S104, if display area is less than the area of maximum closing white space, by the character in character block not less than single
After character display size loads on maximum closing white space, the first image is shown.
After determining minimum required display area, the embodiment of the present invention can seal it with the image calculated maximum
The area for closing white space is compared.If display area is less than the area of maximum closing white space, illustrate to contract by image
When putting to loading page, maximum closing white space is enough to show character block with the size that user can clearly check in image
Character, the embodiment of the present invention can be by the character in the too small character block of monocase display size, with aobvious not less than monocase at this time
Show that size is loaded in maximum closing white space, and image is shown in loading page, so that image is being shown
When, the display size for all characters for inside including all is the size that user can see clearly, and ensure that user to word in image
The normal reading of symbol.Wherein, since the display size that different scaling rules will lead to final image has differences, so that
The area of the maximum closing white space of image has differences in the embodiment of the present invention, therefore in order to guarantee in calculated image
The area of maximum closing white space with wherein the maximum closing area of white space is identical when actual displayed image, most with guarantee
Character can be effectively shown eventually, and the embodiment of the present invention should carry out maximum closing blank when performing image display using S101
Scaling rule when the area in region carries out the scaling of final image.
Should explanatorily, since the concrete shape of maximum closing white space can not be predicted, as its both may be rectangle or
It may be some irregular figures, therefore when character block character is loaded on maximum closing white space, need according to maximum
The concrete shape for closing white space carries out typesetting to these character block characters, to guarantee normal display and the user of character
Normal reading, since the character typesetting method of the prior art is more mature, technical staff can be according to the text needed for practical choose
Word composition method, therefore it will not go into details herein.Meanwhile single character actual displayed size can be examined by technical staff's sets itself
Consider is to guarantee user to the reading effect of character just to show not less than monocase display size in the embodiment of the present invention
Show character, but then when the actual displayed of single character is oversized, will lead to final character and show required total face
Product becomes very big, and when the gross area needed for showing is greater than maximum closing white space area, will lead to character must seal in maximum
It closes other than white space and is shown, the display effect to image certainly will be will affect at this time, therefore in embodiments of the present invention, word
The actual displayed size of character in symbol block should not be too large, it is preferable that should be guaranteed that the gross area that the character in character block is shown
The area of maximum closing white space should be less than.
In embodiments of the present invention, by calculate by when image scaling to loading page in it is existing maximum white space
Area, and determine the character that display size is too small in image at this time, even if so that it is determined that having gone out in image scaling to loaded page
When face, the character that user can not still see clearly, then when maximum white space area is enough clearly to show these characters, by these
The size that character can be checked clearly with user is shown together with image in maximum white space, to ensure that user couple
The normal reading of image in PDF document comprising character.
As an embodiment of the present invention, since the embodiment of the present invention one is directed in PDF document comprising character
The display of image, therefore, in order to guarantee that the normal display of PDF document itself is not affected, the embodiment of the present invention only can be
Show PDF document on the basis of, after receiving to the idsplay order of image, just will do it the S101 of the embodiment of the present invention one with
And subsequent operation.Wherein to the idsplay order of image, either what user was manually entered, such as user is in access PDF document
Shi Shoudong clicks the image for wherein amplifying insertion, is also possible to the program task pre-set generation, such as setting task
If generating after the current PDF page is shown 5 seconds and being shown to image to detect in the PDF page currently shown comprising image
Show instruction.
As the embodiment of the present invention two, since closing white space area maximum in actual conditions not necessarily reaches character block word
The display of symbol, therefore when maximum closing white space area is smaller, need the actual conditions shown according further to image
It is shown to carry out processing to the character of required display, simultaneously, it is contemplated that different scaling rules is eventually led to pair in actual conditions
There are larger differences for the display effect of image, therefore in order to guarantee the effect shown to character, the embodiment of the present invention is for scaling
Rule is the case where original aspect ratio based on image shows image scaling to loading page, the display to the character of character block
It is handled, as shown in Fig. 2, details are as follows:
S201, if display area is greater than the area of maximum closing white space, and the original aspect ratio of the first image with plus
The length-width ratio for carrying the page is not identical, when calculating is shown the first image scaling to loading page based on scaling rule, loading page
The area of middle no image display area.
If display area is greater than the area of maximum closing white space, illustrates when by image scaling to loading page, scheme
Maximum closing white space is not enough to show the character of character block with the size that user can clearly check as in, meanwhile, if figure
The original aspect ratio of picture and the length-width ratio of loading page are different, must in loading page when by image scaling to loading page
There are a part of regions to show without image, such as assumes that image original aspect ratio is 4:3, and the length-width ratio of loading page is 16:9,
When image being zoomed to loading page display according to length-width ratio 4:3 at this time, the left and right sides of loading page will certainly have two panels
The region that no any image is shown.Therefore, in order to guarantee to the normal of the character block character determined in the embodiment of the present invention one
It shows, the face of no image display area can be counted when loading page is in the presence of no image display area in the embodiment of the present invention
Product, and judge whether the area meets area requirements of the character block character with the display of monocase display size when.
S202, if display area is less than or equal to the area without image display area, by the character in character block with not small
After monocase display size loads on no image display area, the first image is shown.
If display area is less than or equal to the area without image display area, illustrate by image scaling to loading page
When, it is enough to show the character of character block with the size that user can clearly check without image display area in loading page, at this point,
The embodiment of the present invention can be by the character of character block to load on no image display area, and root not less than monocase display size
Image scaling is shown into loading page according to according to the element length-width ratio of image, to guarantee to the effective aobvious of character block character
Show.Wherein, when no image display area shows character block character, typesetting can be carried out to character to guarantee that final reality is imitated
Fruit, specific composition method can be by technical staff's sets itselfs according to demand.Meanwhile character is specifically shown in non-image areas
Show that size can also be by technical staff's sets itself, it is preferable that in order to guarantee the display effect of image, can final character show
The gross area no more than no image display area area subject to, carry out character and be particularly shown the setting of size.
In embodiments of the present invention, the case where for scaling rule to be scaled based on image original aspect ratio, is to character block
The display of character is handled, and when maximum closing white space is not enough to support clearly to show character block character, utilizes figure
The display of character block character is carried out without image display area in loading page after picture scaling, to ensure that user in image
Character is clearly checked, ensure that the normal reading to the image in PDF document including character.
As the embodiment of the present invention three, it is contemplated that even if carrying out word according to the method for the embodiment of the present invention two in actual conditions
The processing of block character is accorded with, but is clearly shown since no image display area area not necessarily reaches character block character, if sheet when inadequate
Inventive embodiments two, which are understood, clearly to show character block character, therefore in order to guarantee to the clear aobvious of character block character
Show, as shown in Figure 3, comprising:
S301 creates blank identical with loading page size if display area is greater than the area without image display area
Image.
Character block is loaded on blank image with the size not less than display area, obtains corresponding second image by S302,
And show the first image.
When display area is greater than the area without image display area, illustrate that no image display area can not be supported to word
Accord with the clear display of block character, therefore in order to guarantee the clear display to character block character, will create in the embodiment of the present invention with
The identical blank image of loading page size, and by the character block filtered out in the required embodiment of the present invention one to be not less than
It is loaded in blank image according to the calculated display area of monocase display size, to guarantee that user can clearly check character
Character in block.Wherein, unlike the embodiment of the present invention one and the embodiment of the present invention two, due to blank image area compared with
It is generally sufficient to meet character block greatly and shows demand, therefore in embodiments of the present invention, type-setting mode that can be original with character block
Directly scale it into blank image, it equally, can also be to character progress in character block again typesetting and display and blank
In image, specifically whether will typesetting again, and specific typesetting rule can voluntarily select by technical staff.
First image is switched to the second image and shown by S303 if receiving image switching command.
After creation is completed comprising scaling after the image of character block, in order to guarantee that the normal of original image is shown in PDF document
Show, directly the image comprising character block after scaling is not shown in the embodiment of the present invention, but first according to the contracting of setting
Put rule original image is shown, while for user provide image switch function, user can with input picture switching command,
Original image is switched to the image comprising character block after scaling, clearly checking to character block character can be realized.Wherein, it is
Prompt user is except original image, the image comprising character block after scaling that generates there is also one, it is preferable that the present invention is real
A call tag can be generated on original image by applying in example, inform that user can pass through the modes input picture such as click/sliding
Switching command, and realize the switching to image, such as " image switching " suspension button is generated in original image.
As another embodiment of the invention, it is contemplated that only have the original aspect ratio based on image in various scaling rules
Zooming to loading page just will appear no image display area, therefore when scaling rule is not the " original aspect ratio based on image
Zoom to loading page " when, no image display area character can not be carried out and shown, therefore in order to guarantee other scaling rules
Under, when maximum closing white space insufficient area shows character block character, clear display to character block character, the present invention
The case where not being " original aspect ratio based on image zooms to loading page " for scaling rule in embodiment, setting corresponds to
Character block character display processing method, it is specific as follows:
If display area is greater than the area of maximum closing white space, blank sheet identical with loading page size is created
Picture.
Character block is loaded on into blank image with the size not less than display area, obtains corresponding second image, and show
Show the first image.
If receiving image switching command, the first image is switched to the second image and is shown.
The embodiment of the present invention is with the difference of the embodiment of the present invention three: the embodiment of the present invention is directed to when scaling is regular not
Insufficient area for " original aspect ratio based on image zooms to loading page ", and maximum closing white space is clearly shown
The case where character block character, and the specific character block character method of processing display of the embodiment of the present invention and the embodiment of the present invention 31
It causes, therefore it will not go into details herein, specifically refers to the related description in the embodiment of the present invention three.
As the embodiment of the present invention four, since in actual conditions, the embodiment of the present invention one calculates maximum closing blank area
Domain area not necessarily reach character block character display, in order to maximum closing white space area it is smaller when can be to character block character
It is clearly shown, such as Fig. 4, comprising:
S401 creates sky identical with loading page size if display area is greater than the area of maximum closing white space
White image.
Character block is loaded on blank image with the size not less than display area, obtains corresponding second image by S402,
And show the first image.
First image is switched to the second image and shown by S403 if receiving image switching command.
With the embodiment of the present invention two and the embodiment of the present invention three the difference is that, not to not in the embodiment of the present invention
Same scaling rule is finely divided, but straight when the insufficient area of maximum closing white space clearly shows character block character
Blank image is delivered a child into, and character block is scaled in blank sheet, then display includes after scaling after receiving image switching command
The image of character block can be achieved to the clear of character block character so that no matter which kind of scaling is regular for the embodiment of the present invention
Display.Wherein specific character block character method of processing display and the embodiment of the present invention three are consistent, therefore it will not go into details herein, tool
Body can refer to the related description in the embodiment of the present invention three.
In embodiments of the present invention, by generating blank image and the character block filtered out in the embodiment of the present invention one contracting
It puts into blank image, then it is shown in user's input picture switching command, so that the embodiment of the present invention can
To realize the clear display of character that can not be seen clearly to user in original image, it ensure that user to including character in PDF document
Image normal reading.
As the embodiment of the present invention five, in order to guarantee the reasonability of the monocase display size set, it is ensured that user can
Normally clearly check each character, before the embodiment of the present invention one, the embodiment of the present invention can be according to the hardware of display screen
Configuring condition adaptively determines out most suitable monocase display size, and details are as follows:
S501 obtains preset monocase minimum and occupies pixel number, preset monocase minimum display size and show
The pixel point density of display screen curtain, and it is based on pixel point density and monocase minimum display size, it is corresponding to calculate monocase
Occupy pixel number.
Since whether a character normally can clearly be checked in display by user, two factors: word are depended primarily on
The display size that the pixel number occupied and character occupy is accorded with, wherein display size refers to that control size when character is shown is big
It is small, such as 1cm*1cm.When the pixel number of occupancy is very few, character feature can not can all be shown when display, even if at this time
Large user also may can not still identify character, such as but display surface very small for common pixel point density to display size again
It is such as false when the pixel number that monocase display occupies is seldom but its display size is larger for the very big LED advertisement screen of product
If showing dimensions as 2cm*2cm, when occupancy pixel number is only 3*3, although its display size is set much larger than smaller screens such as mobile phones
It is standby, but since it is occupied, pixel number is very few, so that its character feature can not be fully displayed, therefore user understands nothing at this time
Method tells the character.And when occupancy display size is too small, even if occupying, pixel number is high again, so that the feature of character is whole
It is revealed, since human eye can not identify the things of small size, user can not still see the character clearly at this time, such as false
It is located in the very high display screen of pixel point density, it only can be complete by character feature with the display area of 0.1cm*0.1cm
Portion is shown, but character display size is too small at this time, and user can still not see the character.
In order to guarantee that character normally can be checked clearly by user, the pixel number and display size that character occupies must be same
When meet the requirement of minimum value, to prevent too small the case where causing user that can not the check appearance of any one factor value, because
This pre-sets a minimum occupancy pixel number and a minimum display ruler in embodiments of the present invention for monocase
It is very little, guarantee is provided with the reasonability calculated for subsequent monocase display size, wherein in view of different user is to character recognition energy
The difference of power, and it is different to the recognizable ability of character minimum display size, pixel is not occupied to monocase minimum herein
Several and monocase minimum display size occurrence is defined, and can be set according to actual needs by technical staff.
In the pixel point density for the corresponding display screen of monocase minimum display size and spacial flex for getting setting
Later, monocase minimum display size is shown multiplied by pixel point density with calculating the monocase minimum in the display screen
The practical pixel number for including of size.
S502 will be single if the corresponding occupancy pixel number of monocase is greater than or equal to monocase minimum and occupies pixel number
Character minimum display size is set as monocase display size.
If the practical pixel number for including of monocase minimum display size is greater than or equal to monocase most in the display screen
Small occupancy pixel number, if illustrating to show single character with monocase minimum display size in the display screen, it is sufficient to protect
Card user clearly checks that therefore, the embodiment of the present invention can be straight by the monocase minimum display size of the setting at this time to character
It connects as the monocase display size in the embodiment of the present invention one.
S503, if the corresponding occupancy pixel number of monocase is less than monocase minimum and occupies pixel number, according to monocase
Minimum occupies pixel number and pixel point density, calculates monocase display size.
If the practical pixel number for including of monocase minimum display size is occupied less than monocase minimum in the display screen
Pixel number, if illustrating to show single character in the display screen with monocase minimum display size, practical each character
The pixel number of occupancy can be difficult to meet demand, and user can be made to be difficult to clearly check character.Therefore, in order to guarantee that user's is clear
It is clear to check, monocase minimum can be occupied to pixel number divided by pixel point density in the embodiment of the present invention, shown with calculating
Monocase minimum occupies the corresponding area occupied of pixel number in screen, obtains final required monocase display size.
Corresponding to the method for foregoing embodiments, Fig. 6 shows the knot of PDF document display device provided in an embodiment of the present invention
Structure block diagram, for ease of description, only parts related to embodiments of the present invention are shown.The exemplary PDF document display device of Fig. 6
The executing subject of the PDF document display methods of the offer of previous embodiment one is provided.
Referring to Fig. 6, which includes:
White space identification module 61 contracts the first image in PDF document according to preset scaling rule for calculating
It puts to when the loading page display of entire PDF, maximum closes the area of white space in the first image.
Character block screening module 62, the display size for filtering out single character in the first image are less than preset
The character block of monocase display size.
Display area computing module 63 is shown needed for the character block for being calculated based on the monocase display size
Show area.
First character loading module 64, if being less than the area of the maximum closing white space for the display area,
By the character in the character block to load on the maximum closing white space not less than the monocase display size after, show
Show the first image.
Further, the PDF document display device, further includes:
Non-image areas identification module, if being greater than the area of the maximum closing white space for the display area,
And the original aspect ratio of the first image is not identical as the length-width ratio of the loading page, calculating will based on the scaling rule
When the first image zooms to loading page display, the area without image display area in the loading page.
Second character loading module, if being less than or equal to the face of the no image display area for the display area
Product, by the character in the character block to load on the no image display area not less than the monocase display size after,
Show the first image.
Further, the PDF document display device, further includes:
First picture creation module, if being greater than the area of the no image display area for the display area, creation
Blank image identical with the loading page size.
First character loading module, it is described for loading on the character block with the size not less than the display area
Blank image obtains corresponding second image, and shows the first image.
First image switching module, if the first image is switched to described for receiving image switching command
Two images are shown.
Further, the PDF document display device, further includes:
Second picture creation module, if being greater than the area of the maximum closing white space, wound for the display area
Build blank image identical with the loading page size.
Second character loading module, it is described for loading on the character block with the size not less than the display area
Blank image obtains corresponding second image, and shows the first image.
Second image switching module, if the first image is switched to described for receiving image switching command
Two images are shown.
Further, the PDF document display device, further includes:
Pixel computing module occupies pixel number, preset monocase minimum for obtaining preset monocase minimum
Display size and the pixel point density for showing screen, and ruler is shown based on the pixel point density and the monocase minimum
It is very little, calculate the corresponding occupancy pixel number of monocase.
Size setup module, if being greater than or equal to the monocase most for the corresponding occupancy pixel number of the monocase
The monocase minimum display size is set the monocase display size by small occupancy pixel number.
Size computing module, if being occupied for the corresponding occupancy pixel number of the monocase less than the monocase minimum
Pixel number occupies pixel number and the pixel point density according to the monocase minimum, it is aobvious to calculate the monocase
Show size.
Each module realizes the process of respective function in PDF document display device provided in an embodiment of the present invention, can specifically join
The description of embodiment illustrated in fig. 1 one is stated before examination, and details are not described herein again.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Although will also be appreciated that term " first ", " second " etc. are used in some embodiment of the present invention in the text
Various elements are described, but these elements should not be limited by these terms.These terms are used only to an element
It is distinguished with another element.For example, the first table can be named as the second table, and similarly, the second table can be by
It is named as the first table, without departing from the range of various described embodiments.First table and the second table are all tables, but
It is them is not same table.
Fig. 7 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in fig. 7, the terminal of the embodiment is set
Standby 7 include: processor 70, memory 71, and the computer that can be run on the processor 70 is stored in the memory 71
Program 72.The processor 70 is realized when executing the computer program 72 in above-mentioned each PDF document display methods embodiment
The step of, such as step 101 shown in FIG. 1 is to 106.Alternatively, realization when the processor 70 executes the computer program 72
The function of each module/unit in above-mentioned each Installation practice, such as the function of module 61 to 66 shown in Fig. 6.
The terminal device 7 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device may include, but be not limited only to, processor 70, memory 71.It will be understood by those skilled in the art that Fig. 7
The only example of terminal device 7 does not constitute the restriction to terminal device 7, may include than illustrating more or fewer portions
Part perhaps combines certain components or different components, such as the terminal device can also include input sending device, net
Network access device, bus etc..
Alleged processor 70 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), 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 is also possible to any conventional processor
Deng.
The memory 71 can be the internal storage unit of the terminal device 7, such as the hard disk or interior of terminal device 7
It deposits.The memory 71 is also possible to the External memory equipment of the terminal device 7, such as be equipped on the terminal device 7
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 71 can also both include the storage inside list of the terminal device 7
Member also includes External memory equipment.The memory 71 is for storing needed for the computer program and the terminal device
Other programs and data.The memory 71, which can be also used for temporarily storing, have been sent or data to be sent.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process 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 generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code
Dish, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random
Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the essence of corresponding technical solution is departed from the spirit and scope of the technical scheme of various embodiments of the present invention, it should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of PDF document display methods characterized by comprising
When calculating according to the preset loading page display for scaling rule for the first image scaling in PDF document to entire PDF,
The area of maximum closing white space in the first image;
The display size for filtering out single character in the first image is less than the character block of preset monocase display size;
Display area needed for calculating the character block based on the monocase display size;
If the display area is less than the area of the maximum closing white space, by the character in the character block to be not less than
After the monocase display size loads on the maximum closing white space, the first image is shown.
2. PDF document display methods as described in claim 1, which is characterized in that when the scaling rule is based on image
When original aspect ratio shows image scaling to loading page, further includes:
If the display area is greater than the area of the maximum closing white space, and the original aspect ratio of the first image with
The length-width ratio of the loading page is not identical, calculates and the first image is zoomed to the loaded page based on the scaling rule
When face is shown, the area without image display area in the loading page;
If the display area is less than or equal to the area of the no image display area, by the character in the character block with not
After loading on the no image display area less than the monocase display size, the first image is shown.
3. PDF document display methods as claimed in claim 2, which is characterized in that further include:
If the display area is greater than the area of the no image display area, sky identical with the loading page size is created
White image;
The character block is loaded on into the blank image with the size not less than the display area, obtains corresponding second figure
Picture, and show the first image;
If receiving image switching command, the first image is switched to second image and is shown.
4. PDF document display methods as described in claim 1, which is characterized in that further include:
If the display area is greater than the area of the maximum closing white space, create identical with the loading page size
Blank image;
The character block is loaded on into the blank image with the size not less than the display area, obtains corresponding second figure
Picture, and show the first image;
If receiving image switching command, the first image is switched to second image and is shown.
5. PDF document display methods as described in claim 1, which is characterized in that advised in described calculate according to preset scaling
When then the loading page of the first image scaling in PDF document to entire PDF being shown, maximum closing is empty in the first image
Before the area of white region, further includes:
It obtains preset monocase minimum and occupies pixel number, preset monocase minimum display size and the picture for showing screen
Vegetarian refreshments density, and it is based on the pixel point density and the monocase minimum display size, calculate that monocase is corresponding to be accounted for
Use pixel number;
It, will be described if the corresponding occupancy pixel number of the monocase, which is greater than or equal to the monocase minimum, occupies pixel number
Monocase minimum display size is set as the monocase display size;
If the corresponding occupancy pixel number of the monocase, which is less than the monocase minimum, occupies pixel number, according to the individual character
Symbol is minimum to occupy pixel number and the pixel point density, calculates the monocase display size.
6. a kind of terminal device, which is characterized in that the terminal device includes memory, processor, is stored on the memory
There is the computer program that can be run on the processor, the processor realizes following step when executing the computer program
It is rapid:
When calculating according to the preset loading page display for scaling rule for the first image scaling in PDF document to entire PDF,
The area of maximum closing white space in the first image;
The display size for filtering out single character in the first image is less than the character block of preset monocase display size;
Display area needed for calculating the character block based on the monocase display size;
If the display area is less than the area of the maximum closing white space, by the character in the character block to be not less than
After the monocase display size loads on the maximum closing white space, the first image is shown.
7. terminal device as claimed in claim 6, which is characterized in that when the scaling rule is the original aspect based on image
When than image scaling to loading page being shown, further includes:
If the display area is greater than the area of the maximum closing white space, and the original aspect ratio of the first image with
The length-width ratio of the loading page is not identical, calculates and the first image is zoomed to the loaded page based on the scaling rule
When face is shown, the area without image display area in the loading page;
If the display area is less than or equal to the area of the no image display area, by the character in the character block with not
After loading on the no image display area less than the monocase display size, the first image is shown.
8. terminal device as claimed in claim 7, which is characterized in that the processor goes back reality when executing the computer program
Existing following steps:
If the display area is greater than the area of the no image display area, sky identical with the loading page size is created
White image;
The character block is loaded on into the blank image with the size not less than the display area, obtains corresponding second figure
Picture, and show the first image;
If receiving image switching command, the first image is switched to second image and is shown.
9. terminal device as claimed in claim 6, which is characterized in that the processor goes back reality when executing the computer program
Existing following steps:
If the display area is greater than the area of the maximum closing white space, create identical with the loading page size
Blank image;
The character block is loaded on into the blank image with the size not less than the display area, obtains corresponding second figure
Picture, and show the first image;
If receiving image switching command, the first image is switched to second image and is shown.
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 any one of such as claim 1 to 5 of realization the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811122297.3A CN109445652B (en) | 2018-09-26 | 2018-09-26 | PDF document display method and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811122297.3A CN109445652B (en) | 2018-09-26 | 2018-09-26 | PDF document display method and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109445652A true CN109445652A (en) | 2019-03-08 |
CN109445652B CN109445652B (en) | 2021-08-13 |
Family
ID=65544328
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811122297.3A Active CN109445652B (en) | 2018-09-26 | 2018-09-26 | PDF document display method and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109445652B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110660115A (en) * | 2019-08-20 | 2020-01-07 | 海南车智易通信息技术有限公司 | Method, device and system for generating advertisement picture |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101118738A (en) * | 2006-07-31 | 2008-02-06 | 夏普株式会社 | Display device and display method |
JP2008177823A (en) * | 2007-01-18 | 2008-07-31 | Sharp Corp | Image processor and image magnifying method |
CN101984426A (en) * | 2010-10-21 | 2011-03-09 | 优视科技有限公司 | Method used for character splitting on webpage picture and device thereof |
CN105824492A (en) * | 2015-09-30 | 2016-08-03 | 维沃移动通信有限公司 | Display control method and terminal |
CN107688789A (en) * | 2017-08-31 | 2018-02-13 | 平安科技(深圳)有限公司 | Document charts abstracting method, electronic equipment and computer-readable recording medium |
CN107741816A (en) * | 2017-10-27 | 2018-02-27 | 咪咕动漫有限公司 | A kind of processing method of image information, device and storage medium |
-
2018
- 2018-09-26 CN CN201811122297.3A patent/CN109445652B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101118738A (en) * | 2006-07-31 | 2008-02-06 | 夏普株式会社 | Display device and display method |
JP2008177823A (en) * | 2007-01-18 | 2008-07-31 | Sharp Corp | Image processor and image magnifying method |
CN101984426A (en) * | 2010-10-21 | 2011-03-09 | 优视科技有限公司 | Method used for character splitting on webpage picture and device thereof |
CN105824492A (en) * | 2015-09-30 | 2016-08-03 | 维沃移动通信有限公司 | Display control method and terminal |
CN107688789A (en) * | 2017-08-31 | 2018-02-13 | 平安科技(深圳)有限公司 | Document charts abstracting method, electronic equipment and computer-readable recording medium |
CN107741816A (en) * | 2017-10-27 | 2018-02-27 | 咪咕动漫有限公司 | A kind of processing method of image information, device and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110660115A (en) * | 2019-08-20 | 2020-01-07 | 海南车智易通信息技术有限公司 | Method, device and system for generating advertisement picture |
Also Published As
Publication number | Publication date |
---|---|
CN109445652B (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20060044317A1 (en) | Cache efficient rasterization of graphics data | |
CN102970456B (en) | Image forming apparatus, image forming apparatus control method, and program | |
CN109783757B (en) | Method, device and system for rendering webpage, storage medium and electronic device | |
CN109493281A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN112330696B (en) | Face segmentation method, face segmentation device and computer-readable storage medium | |
US8669998B1 (en) | Selection of colors | |
CN112348954A (en) | Building model processing method and device, computer equipment and storage medium | |
CN105009057A (en) | Intelligent window placement with multiple windows using high DPI screens | |
CN108629727A (en) | Method, terminal and the medium of watermark are generated according to color | |
CN110473249A (en) | A kind of control methods, device and the terminal device of web user interface and design original text | |
CN111858038A (en) | Method, device and medium for reading memory data of FPGA (field programmable Gate array) board card | |
EP2874054A1 (en) | Application text adjusting method, device, and terminal | |
CN106599759A (en) | Terminal information processing method and apparatus | |
US20230316476A1 (en) | Image splicing method and apparatus, and electonic device and computer-readable storage medium | |
CN104392424A (en) | Method and system for contrast adaption of professional gray-scale image | |
CN106249837A (en) | A kind of method preventing terminal power down and terminal | |
CN109445652A (en) | A kind of PDF document display methods and terminal device | |
CN114115840B (en) | Variable jump method and device for nuclear power station DCS system application software | |
CN109359255B (en) | Form data display method and terminal equipment | |
CN110222478A (en) | A kind of method and mobile terminal for protecting document | |
US8645302B2 (en) | Dynamic constraint satisfaction problem solver with part-whole hierarchy constraints | |
CN105051788B (en) | Graphics process is carried out using multiple pels | |
CN108776959B (en) | Image processing method and device and terminal equipment | |
CN110264401A (en) | Continuous type image magnification method, device and storage medium based on radial basis function | |
EP4239497A1 (en) | Image display method and apparatus, and electronic 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |