CN104935666B - A kind of method and system for mobile terminal viewing pdf document - Google Patents

A kind of method and system for mobile terminal viewing pdf document Download PDF

Info

Publication number
CN104935666B
CN104935666B CN201510352549.1A CN201510352549A CN104935666B CN 104935666 B CN104935666 B CN 104935666B CN 201510352549 A CN201510352549 A CN 201510352549A CN 104935666 B CN104935666 B CN 104935666B
Authority
CN
China
Prior art keywords
picture
server
pdf
pdf document
mobile terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510352549.1A
Other languages
Chinese (zh)
Other versions
CN104935666A (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.)
Zhiqin Digital Publishing Co., Ltd.
Original Assignee
Zhi Qin Digital Publishing (xi'an) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhi Qin Digital Publishing (xi'an) Co Ltd filed Critical Zhi Qin Digital Publishing (xi'an) Co Ltd
Priority to CN201510352549.1A priority Critical patent/CN104935666B/en
Publication of CN104935666A publication Critical patent/CN104935666A/en
Application granted granted Critical
Publication of CN104935666B publication Critical patent/CN104935666B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

A kind of method and system for mobile terminal viewing pdf document, method includes: that PDF is uploaded to cloud space;Server downloads the pdf document from cloud space from cloud spatial perception to new pdf document;Pdf document is read in memory by server;Server by utilizing java applet, which say to the pdf document in memory, is converted to the operation of JPG format picture, and JPG format picture is stored on server disk;Picture file batch on disk is uploaded into CDN;Mobile terminal requested webpage or picture, server successively return to CDN, transfer the picture of corresponding page, and are shown in mobile terminal, watch for user.The present invention can quickly open read interface and content, promote user experience, and saving network flow uses, and reduce the EMS memory occupation of reading;The invention enables the browser that need not have PDF parsing function and APP to have the ability to display pdf document content, as long as can support the terminal of picture browsing that can support the PDF browsing function.

Description

A kind of method and system for mobile terminal viewing pdf document
Technical field
The present invention relates to a kind of network digitalization information dissemination method and systems, and in particular to one kind is watched for mobile terminal The method and system of pdf document.
Background technique
PDF file plays critically important effect in people's lives, due to being a kind of portable electronic document lattice Formula, and in several operation systems be all it is general, this performance becomes PDF format to carry out electronics text on network Shelves distribution and digital information propagate ideal document format, more and more e-books, the description of product, company's proclamation, Network data, Email begin to use the file of PDF format.And with the development of internet, people are not content with this PDF file is read on ground, is posted and is wished to read online PDF file based on the browser on mobile terminal.
Currently, common Android and IOS cell phone system can support the parsing and reading of pdf document, and disadvantage is must Pdf document must be entirely loaded into memory.In addition, being limited to mobile device memory and mobile network's rate limitation, movement is set The demand that online PDF is watched on standby (such as mobile phone, Pad) is not still well positioned to meet.
It is concentrated mainly on Railway Project below:
1. loading velocity is slow, just can be carried out since PDF reading must load the entire pdf document of completion, so causing to load Speed is slow;
2. expending network flow, entire file must be downloaded by reading each pdf document, so a large amount of stream can be expended Amount;
3. which kind of technology no matter committed memory use, PDF reading must be loaded into memory PDF, for biggish hundred Million or more pdf document, for the mobile device of memory valuableness, undoubtedly pressure is huge;
4. occupying cpu resource, the parsing and display of PDF needs to expend cpu resource and parses to file, expends CPU money Source;
5. the power consumption that the consuming of network flow and memory, CPU can improve mobile phone;
6. display effect can carry out compression processing to PDF, but cause to compress often in order to overcoming the above Railway Project PDF mass declines afterwards, influences reading experience or even lost content.
Summary of the invention
The purpose of the present invention is to provide a kind of method and system for mobile terminal viewing pdf document, can quickly beat Read interface and content are opened, user experience is promoted, saving network flow uses, and reduces the EMS memory occupation of reading;The invention enables Need not there are the browser of PDF parsing function and APP to have the ability to display pdf document content, as long as in fact, can support to scheme The terminal of piece browsing can support the PDF browsing function.
The technical solution of the invention is as follows:
A method of pdf document being watched for mobile terminal, is characterized in that, this method comprises:
1) PDF is uploaded into cloud space;
2) server downloads the pdf document from cloud space from cloud spatial perception to new pdf document;
3) pdf document is read in memory by server;
4) server by utilizing java applet, which say to the pdf document in memory, is converted to the operation of JPG format picture, and will JPG format picture is stored on server disk;
5) the picture file batch on disk is uploaded into CDN;
6) mobile terminal requested webpage or picture, server successively return to CDN, transfer the picture of corresponding page, and are shown in Mobile terminal is watched for user.
Above-mentioned CDN is content distributing network, by network place that node server constituted everywhere existing One layer of intelligent virtual network on Internet basic, CDN can be in real time according to the connections of network flow and each node, load Situation and the request of user is re-directed into the service nearest from user to the integrated informations such as the distance of user and response time On node.
The mode of above-mentioned generation JPG format picture is to be loaded into memory pdf document using Java development language, then It reads page by page, reuses the tool in java applet and every page PDF is generated to the picture of JPG format in memory, and will give birth to At picture be stored under the specified directory of server, picture name is the page number, and the corresponding picture of first page is 1.jpg, nth page Corresponding picture is n.jpg.
The above-mentioned picture file batch by disk uploads to CDN, specifically by one visit of corresponding generation of each picture It asks the way diameter, and by access path storage to database.
It is above-mentioned say to the pdf document in memory that being converted to the operation of JPG format picture specifically includes using java applet:
1) tool is read using the file in Java development language to be loaded into memory pdf document;
2) first page is intercepted from PDF;
3) content in PDF is given birth in memory using BufferedImage the and Graphics tool of java applet At picture;
4) width and height for first obtaining the PDF page, empty painting canvas is established using Java picture processing program;
5) by PDF text and picture extract;
6) picture and text are added in painting canvas using Java paint program;
7) picture in memory is stored under the specified directory of server, the filename page number adds the form of jpg;
8) judge whether pdf document has lower one page, exited if not, if there is if take lower one page, continue to generate.
Above-mentioned mobile terminal includes the browser or APP of mobile terminal;The picture is shown in mobile terminal and refers to mobile terminal Browser or APP initiate to request to server, and server returns to the access path of picture;Mobile terminal browser or APP root Every page PDF corresponding JPF picture access address is risked according to the picture path taken, and is Loaded Image.
Above-mentioned server is to be found out to new using the realization of timing probe monitoring programme from cloud spatial perception to new pdf document Pdf document.
It is a kind of realize the above method for mobile terminal watch pdf document system, be characterized in that including service Device, and the mobile terminal connected with server by internet, the management end in the cloud space, upper transmitting file that are connect with server with And database, the server are equipped with picture processing program, the server includes at least a temp directory.
Above-mentioned mobile terminal refers to the browser or APP of mobile terminal.
Above-mentioned picture processing program includes timing probe monitoring programme and java applet.
The invention has the advantages that
1, read interface and content are quickly opened, user experience is promoted.
2, saving network flow uses.
3, the EMS memory occupation read is reduced.
4, the loss to CPU is reduced.
5, from the saving to flow, memory, CPU three, to save battery.
6, greatly retain original PDF reading effect.
Detailed description of the invention
Fig. 1 is implementation process schematic diagram of the present invention.
Specific embodiment
Referring to Fig. 1, the invention discloses a kind of method and system that pdf document is shown for mobile terminal.This method includes PDF is uploaded into cloud space;The monitoring programme of server is from cloud spatial perception to new pdf document;Server is under cloud space Carry pdf document;Pdf document is read in memory using java applet by server;Java applet turns the pdf document in memory The operation of JPG format picture is changed, every page of pdf document generates a JPG picture and is stored on server disk, and picture name is page Code, if the corresponding picture of first page is 1.jpg, the corresponding picture of page 99 is 99.jpg;Java applet is by the picture on disk Files in batch uploads to CDN;Mobile terminal requested webpage or picture, server successively return to 1 to N pages corresponding picture, every time Only one picture of display.
The full name of CDN is Content Delivery Network, i.e. content distributing network in the present invention.Its basic ideas It is the bottleneck and link for avoiding being possible to influence data transmission bauds and stability on internet as far as possible, makes content transmission more Fastly, more stable.By placing one on the existing Internet basic layer intelligence that node server is constituted everywhere in network Can virtual network, CDN system can in real time according to the connection of network flow and each node, load state and to user away from The request of user is re-directed on the service node nearest from user from integrated informations such as response times.The purpose is to use Family can obtain required content nearby, solve the crowded situation of Internet network, improve the response speed that user accesses website.
The present invention say to the pdf document in memory using java applet is converted to the specific packet of JPG format picture operation It includes:
1) tool is read using the file in Java development language to be loaded into memory pdf document;
2) first page is intercepted from PDF;
3) content in PDF is given birth in memory using BufferedImage the and Graphics tool of java applet At picture;
4) width and height for first obtaining the PDF page, empty painting canvas is established using Java picture processing program;
5) by PDF text and picture extract;
6) picture and text are added in painting canvas using Java paint program;
7) picture in memory being stored under the specified directory of server, the filename page number adds the form of jpg, such as First page is 1.jpg;
8) judge whether pdf document has lower one page, exited if not, if there is if take lower one page, continue to generate.
The invention enables the browser that need not have PDF parsing function and APP to have the ability to display pdf document content, real On border, as long as can support the terminal of picture browsing that can support the PDF browsing function.Specific implementation method:
1) pdf document is uploaded to cloud space (such as OSS of Ali's cloud)
2) the timing probe monitoring programme of operation on the server finds out new pdf document, and obtains the visit of pdf document It asks the way diameter;
3) java applet of operation on the server downloads pdf document to server memory from obtained access path;
4) operation java applet on the server carries out paging reading to the pdf document in memory and by every page of life
At a JPG format picture, picture name and the page number are corresponding, are 1.jpg as first page corresponds to picture;
5) program saves the JPG picture in memory in a temp directory on the server;
6) complete entire PDF turn picture process after, the program on server uploads to all pictures in CDN, and By path storage into database;
7) browser or APP of mobile terminal initiate to request to server, and server returns to the access path of picture;
8) mobile terminal browser or APP risk the corresponding JPF picture access of every page PDF according to the picture path taken Address, and Load Image.
Technical solution of the present invention bring the utility model has the advantages that
1, read interface and content are quickly opened, user experience is promoted.
2, saving network flow uses.
3, the EMS memory occupation read is reduced.
4, the loss to CPU is reduced.
5, from the saving to flow, memory, CPU three, to save battery.
6, greatly retain original PDF reading effect.

