CN107463536A - A kind of method and system for realizing document in online preview server in Android device - Google Patents

A kind of method and system for realizing document in online preview server in Android device Download PDF

Info

Publication number
CN107463536A
CN107463536A CN201710695171.4A CN201710695171A CN107463536A CN 107463536 A CN107463536 A CN 107463536A CN 201710695171 A CN201710695171 A CN 201710695171A CN 107463536 A CN107463536 A CN 107463536A
Authority
CN
China
Prior art keywords
document
server
android
data object
online preview
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.)
Pending
Application number
CN201710695171.4A
Other languages
Chinese (zh)
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.)
XIAMEN TIPRAY TECHNOLOGY Co Ltd
Original Assignee
XIAMEN TIPRAY TECHNOLOGY 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 XIAMEN TIPRAY TECHNOLOGY Co Ltd filed Critical XIAMEN TIPRAY TECHNOLOGY Co Ltd
Priority to CN201710695171.4A priority Critical patent/CN107463536A/en
Publication of CN107463536A publication Critical patent/CN107463536A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a kind of method for realizing document in online preview server in Android device, and step is:Data object corresponding to the document that android terminal will need online preview is sent to server;Server parses to data object, obtains the unique mark of document, obtains corresponding document by data base querying, is converted to PDF format;Server is then forwarded to android terminal by the server address write-in data object where document;The data object that android terminal the reception server returns, parses to obtain the server address where PDF format document to it;Android terminal obtains the binary stream of document by Java technology from server address, shows the PDF binary streams using the view plug-ins of increasing income that PDF format can be read, completes the display of document.Such a method can realize the document in the online preview server of Android device, realize simple, raising reading experience.Invention additionally discloses a kind of system for realizing document in online preview server in Android device.

Description

