CN109213968A - A kind of method of online preview network disk file - Google Patents

A kind of method of online preview network disk file Download PDF

Info

Publication number
CN109213968A
CN109213968A CN201810860522.7A CN201810860522A CN109213968A CN 109213968 A CN109213968 A CN 109213968A CN 201810860522 A CN201810860522 A CN 201810860522A CN 109213968 A CN109213968 A CN 109213968A
Authority
CN
China
Prior art keywords
file
page
preview
type
picture
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
CN201810860522.7A
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.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft Information 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN201810860522.7A priority Critical patent/CN109213968A/en
Publication of CN109213968A publication Critical patent/CN109213968A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a kind of method of online preview network disk file, is related to Computer Applied Technology, and the present invention judges whether to support preview this document firstly, after user's select file.Then, it if not supporting preview, directly exits;If supporting preview, file is taken according to ID, and judge file type.Secondly, being translated into pdf document if it is Office type using OpenOffice, and pass the page back, being shown using PDF.js;If it is picture-type files, then passes the page back and show picture;If it is other type files, then page display text is passed back.It is able to use Dropbox preview Office file, picture and alternative document.

Description

A kind of method of online preview network disk file
Technical field
The present invention relates to Computer Applied Technology more particularly to a kind of methods of online preview network disk file.
Background technique
OpenOffice is a set of cross-platform office's software suite, can be in Windows, Linux, MacOS X (X11) It is executed in the operating systems such as Solaris.It is compatible with each main office's software suite.
OpenOffice has the maximum potential quality for using open standard in Office suite.OpenOffice is an opening Source code and completely free Office suite.In current commercial situations.If a manufacturer is in source code and the mark used Retained in standard or maintained secrecy, then its potential non-technical reason is exactly to obtain commercial interest or the potential business of protection Interests.OpenOffice completely free and open source code, then there will be no any non-in terms of using open standard The burden of technology.OpenOffice default uses the OASIS ODF document format of standard open.OASIS document format independently of Any manufacturer and realization, therefore ensure that her freedom and independence.And for its user, increase its selection The freedom degree of Office product.
PDF.js is the PDF reader established by HTML5.Rely on open source community driving and the laboratory Mozilla Technical support.Target establishes general a, platform for parsing and rendering pdf document based on web.
Summary of the invention
In view of problem above, the invention proposes a kind of methods of online preview network disk file must to solve existing Dropbox The problem of capable of just checking file after must downloading.
The purpose of the present invention is what is be achieved through the following technical solutions,
A kind of method of online preview network disk file, firstly, judging whether to support preview this article after user's select file Part;Then, it if not supporting preview, directly exits;If supporting preview, file is taken according to ID, and judge file type;Its It is secondary, if it is Office type, it is translated into pdf document using OpenOffice, and pass the page back, it is aobvious using PDF.js Show;If it is picture-type files, then passes the page back and show picture;If it is other type files, then page display text is passed back This.
Include the following steps:
1, configuration OpenOffice service
2, user's select file
3, the page judges whether to support preview
4, server takes file according to file ID
5, server is to files in different types processing
Wherein,
Step 3 the following steps are included:
Step 3.1 obtains file type.From filename, suffix name, the type as file are intercepted.
Step 3.2 judges whether file type supports preview.If file supports preview, 4 are entered step;If file is not It supports preview, enters step 33.
Step 3.3 prompt can not preview.In the page, the file of user's selection is prompted, does not support preview.
Step 4 the following steps are included:
Step 4.1 server is according to file ID, from data base querying the file information.
Step 4.2 takes file.The file of Dropbox deposits in Hadoop file system, obtains file according to path.
Step 5 the following steps are included:
Step 5.1 handles Office type file.
Step 5.1 further comprises following sub-step:
Step 5.1-1 judges whether file has been type PDF.It is to enter step 51-3, otherwise enters step 51-2.
Step 5.1-2 connection OpenOffice, switchs to pdf document for source file.OpenOfice service, can be by office text Shelves are converted to the document of PDF format (including doc, docx, xls, xlsx etc.).
Step 5.1-3 passes pdf document back the page.Server sends data to browser, and pdf document is passed to the page.
Step 5.1-4 page invocation PDf.js shows pdf document.The plug-in unit is not necessarily to any local technical support, Ji Keshi Present browser reads pdf document.
Step 5.2 further comprises following sub-step:
Step 5.2-1 passes picture back the page.Server sends data to browser, and picture file is passed to the page.
The step 5.2-2 page shows picture.It uses<img>label directly displays picture.
Step 5.3 further comprises following sub-step:
Step 5.3-1 passes text back the page.Server sends data to browser, and text is passed to the page.
Step 5.3-2 page display text.<div>label is used, plain text will show that text, html file are then browsed Device resolves to webpage.
The invention has the following advantages that
1, browser, can preview office file without installing any plug-in unit.
2, can preview file type it is more.Support office file, picture, text-only file etc..
3, the pdf document of office file conversion, is deleted after use, is mitigated file system and is stored pressure.
Detailed description of the invention
Fig. 1 is general flow chart of the present invention using the method preview network disk file of online preview network disk file.
Specific embodiment
More detailed elaboration is carried out to the contents of the present invention below:
A kind of method of online preview network disk file of the invention, including configuration OpenOffice service, user select text Part, the page judge whether that preview, server is supported to take file, server to files in different types processing according to file ID.
1, judge whether to support preview in the page using the method for online preview network disk file, comprising the following steps:
1) file type is obtained.From filename, suffix name, the type as file are intercepted.
2) judge whether file type supports preview.If file supports preview, server takes file according to file ID;Such as Fruit file does not support preview, then enters step 3).The file type of support, such as table 1.
Classification File type
Office file pdf,docx,doc,xlsx,xls,ppt,pptx
Picture png,jpg,jpeg,gif,bmp
Plain text html,htm,txt
Table 1
3) prompt can not preview.In the page, the file of user's selection is prompted, does not support preview.
2, server takes file according to file ID, comprising the following steps:
2-1) server is according to file ID, from data base querying the file information.
2-2) take file.The file of Dropbox deposits in Hadoop file system, obtains file according to path.
3, server is to files in different types processing, comprising the following steps:
3-1) handle Office type file.The file of support such as table 2.
Classification File type
Office file pdf,docx,doc,xlsx,xls,ppt,pptx
Table 2
Further comprise following sub-step:
3-1-1) judge whether file has been type PDF.It is to enter step 51-3, otherwise enters step 51-2.
OpenOffice 3-1-2) is connected, source file is switched into pdf document.OpenOfice service, can be by office documents (including doc, docx, xls, xlsx etc.) is converted to the document of PDF format.
3-1-3) pass pdf document back the page.Server sends data to browser, and pdf document is passed to the page.
3-1-4) page invocation PDf.js shows pdf document.The plug-in unit is not necessarily to any local technical support, can be realized Pdf document is read in browser.
3-2) handle picture-type files.The file of support such as table 3.
Classification File type
Picture png,jpg,jpeg,gif,bmp
Table 3
Further comprise following sub-step:
3-2-1) pass picture back the page.Server sends data to browser, and picture file is passed to the page.
3-2-2) page shows picture.It uses<img>label directly displays picture.
3-2-3) handle other types file.The file of support such as table 4.
Classification File type
Plain text html,htm,txt
Table 4
Further comprise following sub-step:
Step 3-2-3-1) pass text back the page.Server sends data to browser, and text is passed to the page.
Step 3-2-3-2) page display text.Use<div>label, plain text will show text, html file then by Browser resolves are webpage.