Claims (7)

1. a kind of method for mobile terminal viewing pdf document, which is characterized in that this method comprises:
1) PDF is uploaded into cloud space;
2) server downloads the pdf document from cloud space from cloud spatial perception to new pdf document;
3) pdf document is read in memory by server;
4) server by utilizing java applet be converted to the operation of JPG format picture to the pdf document in memory, and by JPG lattice Formula picture is stored on server disk;
5) the picture file batch on disk is uploaded into CDN;
6) mobile terminal requested webpage or picture, server successively return to CDN, transfer the picture of corresponding page, and are shown in movement End is watched for user;
The server by utilizing java applet be converted to the operation of JPG format picture to the pdf document in memory and specifically includes:
1) tool is read using the file in Java development language to be loaded into memory pdf document;
2) first page is intercepted from PDF;
3) content in PDF is generated into figure in memory using BufferedImage the and Graphics tool of java applet Piece;
4) width and height for first obtaining the PDF page, empty painting canvas is established using Java picture processing program;
5) by PDF text and picture extract;
6) picture and text are added in painting canvas using Java paint program;
7) picture in memory is stored under the specified directory of server, the filename page number adds the form of jpg;
8) judge whether pdf document has lower one page, exited if not, if there is if take lower one page, continue to generate;
The picture file batch by disk uploads to CDN, specifically by one access road of the corresponding generation of each picture Diameter, and the access path is stored to database;
The mobile terminal includes the browser or APP of mobile terminal;The picture is shown in the browsing that mobile terminal refers to mobile terminal Device or APP initiate to request to server, and server returns to the access path of picture;Mobile terminal browser or APP are according to taking To picture path risk every page PDF corresponding JPF picture access address, and Load Image.
2. the method for mobile terminal viewing pdf document according to claim 1, it is characterised in that: the full name of the CDN is Content distributing network, by placing one on existing Internet basic that node server is constituted everywhere in network Layer intelligent virtual network, CDN can in real time according to the connection of network flow and each node, load state and to user away from The request of user is re-directed on the service node nearest from user from integrated informations such as response times.
3. the method for mobile terminal viewing pdf document according to claim 1, it is characterised in that: the generation JPG format The mode of picture is to be loaded into memory pdf document using Java development language, then reads page by page, reuses java applet In tool every page PDF is generated to the picture of JPG format in memory, and the picture of generation is stored in the finger of server Determine under catalogue, picture name is the page number, and the corresponding picture of first page is 1.jpg, and the corresponding picture of nth page is n.jpg.
4. the method for mobile terminal viewing pdf document according to claim 1, it is characterised in that: the server is from cloud Spatial perception is to find out new pdf document using the realization of timing probe monitoring programme to new pdf document.
5. pdf document system is watched in a kind of mobile terminal that is used for for realizing claim 1 the method, it is characterised in that: including clothes Business device, and the mobile terminal connected by internet with server, the management end in the cloud space, upper transmitting file that are connect with server And database, the server are equipped with picture processing program, the server includes at least a temp directory.
6. watching pdf document system for mobile terminal according to claim 5, it is characterised in that: the mobile terminal refers to shifting The browser or APP of moved end.
7. watching pdf document system for mobile terminal according to claim 6, it is characterised in that: the picture processing program Including timing probe monitoring programme and java applet.
CN201510352549.1A 2015-06-24 2015-06-24 A kind of method and system for mobile terminal viewing pdf document Active CN104935666B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510352549.1A CN104935666B (en) 2015-06-24 2015-06-24 A kind of method and system for mobile terminal viewing pdf document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510352549.1A CN104935666B (en) 2015-06-24 2015-06-24 A kind of method and system for mobile terminal viewing pdf document