A kind of method and system for realizing document in online preview server in Android device
Technical field
The invention belongs to the related technical field of network information of Android, and in particular to online preview clothes in a kind of Android device The method and system of document on business device.
Background technology
With the continuous development of science and technology, Android device has been popularized, and realizes that document is online in these Android devices The demand of preview is increasing.The online preview majority of current document is realized by browser and Flash plug-in units, specific real Now step is:
(1) various documents are first converted into the document of swf forms;
(2) be constructed for the Flash broadcast interfaces of playblast using Flash technology, and be embedded into webpage;
(3) preview document of swf forms is loaded into the Flash broadcast interfaces made;
(4) display is loaded with the Flash broadcast interfaces of the preview document of swf forms in Android device, so as to realize text The online preview of shelves.
Its shortcoming is:It can not be used in the Android device for not supporting Flash playing functions, it is necessary to by third-party Flash browsers, versatility are poor.
The content of the invention
The purpose of the present invention, it is to provide and a kind of realize in Android device the method for document in online preview server and be System, it can realize the document in the online preview server of Android device, realize simple, raising reading experience.
In order to reach above-mentioned purpose, solution of the invention is:
A kind of method for realizing document in online preview server in Android device, be included in android terminal and server it Between carry out data communication, methods described comprises the following steps:
Step 1, data object corresponding to the document that android terminal will need online preview is sent to server;
Step 2, the data object that server is sent to android terminal parses, and obtains the unique mark of document, passes through Data base querying obtains corresponding document, converts the document into PDF format;
Step 3, what the server address write service device where server is converted into the document after PDF format received In data object, amended data object is then forwarded to android terminal;
Step 4, the data object that android terminal the reception server returns, where parsing to obtain PDF format document to it Server address;
Step 5, document is obtained in the server address where the document that android terminal is analytically obtained by Java technology Binary stream, show the PDF binary streams using the view plug-ins of increasing income that PDF format can be read, complete the display of document.
In above-mentioned steps 1, data object corresponding to document includes following parameter:name:Document name;url:Taken where document The address of business device;And uuid:The exclusive identification code of the document;In step 2, after server parses to data object, Obtain parameter name, url and uuid.
In above-mentioned steps 5, android terminal passes through URL, InputStreamReader or the BufferedReader in Java Technology obtains the binary stream of document from server address.
In above-mentioned steps 5, the view plug-ins of increasing income that PDF format can be read refer to com.github.barteksc: android-pdf-viewer。
A kind of system for realizing document in online preview server in Android device, including android terminal and server;
Server includes:
Receiving module, for receive android terminal transmission the online preview request of document and online preview document corresponding to number According to object;
Transcoding module, for according to obtained unique mark in parsing received data object, by corresponding to unique mark Document is converted to PDF format;And
First sending module, for by the document related data parameter read-in data object after conversion and being sent to peace Tall and erect terminal, the data object include the server address where document after conversion;
Android terminal includes:
Second sending module, for sending the online preview request of document to server, the request is included corresponding to document Data object;
Terminal receiving module is used to receive the document data object after the conversion of the server return;And
Display module, the view plug-ins of increasing income that PDF format can be read are integrated with, for showing by Java technology analytically The binary stream of document is obtained in server address where obtained document.
After such scheme, preview document is converted to PDF format by the present invention, is read for Android device, using PDF across Platform, it is safe, be not easy to change, read the characteristics of performance is high, reading comfort is good, compared to the document of word forms, PDF texts Part form is more formal.
Brief description of the drawings
Fig. 1 is the integrated stand composition of the present invention;
Fig. 2 is the flow chart of the present invention.
Embodiment
Below with reference to accompanying drawing, technical scheme and beneficial effect are described in detail.
The present invention provides a kind of method for realizing document in online preview server in Android device, when realizing, first Ensure that server can be communicated successfully with android terminal, the two can mutually Phase Receiver and transmission data, and now android terminal Have shown that a series of document obtained from server;Server and android terminal arrange a known data object, false The entitled Document of the fixed object, concurrently sets and following parameter is included in Document objects:name:Document name;url:Document The address of place server;uuid:The exclusive identification code of the document.Coordinate shown in Fig. 2, methods described comprises the following steps:
Step 1, all documents shown in android terminal have a data object Document, by each object institute The memory address of mapping is all different, therefore each document has oneself corresponding data object, when user clicks on When needing to carry out the document of online preview in android terminal, android terminal sends data object Document corresponding to the document To server;
Step 2, server receives the data object Document of android terminal transmission, to data object Document Parsed, obtain the unique mark of document:Parameter name, url and uuid, received data pair is obtained by data base querying As corresponding document, server converts the document into PDF format again;
Step 3, what the server address write service device where server is converted into the document after PDF format received In data object Document url parameters, the data object Document after renewal is then forwarded to android terminal;
Step 4, the data object Document that android terminal the reception server returns, parses to obtain parameter url institutes to it Server address where the document of expression;
Step 5, android terminal passes through the technologies such as the URL in Java, InputStreamReader, BufferedReader The binary stream of document is obtained in server address where the document analytically obtained, using increasing income for PDF format can be read View plug-ins show the PDF binary streams, complete the display of document.
Wherein, the PDF being mentioned above, is a kind of document format of Adobe companies exploitation, and Adobe companies have completely to PDF Copyright, therefore the primary document for not supporting to read PDF format of Android system of Google exploitations is, it is necessary to non-Google officials Android Application developer voluntarily writes the view plug-ins that PDF format can be read, and the android terminal being related in the present invention, is integrated with readable Take the view plug-ins com.github.barteksc that increases income of PDF format:android-pdf-viewer.
The present invention also provides a kind of system for realizing document in online preview server in Android device, including android terminal And server, as shown in figure 1, server includes receiving module, transcoding module and the first sending module, the receiving module is used for Data object corresponding to the online preview request of document and online preview document that reception android terminal is sent;The transcoding module is used According to the unique mark obtained in parsing received data object, document corresponding to unique mark is converted into PDF format;Institute The first sending module is stated to be used for the document related data parameter read-in data object after conversion and be sent to android terminal, The data object includes the information such as the server address where document after conversion;Android terminal includes the second sending module, terminal Receiving module and display module, wherein, second sending module is used to send the online preview request of document to server, described Request includes data object corresponding to document;The terminal receiving module is used for after receiving the conversion that the server returns Document data object;The display module is integrated with the view plug-ins of increasing income that PDF format can be read com.github.barteksc:Android-pdf-viewer terminal display module, pass through Java technology from solution for showing The binary stream of document is obtained in the address of server where analysing obtained document.
The technological thought of above example only to illustrate the invention, it is impossible to protection scope of the present invention is limited with this, it is every According to technological thought proposed by the present invention, any change done on the basis of technical scheme, the scope of the present invention is each fallen within Within.

Claims (5)

1. a kind of method for realizing document in online preview server in Android device, is included between android terminal and server Carry out data communication, it is characterised in that methods described comprises the following steps:
Step 1, data object corresponding to the document that android terminal will need online preview is sent to server;
Step 2, the data object that server is sent to android terminal parses, and obtains the unique mark of document, passes through data Library inquiry obtains corresponding document, converts the document into PDF format;
Step 3, the data that the server address write service device where server is converted into the document after PDF format receives In object, amended data object is then forwarded to android terminal;
Step 4, the data object that android terminal the reception server returns, parses to obtain the service where PDF format document to it Device address;
Step 5, the two of document is obtained in the server address where the document that android terminal is analytically obtained by Java technology System stream, the PDF binary streams are shown using the view plug-ins of increasing income that PDF format can be read, complete the display of document.
2. a kind of method for realizing document in online preview server in Android device as claimed in claim 1, its feature exist In:In the step 1, data object corresponding to document includes following parameter:name:Document name;url:Server where document Address;And uuid:The exclusive identification code of the document;In step 2, after server parses to data object, obtain Parameter name, url and uuid.
3. a kind of method for realizing document in online preview server in Android device as claimed in claim 1, its feature exist In:In the step 5, android terminal passes through URL, InputStreamReader or the BufferedReader technology in Java The binary stream of document is obtained from server address.
4. a kind of method for realizing document in online preview server in Android device as claimed in claim 1, its feature exist In:In the step 5, the view plug-ins of increasing income that PDF format can be read refer to com.github.barteksc:android- pdf-viewer。
A kind of 5. system for realizing document in online preview server in Android device, it is characterised in that:Including android terminal and Server;
Server includes:
Receiving module, for receive android terminal transmission the online preview request of document and online preview document corresponding to data pair As;
Transcoding module, for according to obtained unique mark in parsing received data object, by document corresponding to unique mark Be converted to PDF format;And
First sending module, for by the document related data parameter read-in data object after conversion and be sent to Android end End, the data object include the server address where document after conversion;
Android terminal includes:
Second sending module, for sending the online preview request of document to server, the request includes data corresponding to document Object;
Terminal receiving module is used to receive the document data object after the conversion of the server return;And
Display module, the view plug-ins of increasing income that PDF format can be read are integrated with, are analytically obtained by Java technology for showing Document where the binary stream of document is obtained in server address.
CN201710695171.4A 2017-08-15 2017-08-15 A kind of method and system for realizing document in online preview server in Android device Pending CN107463536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710695171.4A CN107463536A (en) 2017-08-15 2017-08-15 A kind of method and system for realizing document in online preview server in Android device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710695171.4A CN107463536A (en) 2017-08-15 2017-08-15 A kind of method and system for realizing document in online preview server in Android device