Claims (7)

1. a kind of method of online preview network disk file, which is characterized in that
Include the following steps:
(1) configuration OpenOffice service;
(2) user's select file;
(3) page judges whether to support preview;
(4) server takes file according to file ID;
(5) server is to files in different types processing.
2. the method according to claim 1, wherein
Step (3) the following steps are included:
Step (3.1) obtains file type, from filename, intercepts suffix name, the type as file;
Step (3.2) judges whether file type supports preview;If file supports preview, 4 are entered step;If file does not prop up Preview is held, enters step 33;
Step (3.3) prompt can not preview prompt the file of user's selection, do not support preview in the page.
3. the method according to claim 1, wherein
Step (4) the following steps are included:
Step (4.1) server is according to file ID, from data base querying the file information;
Step (4.2) takes file;The file of Dropbox deposits in Hadoop file system, obtains file according to path.
4. the method according to claim 1, wherein
Step (5) the following steps are included:
Step (5.1) handles Office type file;
Step (5.2) handles picture-type files;
Step (5.3) handles other types file.
5. according to the method described in claim 4, it is characterized in that,
Step (5.1) the following steps are included:
Step (5.1-1) judges whether file has been type PDF;It is to enter step (5.1-3), otherwise enters step (5.1-2);
Step (5.1-2) connects OpenOffice, and source file is switched to pdf document;OpenOfice service, can be by office documents Be converted to the document of PDF format;
Step (5.1-3) passes pdf document back the page;Server sends data to browser, and pdf document is passed to the page;
Step (5.1-4) page invocation PDf.js shows pdf document;The plug-in unit is not necessarily to any local technical support, can be realized Pdf document is read in browser.
6. according to the method described in claim 4, it is characterized in that,
Step (5.2) the following steps are included:
Step (5.2-1) passes picture back the page, and server sends data to browser, picture file is passed to the page;
Step (5.2-2) page shows picture;It uses<img>label directly displays picture.
7. according to the method described in claim 4, it is characterized in that,
Step (5.3) the following steps are included:
Step (5.3-1) passes text back the page;Server sends data to browser, and text is passed to the page;
Step (5.3-2) page display text;<div>label is used, plain text will show text, and html file is then by browser Resolve to webpage.
CN201810860522.7A 2018-08-01 2018-08-01 A kind of method of online preview network disk file Pending CN109213968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810860522.7A CN109213968A (en) 2018-08-01 2018-08-01 A kind of method of online preview network disk file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810860522.7A CN109213968A (en) 2018-08-01 2018-08-01 A kind of method of online preview network disk file