Publications (2)

Publication Number Publication Date
CN104935666A CN104935666A (en) 2015-09-23
CN104935666B true CN104935666B (en) 2019-01-01

Family

ID=54122634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510352549.1A Active CN104935666B (en) 2015-06-24 2015-06-24 A kind of method and system for mobile terminal viewing pdf document

Country Status (1)

Country Link
CN (1) CN104935666B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786778B (en) * 2016-02-29 2018-04-27 四川长虹电器股份有限公司 The long-range method for reading pdf document
CN107807950B (en) * 2017-09-18 2021-05-04 南京华盾电力信息安全测评有限公司 Online friendly reading picture segmentation method for Internet station group magazine files
CN108038124B (en) * 2017-11-06 2020-08-28 广东广业开元科技有限公司 PDF document acquisition and processing method, system and device based on big data
CN108509396A (en) * 2017-12-25 2018-09-07 平安科技(深圳)有限公司 Pdf document turns method, electronic device and the computer readable storage medium of picture
CN110019037B (en) * 2018-03-29 2023-06-16 中国平安财产保险股份有限公司 PDF file display method, device, equipment and storage medium
CN109992564B (en) * 2019-02-20 2024-03-22 深圳大普微电子科技有限公司 File storage system and method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851697A (en) * 2005-10-28 2006-10-25 华为技术有限公司 Method for dynamic displaying pictures at Web end
CN101727674A (en) * 2008-10-30 2010-06-09 北大方正集团有限公司 Method for marking picture in file, and method for reproducing mark of picture in file
CN102467495A (en) * 2011-09-08 2012-05-23 中标软件有限公司 Method for handwriting comment for odt format file
CN103020263A (en) * 2012-12-24 2013-04-03 北京小米科技有限责任公司 Method, device and terminal for storing webpage information
CN103201997A (en) * 2010-10-12 2013-07-10 天津书生投资有限公司 A method and system of Web-based document service
CN103389969A (en) * 2012-05-07 2013-11-13 腾讯科技(深圳)有限公司 Method, device and system for previewing PDF (portable document format) file on mobile terminal
CN103870583A (en) * 2014-03-25 2014-06-18 东方电气集团东方汽轮机有限公司 Relational-database-based online and controllable browsing method for PDF document

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851697A (en) * 2005-10-28 2006-10-25 华为技术有限公司 Method for dynamic displaying pictures at Web end
CN101727674A (en) * 2008-10-30 2010-06-09 北大方正集团有限公司 Method for marking picture in file, and method for reproducing mark of picture in file
CN103201997A (en) * 2010-10-12 2013-07-10 天津书生投资有限公司 A method and system of Web-based document service
CN102467495A (en) * 2011-09-08 2012-05-23 中标软件有限公司 Method for handwriting comment for odt format file
CN103389969A (en) * 2012-05-07 2013-11-13 腾讯科技(深圳)有限公司 Method, device and system for previewing PDF (portable document format) file on mobile terminal
CN103020263A (en) * 2012-12-24 2013-04-03 北京小米科技有限责任公司 Method, device and terminal for storing webpage information
CN103870583A (en) * 2014-03-25 2014-06-18 东方电气集团东方汽轮机有限公司 Relational-database-based online and controllable browsing method for PDF document

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Common Usage Scenarios;Ken Fyten, Patrick Corless;《www.icesoft.org》;20150220;第1-2页
Converting PDF Page Renderings;Ken Fyten, Mark Collette;《www.icesoft.org》;20100227;第1-3页
Extracting Images;Ken Fyten, Mark Collette;《www.icesoft.org》;20100227;第1-3页
Extracting Text;Ken Fyten, Patrick Corless;《www.icesoft.org》;20130325;第1-2页
Introduction to ICEpdf (v.9);Ken Fyten, Patrick Corless;《www.icesoft.org》;20130322;第1页

