CN110019037A - A kind of pdf document methods of exhibiting, device, equipment and storage medium - Google Patents

A kind of pdf document methods of exhibiting, device, equipment and storage medium Download PDF

Info

Publication number
CN110019037A
CN110019037A CN201810274787.9A CN201810274787A CN110019037A CN 110019037 A CN110019037 A CN 110019037A CN 201810274787 A CN201810274787 A CN 201810274787A CN 110019037 A CN110019037 A CN 110019037A
Authority
CN
China
Prior art keywords
pdf document
page
presented
target data
data stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810274787.9A
Other languages
Chinese (zh)
Other versions
CN110019037B (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201810274787.9A priority Critical patent/CN110019037B/en
Publication of CN110019037A publication Critical patent/CN110019037A/en
Application granted granted Critical
Publication of CN110019037B publication Critical patent/CN110019037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a kind of pdf document methods of exhibiting, device, equipment and storage mediums.Pdf document presentation device of the present invention is instructed in response to user based on the Fileview that browser page inputs, and obtains the corresponding target data stream of current pdf document to be presented from server;Then the dimension information of browser page is obtained, determine that the corresponding pdf document content of the target data stream is plotted in the canvas area by the canvas area in the browser page according to the dimension information, and the browser page that content is completed is shown, so as to realize the without differences displaying to pdf document on different devices according to different browsers page size, the reading experience of user is improved.

Description

A kind of pdf document methods of exhibiting, device, equipment and storage medium
Technical field
The present invention relates to technical field of mobile terminals more particularly to a kind of pdf document methods of exhibiting, device, equipment and deposit Storage media.
Background technique
With intelligent mobile terminal, such as: mobile phone, tablet computer, Intelligent bracelet etc. are popularized, and user is using these ends When end carries out web page browsing, if wanting to carry out portable document format (Portable Document Format, PDF) Fileview It is essentially all that online preview is carried out by the PDF reader that browser carries;When browser does not have PDF reader, browsing Device, which will be defaulted to be clicked by user again by downloading pdf document, to be checked, experience sense is poor.Therefore, how to facilitate user at any time with The browsing pdf document on ground realizes the displaying to pdf document without differences, is a urgent problem to be solved.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of pdf document methods of exhibiting, device, equipment and storage mediums, it is intended to Solve the displaying that can not effectively realize without differences to pdf document on different mobile terminal in the prior art, user experience Feel lower technical problem.
To achieve the above object, it the present invention provides a kind of pdf document methods of exhibiting, the described method comprises the following steps:
In response to the Fileview instruction that user is inputted based on browser page, current PDF to be presented is obtained from server The corresponding target data stream of file;
The dimension information for obtaining browser page, the painting canvas area in the browser page is determined according to the dimension information Domain;
The content of the corresponding pdf document to be presented of the target data stream is plotted in the canvas area, and to comprising The browser page of the content is shown.
Preferably, the dimension information for obtaining browser page, determines the browser page according to the dimension information Canvas area in face, comprising:
The page width and page height for obtaining browser page, determine target according to the page width and page height The ratio of width to height;
The page display parameters of the browser page are obtained, and determine the current page according to the page display parameters The corresponding effective display area in face;
Based on described target the ratio of width to height, canvas area is constructed in effective display area.
Preferably, described to be based on described target the ratio of width to height, after constructing canvas area in effective display area, institute State method further include:
According to the canvas area, the data stream size that the browser page single page is shown is determined;
The target data stream is divided according to the data stream size, obtains several data flows pair to be presented As;
Stream object to be presented is ranked up by the page number sequence of the current pdf document to be presented;
The content by the corresponding pdf document to be presented of the target data stream is plotted in the canvas area, and right Browser page comprising the content is shown, and is specifically included:
Current target data flow object to be presented is determined according to ranking results;
The content of pdf document corresponding with the target data flow object is plotted in the canvas area, and to comprising The browser page of the content is shown.
Preferably, the content by pdf document corresponding with the target data flow object is plotted in the painting canvas area Domain, and the browser page comprising the content is shown, comprising:
The target data flow object is formatted, file content to be presented is obtained;
Canvas element is searched using default drafting script, is drawn the file content to be presented by the canvas element It is shown to the canvas area, and to the browser page comprising the file content to be presented.
Preferably, described to be instructed in response to user based on the Fileview that browser page inputs, work as from server acquisition The corresponding target data stream of preceding pdf document to be presented, comprising:
In response to the Fileview instruction that user is inputted based on browser page, the available memory space of browser is obtained;
The file size of pdf document to be viewed is obtained, and the file size and the available memory space are compared Compared with;
When the file size is less than the available memory space, using the pdf document to be viewed as currently wait open up Show pdf document, and obtains the corresponding target data stream of the pdf document currently to be presented from server.
Preferably, the file size for obtaining the pdf document to be viewed, and the file size is used with described After memory headroom is compared, the method also includes:
When the file size is greater than the available memory space, by the corresponding space size of the available memory space Reference point as single download;
The corresponding target data stream of the pdf document to be viewed is downloaded in batches according to the reference point, from service Device obtains the corresponding target data stream of current pdf document to be presented.
Preferably, the file size for obtaining the pdf document to be viewed, and the file size is used with described After memory headroom is compared, the method also includes:
When the file size is greater than the available memory space, the corresponding memory headroom of the browser is carried out clear Reason, so that the memory headroom after cleaning is greater than the file size;
Using the pdf document to be viewed as current pdf document to be presented, obtained from server described current to be presented The corresponding target data stream of pdf document.
In addition, to achieve the above object, the present invention also proposes that a kind of pdf document shows device, and described device includes: data Obtain module, painting canvas determining module and document presentation module;
The data acquisition module, for being instructed in response to user based on the Fileview that browser page inputs, from clothes Business device obtains the corresponding target data stream of current pdf document to be presented;
The painting canvas determining module determines institute according to the dimension information for obtaining the dimension information of browser page State the canvas area in browser page;
The document presentation module, for the content of the corresponding pdf document to be presented of the target data stream to be plotted in The canvas area, and the browser page comprising the content is shown.
In addition, to achieve the above object, the present invention also proposes a kind of pdf document presentation device, the equipment includes storage Device, processor and it is stored in the pdf document presentation program that can be run on the memory and on the processor, the PDF Document presentation program is arranged for carrying out the step of pdf document methods of exhibiting as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, PDF is stored on the storage medium Document presentation program, the pdf document presentation program realize pdf document methods of exhibiting as described above when being executed by processor The step of.
Pdf document of the present invention show device by the Fileview instruction that input in response to user based on browser page, The corresponding target data stream of current pdf document to be presented is obtained from server;Then the dimension information of browser page, root are obtained Determine the canvas area in the browser page by the corresponding pdf document content of the target data stream according to the dimension information It is plotted in the canvas area, and the browser page that content is completed is shown, so as to according to different viewing Device page size realizes the without differences displaying to pdf document on different devices, improves the reading experience of user.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the pdf document presentation device for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of pdf document methods of exhibiting first embodiment of the present invention;
Fig. 3 is the flow diagram of pdf document methods of exhibiting second embodiment of the present invention;
Fig. 4 is the flow diagram of pdf document methods of exhibiting 3rd embodiment of the present invention;
Fig. 5 is the flow diagram of pdf document methods of exhibiting fourth embodiment of the present invention;
Fig. 6 is the structural block diagram that pdf document of the present invention shows device first embodiment.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that described herein, specific examples are only used to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, the pdf document presentation device may include: processor 1001, such as CPU, communication bus 1002, User interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing between these components Connection communication.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional User interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include standard Wireline interface, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable Memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned The storage device of processor 1001.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the limit to pdf document presentation device It is fixed, it may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, as may include operating system, data storage mould in a kind of memory 1005 of storage medium Block, network communication module, Subscriber Interface Module SIM and pdf document presentation program.
In pdf document presentation device shown in Fig. 1, network interface 1004 is mainly used for carrying out data with background server Communication;User interface 1003 is mainly used for carrying out data interaction with user;The processor of pdf document presentation device of the present invention 1001, memory 1005 can be set in pdf document presentation device, and the pdf document presentation device passes through processor 1001 The pdf document presentation program stored in memory 1005 is called, and executes pdf document methods of exhibiting provided in an embodiment of the present invention The step of.
The embodiment of the invention provides a kind of pdf document methods of exhibiting, are pdf document of the present invention displaying referring to Fig. 2, Fig. 2 The flow diagram of method first embodiment.
In the present embodiment, the pdf document methods of exhibiting the following steps are included:
Step S10: the Fileview inputted in response to user based on browser page is instructed, from server obtain currently to Show the corresponding target data stream of pdf document;
It should be noted that the executing subject of present implementation can be above-mentioned pdf document presentation device, which can be with Be there is the user equipment of data processing and display function, such as: the mobile terminals such as mobile phone, tablet computer, PC.Institute Stating server can be the Internet resources center that storage has all kinds of pdf document data flows, and the browser page is that user is current The current page of the browser browsed;The target data stream is that user currently wants the corresponding text of the pdf document checked Part content stream data, the corresponding format of the data flow can be the extensible markup language convenient for transmission and storage (Extensible Markup Language, XML) format.Below by taking mobile terminal as an example, to the present embodiment and following each realities Example is applied to be illustrated.
In the concrete realization, mobile terminal receives and responds to the Fileview that user inputs on browser current page Instruction obtains the corresponding target data stream of current pdf document to be presented from server.
Step S20: obtaining the dimension information of browser page, is determined in the browser page according to the dimension information Canvas area;
It will be appreciated that the dimension information can be the dimension information of the entire display interface of mobile terminal, can also be For showing the dimension information in the personalized region of text, icon or other page elements in the preset browser of user, The present embodiment is without restriction to this.
In the concrete realization, mobile terminal, can be according to the dimension information after getting the dimension information of browser page Determine the canvas area in browser page.With HyperText Markup Language (HyperText Markup Language, HTML) for the page, the canvas element of HTML5 uses JavaScript script drawing image on webpage under normal conditions. Painting canvas is a rectangular area, and each of region pixel all can control.Canvas element possesses a variety of draftings Path, rectangle, circle, character and the method for adding image.Specifically, mobile terminal can add canvas to the HTML5 page Element, and provide the id, width and height of element, such as: < canvas id=" MyCanvas " width=" 960 " height ="540"></canvas>.
Step S30: being plotted in the canvas area for the content of the corresponding pdf document to be presented of the target data stream, And the browser page comprising the content is shown.
In the concrete realization, mobile terminal is after the completion of canvas area constructs, the mesh for the pdf document to be presented that can be will acquire Mark data flow respective file content is plotted in the canvas area, and is shown to the browser page drawn, for Family is checked.
The mobile terminal of this embodiment is instructed in response to user based on the Fileview that browser page inputs, and is obtained from server Take the corresponding target data stream of current pdf document to be presented;The dimension information for obtaining browser page, according to the dimension information Determine the canvas area in the browser page;The corresponding pdf document content of the target data stream is plotted in the picture Cloth region, and the browser page is shown, indifference effectively is realized to pdf document on different mobile terminal Change and show, improves user experience.
With reference to Fig. 3, Fig. 3 is the flow diagram of pdf document methods of exhibiting second embodiment of the present invention.
In the present embodiment, the step S20 be may particularly include:
Step S201: obtaining the page width and page height of browser page, high according to the page width and the page It spends and determines target the ratio of width to height;
It should be noted that the browser page dimension information in above-described embodiment may include the browser in the present embodiment The page width information and page height information of the page.For example, when acquisition for mobile terminal to the page width information is 1080 Pixel, the page height information are 1920 pixels, then described target the ratio of width to height is 6.85/12.18 ≈ 9:16.
Step S202: the page display parameters of the browser page are obtained, and are determined according to the page display parameters The corresponding effective display area of the current page;
It should be noted that the page display parameters, which can be user, shows mould according to the browser that self-demand is set Formula, such as: full screen display or non-full screen display etc., certain display parameters can also include the word of web page browsing set by user Body, font size, background color etc., the present embodiment to this with no restriction.
In the concrete realization, mobile terminal can determine browser current page according to page display parameters set by user The corresponding region that can be used to show pdf document to be presented, i.e., described effective display area.
Step S203: it is based on described target the ratio of width to height, constructs canvas area in effective display area.
It will be appreciated that in order to meet the reading habit of general user, in the reality for determining mobile terminal display screen curtain The ratio of width to height after that is, described target the ratio of width to height, can construct a use in effective display area based on described target the ratio of width to height In the canvas area limited data stream.
The mobile terminal of this embodiment passes through the page width and page height for obtaining browser page, according to the page width Degree and page height determine target the ratio of width to height;The page display parameters of the browser page are obtained, and aobvious according to the page Show that parameter determines the corresponding effective display area of the current page;Based on described target the ratio of width to height, in effective show area Canvas area is constructed on domain, be ensure that the canvas area finally constructed meets the reading habit of user, is avoided browser to PDF When document display, occur the problem of filled black around painting canvas, further improves user experience when pdf document is read.
With reference to Fig. 4, Fig. 4 is the flow diagram of pdf document methods of exhibiting 3rd embodiment of the present invention.
Based on the various embodiments described above, in the present embodiment, the method is after the step S203, further includes:
Step S204: according to the canvas area, the data stream size that the browser page single page is shown is determined;
It will be appreciated that font, the difference of font size can all be made under different display areas (the i.e. described canvas area) At the data difference for the content that webpage is shown, same display area, the file content that the big single page of font is shown is just few, word The file content that the small single page of body is shown is just more.Therefore, in this step, after canvas area determines, mobile terminal can also root The data flow that the browser page single page can be shown is determined according to the pages display parameters such as font set by user, font size Size.
Step S205: the target data stream is divided according to the data stream size, it is to be presented to obtain several Stream object;
In the concrete realization, mobile terminal, can be by institute after determining data stream size that browser can be shown every time Data stream size is stated as benchmark is divided, entire pdf document to be presented is divided, the pdf document to be presented is divided For several small stream objects.
Step S206: stream object to be presented is arranged by the page number sequence of the current pdf document to be presented Sequence;
After dividing in order to avoid the pdf document to be presented, the mobile terminal carries out stream object to be presented Occur content entanglement when displaying, influence the case where user reads.In the present embodiment, the mobile terminal is literary by PDF to be presented It, can also be according to the reading order of the pdf document content before segmentation, to be presented after part is divided into several small stream objects Stream object resequence, with determination each stream object displaying sequence.
Correspondingly, the step S30 may particularly include:
Step S301: current target data flow object to be presented is determined according to ranking results;
It in the concrete realization, can be according to sequence when mobile terminal is after the displaying sequence for determining each stream object As a result first stream object for next needing to show user, i.e., current target data flow object to be presented are determined.
Certainly, in practical reading process, user may wish to skip a part of PDF content, and direct reading is currently wanted The PDF content checked.Therefore in order to improve the reading experience of user, mobile terminal can be in the predeterminable area displayed page of browser Amplification is reduced, and the page number, which jumps, waits virtual keys in order to which user carries out checking for PDF document according to their needs, optimizes user Experience.When user inputs the content page number for wanting to check on the page, the mobile terminal can be according to the content page number Determine the target data flow object.
Step S302: file content corresponding with the target data flow object is plotted in the canvas area, and right The browser page is shown.
After determining the target data flow object for currently needing to show, the mobile terminal can be with the target data stream pair As corresponding file content is plotted in the canvas area, and the browser page is shown, for user's reading.
Specifically, the mobile terminal can format (i.e. by data flow) the target data flow object, obtain Obtain file content to be presented;Using default drafting script (such as: JavaScript) search painting canvas (Canvas) element, pass through institute It states canvas element and the file content to be presented is plotted to the canvas area, and to including the file content to be presented Browser page is shown.
For the mobile terminal of this embodiment according to the canvas area, the data flow for determining that the browser page single page is shown is big It is small;The target data stream is divided according to the data stream size, obtains several stream objects to be presented;It presses The page number sequence of the current pdf document to be presented is ranked up stream object to be presented;Then according to ranking results Determine current target data flow object to be presented;Will file content corresponding with the target data flow object be plotted in it is described Canvas area, and the browser page is shown, so as to carry out indifference to pdf document according to individual subscriber demand The displaying of alienation improves the reading experience sense of user.
With reference to Fig. 5, Fig. 5 is the flow diagram of pdf document methods of exhibiting fourth embodiment of the present invention.
Based on the various embodiments described above, in the present embodiment, the step S10 be may particularly include:
Step S101: it is instructed in response to user based on the Fileview that browser page inputs, obtains the available of browser Memory headroom;
It should be noted that avoiding user to guarantee that mobile terminal can carry out smooth displaying to pdf document to be presented During checking pdf document, browser influences user experience because low memory collapses.In the present embodiment, the movement Terminal can first obtain the available memory space of browser in the Fileview instruction for receiving user's input.
Step S102: the file size of pdf document to be viewed is obtained, and the file size and the free memory is empty Between be compared;
After getting the available memory space of browser, the mobile terminal can also obtain what user currently wanted to check Then the file size is compared, to determine the need for by the file size of pdf document with the available memory space Shunting downloading is carried out to the pdf document checked.
It should be noted that the pdf document to be viewed is that user wants the entire pdf document checked, it is described to be presented Pdf document can be the pdf document that browser currently needs to download in browser memory and carries out subsequent displaying.
Step S103: the file size be less than the available memory space when, using the pdf document to be viewed as Current pdf document to be presented, and the corresponding target data stream of the pdf document currently to be presented is obtained from server.
In the concrete realization, the mobile terminal is worked as in the file size for detecting pdf document to be viewed less than browser When preceding available memory space, it is empty the memory can be downloaded to using entire pdf document to be viewed as the pdf document to be presented Between in, that is, obtain the corresponding target data stream of the current pdf document to be presented.
Further, in order to guarantee the reading experience of user, the present embodiment is after the step S102, further includes:
Step S104: when the file size is greater than the available memory space, the available memory space is corresponding Reference point of the space size as single download;
It should be noted that showing when the mobile terminal detects that file size is greater than the available memory space Pdf document to be viewed disposably completely can not be downloaded to the browser in the case where not clearing up memory by mobile terminal, At this point, mobile terminal then can be using the space size of the available memory space as size of data (the i.e. institute of each downloading data State reference point), pdf document to be viewed is downloaded in batches.
Step S105: under being carried out in batches according to the reference point to the corresponding target data stream of the pdf document to be viewed It carries, obtains the corresponding target data stream of current pdf document to be presented from server.
In the concrete realization, the mobile terminal is according to the reference point to the corresponding target of the pdf document to be viewed Data flow is downloaded in batches, obtains the corresponding target data stream of current pdf document to be presented, and detecting user to described After the corresponding file content of target data stream is checked, the target data stream stored in browser memory headroom is removed in time, To guarantee the smooth storage for the data flow downloaded next time.
Certainly, in order to guarantee that user can review the pdf document content checked, avoid it is to browsing data and When remove caused by the case where reviewing unsuccessfully generation.The present embodiment may also include that after the step S102 in the file When size is greater than the available memory space, the corresponding memory headroom of the browser is cleared up, so that interior after cleaning Space is deposited greater than the file size;Using the pdf document to be viewed as current pdf document to be presented, obtain described current The corresponding target data stream of pdf document to be presented.
In specific memory headroom scale removal process, the time can be checked according to the corresponding user's last time of each data, pressed From cleaning priority ranking is carried out as far as close sequence, data dump then is carried out according to ranking results, is released certain Memory headroom, such as: it will check that time interval current time is farthest or farther away high priority data is disposed for the last time.
The present embodiment by detection browser free memory whether be more than user's pdf document to be viewed file it is big It is small;If being more than, using the pdf document to be viewed as current pdf document to be presented, and the current PDF to be presented is obtained The corresponding target data stream of file;If being no more than, using the corresponding space size of the available memory space as single download Reference point;The corresponding target data stream of the pdf document to be viewed is downloaded in batches according to the reference point, acquisition is worked as The corresponding target data stream of preceding pdf document to be presented, or the corresponding memory headroom of the browser is cleared up, so that cleaning Memory headroom afterwards is greater than the file size;Using the pdf document to be viewed as current pdf document to be presented, institute is obtained The corresponding target data stream of current pdf document to be presented is stated to improve to ensure that the smooth reading to pdf document of user User experience.
In addition, the embodiment of the present invention also provides a kind of storage medium, it is stored with pdf document on the storage medium and shows journey Sequence, the pdf document presentation program realize the step of pdf document methods of exhibiting described in embodiment as above when being executed by processor Suddenly.
With reference to Fig. 6, Fig. 6 is the structural block diagram that pdf document of the present invention shows device first embodiment
As shown in fig. 6, the pdf document that the present embodiment proposes shows that device includes: data acquisition module 401, painting canvas determination Module 402 and document presentation module 403;
The data acquisition module 401, for being instructed in response to user based on the Fileview that browser page inputs, from Server obtains the corresponding target data stream of current pdf document to be presented;
It should be noted that the pdf document provided by the embodiment shows that device can be with data processing and show Show the user equipment of function, such as: the mobile terminals such as mobile phone, tablet computer, PC.The browser page is worked as user The current page of the preceding browser browsed;The target data stream is that currently to want the pdf document checked corresponding by user File content data stream, the corresponding format of the data flow can be the XML format convenient for transmission and storage.
The painting canvas determining module 402 is determined for obtaining the dimension information of browser page according to the dimension information Canvas area in the browser page;
It will be appreciated that the dimension information can be the dimension information that pdf document shows the entire display interface of device, It can also be in the preset browser of user for showing the size in the personalized region of text, icon or other page elements Information, the present embodiment are without restriction to this.
In the concrete realization, the painting canvas determining module 402, can basis after getting the dimension information of browser page The dimension information determines the canvas area in browser page.By taking the HyperText Markup Language page as an example, under normal conditions The canvas element of HTML5 uses JavaScript script drawing image on webpage.Painting canvas is a rectangular area, the region Each of pixel all can control.Canvas element possesses a variety of drawing paths, rectangle, circle, character and adds Add the method for image.Specifically, mobile terminal can add canvas element to the HTML5 page, and provide the id of element, width and Highly, such as:<canvas id="MyCanvas"width="960"height="540"></canvas>.
The document presentation module 403, for drawing the content of the corresponding pdf document to be presented of the target data stream It is shown in the canvas area, and to the browser page comprising the content.
In the concrete realization, for the document presentation module 403 after the completion of canvas area constructs, what can be will acquire is to be presented The target data stream respective file content of pdf document is plotted in the canvas area, and carries out to the browser page drawn It shows, so that user checks.
The present embodiment pdf document shows that device is instructed in response to user based on the Fileview that browser page inputs, and obtains Take the corresponding target data stream of current pdf document to be presented;The dimension information for obtaining browser page, according to the dimension information Determine the canvas area in the browser page;The corresponding file content of the target data stream is plotted in the painting canvas area Domain, and the browser page is shown, without differences exhibition effectively is realized to pdf document on different mobile terminal Show, improves user experience.
Pdf document of the present invention shows that the other embodiments of device or specific implementation can refer to above-mentioned each method and implement Example, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include the other elements being not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of pdf document methods of exhibiting, which is characterized in that the described method includes:
In response to the Fileview instruction that user is inputted based on browser page, current pdf document to be presented is obtained from server Corresponding target data stream;
The dimension information for obtaining browser page, determines the canvas area in the browser page according to the dimension information;
The content of the corresponding pdf document to be presented of the target data stream is plotted in the canvas area, and to comprising described The browser page of content is shown.
2. the method as described in claim 1, which is characterized in that the dimension information for obtaining browser page, according to described Dimension information determines the canvas area in the browser page, comprising:
The page width and page height for obtaining browser page, determine the wide height of target according to the page width and page height Than;
The page display parameters of the browser page are obtained, and determine the current page pair according to the page display parameters The effective display area answered;
Based on described target the ratio of width to height, canvas area is constructed in effective display area.
3. method according to claim 2, which is characterized in that it is described to be based on described target the ratio of width to height, in effective displaying After constructing canvas area on region, the method also includes:
According to the canvas area, the data stream size that the browser page single page is shown is determined;
The target data stream is divided according to the data stream size, obtains several stream objects to be presented;
Stream object to be presented is ranked up by the page number sequence of the current pdf document to be presented;
The content by the corresponding pdf document to be presented of the target data stream is plotted in the canvas area, and to comprising The browser page of the content is shown, and is specifically included:
Current target data flow object to be presented is determined according to ranking results;
The content of pdf document corresponding with the target data flow object is plotted in the canvas area, and to comprising described The browser page of content is shown.
4. method as claimed in claim 3, which is characterized in that it is described will PDF corresponding with target data flow object text The content of part is plotted in the canvas area, and is shown to the browser page comprising the content, comprising:
The target data flow object is formatted, file content to be presented is obtained;
Canvas element is searched using default drafting script, the file content to be presented is plotted to by institute by the canvas element Canvas area is stated, and the browser page comprising the file content to be presented is shown.
5. method as claimed in claim 4, which is characterized in that the file inputted in response to user based on browser page It checks instruction, obtains the corresponding target data stream of current pdf document to be presented from server, comprising:
In response to the Fileview instruction that user is inputted based on browser page, the available memory space of browser is obtained;
The file size of pdf document to be viewed is obtained, and the file size is compared with the available memory space;
When the file size is less than the available memory space, using the pdf document to be viewed as current PDF to be presented File, and the corresponding target data stream of the pdf document currently to be presented is obtained from server.
6. method as claimed in claim 5, which is characterized in that the file size for obtaining the pdf document to be viewed, and After the file size is compared with the available memory space, the method also includes:
The file size be greater than the available memory space when, using the corresponding space size of the available memory space as The reference point of single download;
The corresponding target data stream of the pdf document to be viewed is downloaded in batches according to the reference point, is obtained from server Take the corresponding target data stream of current pdf document to be presented.
7. method as claimed in claim 5, which is characterized in that the file size for obtaining the pdf document to be viewed, and After the file size is compared with the available memory space, the method also includes:
When the file size is greater than the available memory space, the corresponding memory headroom of the browser is cleared up, So that the memory headroom after cleaning is greater than the file size;
Using the pdf document to be viewed as current pdf document to be presented, the current PDF text to be presented is obtained from server The corresponding target data stream of part.
8. a kind of pdf document shows device, which is characterized in that described device include: data acquisition module, painting canvas determining module and Document presentation module;
The data acquisition module, for being instructed in response to user based on the Fileview that browser page inputs, from server Obtain the corresponding target data stream of current pdf document to be presented;
The painting canvas determining module determines described clear for obtaining the dimension information of browser page according to the dimension information The canvas area look in the device page;
The document presentation module, it is described for the content of the corresponding pdf document to be presented of the target data stream to be plotted in Canvas area, and the browser page comprising the content is shown.
9. a kind of pdf document presentation device, which is characterized in that the equipment includes memory, processor and is stored in described deposit On reservoir and the pdf document presentation program that can run on the processor, the pdf document presentation program be arranged for carrying out as Described in any one of claims 1 to 7 the step of pdf document methods of exhibiting.
10. a kind of storage medium, which is characterized in that be stored with pdf document presentation program, the PDF text on the storage medium Part presentation program realizes the step of pdf document methods of exhibiting as described in any one of claim 1 to 7 when being executed by processor.
CN201810274787.9A 2018-03-29 2018-03-29 PDF file display method, device, equipment and storage medium Active CN110019037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810274787.9A CN110019037B (en) 2018-03-29 2018-03-29 PDF file display method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810274787.9A CN110019037B (en) 2018-03-29 2018-03-29 PDF file display method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110019037A true CN110019037A (en) 2019-07-16
CN110019037B CN110019037B (en) 2023-06-16

Family

ID=67188283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810274787.9A Active CN110019037B (en) 2018-03-29 2018-03-29 PDF file display method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110019037B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111580909A (en) * 2020-05-08 2020-08-25 广州市百果园信息技术有限公司 Picture generation method, device, equipment and storage medium
CN112036123A (en) * 2020-08-31 2020-12-04 北京奇虎鸿腾科技有限公司 PDF (Portable document Format) generation method, device and equipment based on webpage and storage medium
CN112650714A (en) * 2020-12-22 2021-04-13 微民保险代理有限公司 Document display method, device, equipment and computer readable medium
CN116701806A (en) * 2023-06-09 2023-09-05 广州万彩信息技术有限公司 Page display processing method and device, terminal and storage medium
CN116701806B (en) * 2023-06-09 2024-04-26 广州万彩信息技术有限公司 Page display processing method and device, terminal and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
CN103631964A (en) * 2013-12-18 2014-03-12 重庆市科学技术研究院 PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method
CN104935666A (en) * 2015-06-24 2015-09-23 智秦网络科技股份有限公司 Method and system for watching PDF file with mobile terminal
US9418315B1 (en) * 2016-03-14 2016-08-16 Sageworks, Inc. Systems, methods, and computer readable media for extracting data from portable document format (PDF) files
CN107798579A (en) * 2017-10-19 2018-03-13 中国平安财产保险股份有限公司 The generation method and its terminal of a kind of document of agreement

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976268A (en) * 2010-11-19 2011-02-16 百度在线网络技术(北京)有限公司 Online document reading device and method
CN103631964A (en) * 2013-12-18 2014-03-12 重庆市科学技术研究院 PDF (Portable document format)-embedded hypertext markup language (HTML) file shuffling method
CN104935666A (en) * 2015-06-24 2015-09-23 智秦网络科技股份有限公司 Method and system for watching PDF file with mobile terminal
US9418315B1 (en) * 2016-03-14 2016-08-16 Sageworks, Inc. Systems, methods, and computer readable media for extracting data from portable document format (PDF) files
CN107798579A (en) * 2017-10-19 2018-03-13 中国平安财产保险股份有限公司 The generation method and its terminal of a kind of document of agreement

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111580909A (en) * 2020-05-08 2020-08-25 广州市百果园信息技术有限公司 Picture generation method, device, equipment and storage medium
CN111580909B (en) * 2020-05-08 2023-05-05 广州市百果园信息技术有限公司 Picture generation method, device, equipment and storage medium
CN112036123A (en) * 2020-08-31 2020-12-04 北京奇虎鸿腾科技有限公司 PDF (Portable document Format) generation method, device and equipment based on webpage and storage medium
CN112650714A (en) * 2020-12-22 2021-04-13 微民保险代理有限公司 Document display method, device, equipment and computer readable medium
CN112650714B (en) * 2020-12-22 2024-04-05 微民保险代理有限公司 Document display method, device, equipment and computer readable medium
CN116701806A (en) * 2023-06-09 2023-09-05 广州万彩信息技术有限公司 Page display processing method and device, terminal and storage medium
CN116701806B (en) * 2023-06-09 2024-04-26 广州万彩信息技术有限公司 Page display processing method and device, terminal and storage medium

Also Published As

Publication number Publication date
CN110019037B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
US11379108B2 (en) Display controlling method, terminal, information processing apparatus, and storage medium
CN107885848B (en) Webpage screen capturing method based on web technology
US9092131B2 (en) Highlighting of tappable web page elements
CN104834753A (en) Webpage screenshot generating method and device
CN109254818B (en) Pixel-level positioning method and device for different resolutions of browser
US11720235B2 (en) Method and apparatus for browsing table in document, and electronic device and storage medium
Fielding Beginning responsive web design with HTML5 and CSS3
US20130124974A1 (en) System for Assembling Webpage&#39;s Region of Other Website into a Webpage of a Website and Method for the Same
CN110019037A (en) A kind of pdf document methods of exhibiting, device, equipment and storage medium
CN104598468A (en) Web image display method and device
CN108647348A (en) Textual presentation method, apparatus, equipment and storage medium
CN105335419B (en) Web page picture loading method and device
CN104899212B (en) Web page display method, server and system
CN103678343A (en) Method and device for prompting webpage loading progress
CN108984070B (en) Method, apparatus, electronic device and readable medium for thermodynamic diagram imaging
CN104731897A (en) Method and device for achieving information displaying
CN104731817A (en) Webpage display method and device
CN108572980B (en) Webpage split-screen display method and device
CN114880606A (en) Page display method, device, equipment, medium and program product
CN104978181B (en) Page display method, terminal and device
US9536013B2 (en) Method and apparatus for web browsing of handheld device
CN113296661A (en) Image processing method and device, electronic equipment and readable storage medium
CN112162805A (en) Screenshot method and device and electronic equipment
CN115587269B (en) Client H5 page generation method and device
KR101901603B1 (en) Method and apparatus for web browsingof a handheld 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