Publications (1)

Publication Number Publication Date
CN107463536A true CN107463536A (en) 2017-12-12

Family

ID=60549743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710695171.4A Pending CN107463536A (en) 2017-08-15 2017-08-15 A kind of method and system for realizing document in online preview server in Android device

Country Status (1)

Country Link
CN (1) CN107463536A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145242A (en) * 2018-10-11 2019-01-04 北京神州泰岳软件股份有限公司 The online sharing method of office documents, system and computer readable storage medium
WO2021003750A1 (en) * 2019-07-11 2021-01-14 深圳市鹰硕技术有限公司 File preview method, apparatus, and storage medium
CN112492042A (en) * 2020-12-08 2021-03-12 清华大学 Application program cross-platform system of optical microcavity sensing device
CN113377950A (en) * 2021-06-02 2021-09-10 浪潮软件股份有限公司 Method for realizing flat storage and real-time preview of unstructured document

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589836A (en) * 2015-12-21 2016-05-18 华为技术有限公司 Document previewing method, terminal and server

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589836A (en) * 2015-12-21 2016-05-18 华为技术有限公司 Document previewing method, terminal and server

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145242A (en) * 2018-10-11 2019-01-04 北京神州泰岳软件股份有限公司 The online sharing method of office documents, system and computer readable storage medium
CN109145242B (en) * 2018-10-11 2021-05-04 鼎富智能科技有限公司 Office document online sharing method, system and computer readable storage medium
WO2021003750A1 (en) * 2019-07-11 2021-01-14 深圳市鹰硕技术有限公司 File preview method, apparatus, and storage medium
CN112492042A (en) * 2020-12-08 2021-03-12 清华大学 Application program cross-platform system of optical microcavity sensing device
CN113377950A (en) * 2021-06-02 2021-09-10 浪潮软件股份有限公司 Method for realizing flat storage and real-time preview of unstructured document

Similar Documents

Publication Publication Date Title
US8403222B2 (en) Method of enabling the downloading of content
CN103389969B (en) A kind of methods, devices and systems for mobile terminal preview pdf document
CN104281827B (en) Identify the method and device of Quick Response Code
CN107463536A (en) A kind of method and system for realizing document in online preview server in Android device
KR20190039230A (en) Method and system for server-side rendering of native content for presentations
CN109902247B (en) Page rendering method and device and electronic equipment
CN104598902A (en) Method and device for identifying screenshot and browser
CN103873918A (en) Picture processing method, device and terminal
US9043343B2 (en) Identifier assigning method, identifier parsing method, and multimedia reading
US20110307776A1 (en) Transcoding a web page
CN104063401A (en) Webpage style address merging method and device
CN101771928B (en) Method and system and proxy server for Webpage transmitting
CN102314499A (en) Method and equipment for processing webpage content
CN103577447A (en) Method and equipment used for determining page type information of target pages
CN105095370A (en) Information push method, device and system for expansion application
CN103544150A (en) Method and system for providing recommendation information for mobile terminal browser
WO2015154682A1 (en) Network request processing method, network server, and network system
CN104125273A (en) Image transmission method in web page, image server, network server and client
CN114039801B (en) Short link generation method, short link analysis system, short link analysis equipment and storage medium
CN103036929A (en) Multimedia file processing method and network side equipment in communication system
KR101541659B1 (en) Microblog-based document file sharing method and device
CN101389089B (en) Mobile terminal adaptation processing method and apparatus based on WAP system
CN102663063B (en) System and method for showing general information of multiple user platforms based on XSLT (extensible stylesheet language transformation)
CN105589870B (en) Method and system for filtering webpage advertisements
CN103561066A (en) Method and system for constructing network advertisements

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171212

RJ01 Rejection of invention patent application after publication