Also Published As

Publication number Publication date
CN104935666A (en) 2015-09-23

Similar Documents

Publication Publication Date Title
CN104935666B (en) A kind of method and system for mobile terminal viewing pdf document
US10979213B2 (en) Blockchain compression using summary and padding blocks
CN103002010B (en) A kind of data-updating method based on incremental data, device and system
CN103389969B (en) A kind of methods, devices and systems for mobile terminal preview pdf document
US8825749B2 (en) Method of tracking offline user interaction in a rendered document on a mobile device
WO2015161658A1 (en) Webpage resource loading method and device
CN101853158A (en) Method and device for adjusting Widget window
CN102184177A (en) Method and system for previewing file
CN109376318B (en) Page loading method, computer readable storage medium and terminal equipment
CN106776761A (en) A kind of mobile browser renders the method and device of webpage
CN102520918A (en) Method and device for increasing list refreshing frequency
CN102207976A (en) Method for downloading and browsing webpage data
US10467790B2 (en) On-demand image spriting
CN101867605A (en) Method, device and system for improving synchronous efficiency of RSS (Really Simple Syndication) business
KR101485949B1 (en) Method and system for web page rearrangement
CN103067480A (en) Synchronized method and system of network disk
US20190114989A1 (en) Systems and methods for image optimization
CN103108035A (en) Application localization method and device based on web-based operating system (WEBOS)
CN102479355A (en) Method and device for loading business documents and mobile terminal
CN102882960B (en) A kind of sending method of resource file and device
CN103902571A (en) Method and system for saving webpage complete content and corresponding client end and server
CN103401926A (en) Method and device for improving network resource access speed
CN102890687B (en) A kind of mthods, systems and devices browsing webpage picture group
CN102437894A (en) Method, device and equipment for compressing information to be sent
CN103269339B (en) Based on document transmission method and the system of HTML (Hypertext Markup Language)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20181011

Address after: 710000 D G301, national digital publishing base, 996 Tian Yuan Road, Xi'an High-tech Zone, Shaanxi.

Applicant after: Zhi Qin digital publishing (Xi'an) Co., Ltd.

Address before: 710000 Xi'an science and technology road 50, Jinqiao International Plaza, 10, 1006, C, Shaanxi.

Applicant before: ZHIQIN NETWORK TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 710000 D G301, national digital publishing base, 996 Tian Yuan Road, Xi'an High-tech Zone, Shaanxi.

Patentee after: Zhiqin Digital Publishing Co., Ltd.

Address before: 710000 D G301, national digital publishing base, 996 Tian Yuan Road, Xi'an High-tech Zone, Shaanxi.

Patentee before: Zhi Qin digital publishing (Xi'an) Co., Ltd.

CP01 Change in the name or title of a patent holder