Publications (1)

Publication Number Publication Date
CN109213968A true CN109213968A (en) 2019-01-15

Family

ID=64990405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810860522.7A Pending CN109213968A (en) 2018-08-01 2018-08-01 A kind of method of online preview network disk file

Country Status (1)

Country Link
CN (1) CN109213968A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130733A (en) * 2020-08-27 2020-12-25 北京云动智效网络科技有限公司 Thumbnail-based document display method and equipment
CN112612978A (en) * 2020-12-17 2021-04-06 山东浪潮商用系统有限公司 File online browsing method based on browser
CN113268954A (en) * 2021-05-18 2021-08-17 山东浪潮商用系统有限公司 Conversion method, system and storage medium for converting PPT (Power Point) into HTML (Hypertext markup language) based on Java
CN113312458A (en) * 2021-04-15 2021-08-27 北京鼎立保险经纪有限责任公司 Attachment previewing method and system
CN113704199A (en) * 2021-10-25 2021-11-26 深圳市信润富联数字科技有限公司 File preview method, system, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140268199A1 (en) * 2013-03-15 2014-09-18 Konica Minolta Laboratory U.S.A., Inc. PDF File Preview Manipulation
CN104090862A (en) * 2014-07-16 2014-10-08 山东大学 Network disk multi-type file online preview method based on Linux+Ngnix+Mysql+PHP (LNMP)
CN104915454A (en) * 2015-07-01 2015-09-16 北京京东尚科信息技术有限公司 File preview system and method
WO2017041587A1 (en) * 2015-09-11 2017-03-16 广州视睿电子科技有限公司 File display method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140268199A1 (en) * 2013-03-15 2014-09-18 Konica Minolta Laboratory U.S.A., Inc. PDF File Preview Manipulation
CN104090862A (en) * 2014-07-16 2014-10-08 山东大学 Network disk multi-type file online preview method based on Linux+Ngnix+Mysql+PHP (LNMP)
CN104915454A (en) * 2015-07-01 2015-09-16 北京京东尚科信息技术有限公司 File preview system and method
WO2017041587A1 (en) * 2015-09-11 2017-03-16 广州视睿电子科技有限公司 File display method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
薛锐思等: "知识库中文档在线预览功能的实现", 《计算机光盘软件与应用》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130733A (en) * 2020-08-27 2020-12-25 北京云动智效网络科技有限公司 Thumbnail-based document display method and equipment
CN112612978A (en) * 2020-12-17 2021-04-06 山东浪潮商用系统有限公司 File online browsing method based on browser
CN113312458A (en) * 2021-04-15 2021-08-27 北京鼎立保险经纪有限责任公司 Attachment previewing method and system
CN113268954A (en) * 2021-05-18 2021-08-17 山东浪潮商用系统有限公司 Conversion method, system and storage medium for converting PPT (Power Point) into HTML (Hypertext markup language) based on Java
CN113704199A (en) * 2021-10-25 2021-11-26 深圳市信润富联数字科技有限公司 File preview method, system, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109213968A (en) A kind of method of online preview network disk file
US10049161B2 (en) Information processing apparatus, method of controlling the same, and storage medium
EP3149899B1 (en) Message attachment management
US9282211B2 (en) Image forming apparatus, control method, and storage medium in which data is shared between applications
US10242004B2 (en) Method for automatically tagging documents with matrix barcodes and providing access to a plurality of said document versions
US10511732B2 (en) Mobile solution for importing and signing third-party electronic signature documents
US9818077B2 (en) Arranging functional elements into a workflow
US20170109371A1 (en) Method and Apparatus for Processing File in a Distributed System
CN107302597B (en) Message file pushing method and device
WO2009049061A1 (en) Methods, apparatus, and systems for providing local and online data services
KR20110068642A (en) Image forming system by using the transfer of e-mail and image forming method by using the transfer of e-mail
CN111625308B (en) Information display method and device and electronic equipment
US10817646B2 (en) Information processing system and control method therefor
KR101730339B1 (en) Information processing terminal and control method
CN101771928A (en) Method and system and proxy server for Webpage transmitting
JP2014235697A (en) Information processing system, information processing method, and program
CA2853386C (en) Mobile solution for importing and signing third-party electronic signature documents
EP2840500A2 (en) Information processing terminal and control method
US20200125903A1 (en) Document generation system, method of controlling the same, and non-transitory computer readable medium
CN111614762A (en) Electronic data exchange system and apparatus comprising an electronic data exchange system
US11138149B2 (en) Information processing system, control method therefor, and storage medium for handling an error in converting data in a process for generating business form data
US20150161334A1 (en) Distribution of medical report
KR20170119905A (en) System and Method for Delivering Printout Using Mobile Device
CN111179164A (en) Method and device for generating thumbnail
CN112069771B (en) Method and device for analyzing pictures in PDF (portable document format) file

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

Application publication date: 20190115