CN110232161A - A kind of online method for previewing of document based on browser - Google Patents

A kind of online method for previewing of document based on browser Download PDF

Info

Publication number
CN110232161A
CN110232161A CN201910340682.3A CN201910340682A CN110232161A CN 110232161 A CN110232161 A CN 110232161A CN 201910340682 A CN201910340682 A CN 201910340682A CN 110232161 A CN110232161 A CN 110232161A
Authority
CN
China
Prior art keywords
document
web server
format
open
browser
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
CN201910340682.3A
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.)
Tianjin Vocational Institute
Original Assignee
Tianjin Vocational Institute
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 Tianjin Vocational Institute filed Critical Tianjin Vocational Institute
Priority to CN201910340682.3A priority Critical patent/CN110232161A/en
Publication of CN110232161A publication Critical patent/CN110232161A/en
Pending legal-status Critical Current

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/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • 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/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • G06F16/1794Details of file format conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of online method for previewing of the document based on browser, including management terminal, Web server, user terminal and document conversion server;Step 1: management terminal uploads the document of general format to Web server, and the document of the general format can be the documents such as word, Excel, PPT, PDF, txt, ZIP;Step 2: Web server sends the document for needing to convert to document conversion server according to document convert requests;Step 3: document conversion server carries out document conversion by following below scheme;Step 4: document conversion server step 3 is converted after PDF format document or address of document be sent to Web server, for user terminal using browser online browse conversion after PDF format document information.The present invention can be used family and pass through browser direct-on-line browsing document content.

Description

A kind of online method for previewing of document based on browser
Technical field
The invention belongs to technical field of information processing, and in particular to a kind of online method for previewing of document based on browser.
Background technique
Currently, many information platforms and Internal Management System can all be related to uploading the functional requirement of document, downloading browsing, but Often client terminal system does not have the function of browsing file, i.e., can not open the file that downloading is authorized on website.Existing solution Certainly method is the file issued will to be needed to convert thereof into the picture formats file such as PNG or JPG using professional tool in management end It is issued again, which not only adds the work of administrator, also increase the spending of purchase professional tool software.
Summary of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide a kind of online preview sides of the document based on browser Method can be used family and pass through browser direct-on-line browsing document content.
The present invention is achieved by the following technical solutions:
A kind of online method for previewing of document based on browser, including management terminal, Web server, user terminal and Document conversion server;
Step 1: management terminal uploads the document of general format to Web server, and the document of the general format can be The documents such as word, Excel, PPT, PDF, txt, ZIP;
Step 2: Web server sends the document for needing to convert to document conversion server according to document convert requests;
Step 3: document conversion server carries out document conversion by following below scheme:
1, the suffix name of source document is obtained
2, judge the suffix name of source document, and be handled as follows
If a) the suffix of source document entitled doc, docx, txt, is handled as follows:
I. word application program new ActiveXComponent (" Word.Application ") is opened
Ii. setting word is invisible
Iii. the document for obtaining all openings in word, returns to documents object
Iv. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the save As method for v. calling document object
Vi. close document
Vii. word application program is closed
If b) the suffix of source document entitled ppt, pptx, is handled as follows:
Viii. ppt application program new ActiveXComponent (" PowerPoint.Application ") is opened
Ix. the document for obtaining all openings in ppt, returns to documents object
X. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the saveAs method for xi. calling document object
Xii. close document
Xiii. ppt application program is closed
If c) the suffix of source document entitled xls, xlsx, is handled as follows:
Xiv. it replaces source file and file destination "/" is " "
Xv. excel application program new ActiveXComponent (" Excel.Application ") is opened
Xvi. setting excel is invisible
Xvii. the document for obtaining all openings in excel, returns to documents object
Xviii. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the ExportAsFixedFormat method for xix. calling document object
Xx. close document
Xxi. excel application program is closed
Step 4: document conversion server step 3 is converted after PDF format document or address of document be sent to Web Server, so that user terminal uses the PDF format document information after the conversion of browser online browse.
In the above-mentioned technical solutions, the document convert requests in step 2 carry out user terminal, i.e. user terminal takes to Web Business device sends the request of document preview, which is sent to document conversion server again, is converted by document by Web server Server is completed to convert the format of the document.
In the above-mentioned technical solutions, the document convert requests in step 2 can be from management terminal, i.e. management terminal When uploading source document to Web server, the document convert requests to the document are demarcated in advance, Web server is again by the request Information is sent to document conversion server, completes to convert the format of the document by document conversion server.
The advantages and benefits of the present invention are:
1, known document transfer algorithm is integrated, common document can be converted, such as: Word, Excel, PPT etc..It adopts Use the PDF document format of standard as output document format, the document can directly be browsed by browser plug-in, be had very strong Versatility.
2, general file translation interface and rule, the document format that will not yet support, by way of customized development are defined It is integrated into document Transformation Service, and Transformation Service is externally provided.
3, the technology can both stand alone as third party software and provide online service, can also be used as the basis of third party software Component uses.
4, designed using interface mode, according to operation system demand, can flexible expansion file convertor, plug and play
5, compatibility is strong, cross-platform can dispose and provide Transformation Service.
Detailed description of the invention
Fig. 1 is the information exchange schematic diagram of the online method for previewing of the document based on browser of the invention.
It for those of ordinary skill in the art, without creative efforts, can be according to above attached Figure obtains other relevant drawings.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, combined with specific embodiments below furtherly Bright technical solution of the present invention.
A kind of online method for previewing of document based on browser, including management terminal, Web server, user terminal and Document conversion server;
Step 1: management terminal uploads the document of general format to Web server, and the document of the general format can be The documents such as word, Excel, PPT, PDF, txt, ZIP;
Step 2: Web server sends the document for needing to convert to document conversion server according to document convert requests;
Step 3: document conversion server carries out document conversion by following below scheme:
1, the suffix name of source document is obtained
2, judge the suffix name of source document, and be handled as follows
If a) the suffix of source document entitled doc, docx, txt, is handled as follows:
Xxii. word application program new ActiveXComponent (" Word.Application ") is opened
Xxiii. setting word is invisible
Xxiv. the document for obtaining all openings in word, returns to documents object
Xxv. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the save As method for xxvi. calling document object
Xxvii. close document
Xxviii. word application program is closed
If b) the suffix of source document entitled ppt, pptx, is handled as follows:
Xxix. ppt application program new ActiveXComponent (" PowerPoint.Application ") is opened
Xxx. the document for obtaining all openings in ppt, returns to documents object
Xxxi. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the saveAs method for xxxii. calling document object
Xxxiii. close document
Xxxiv. ppt application program is closed
If c) the suffix of source document entitled xls, xlsx, is handled as follows:
Xxxv. it replaces source file and file destination "/" is " "
Xxxvi. excel application program new ActiveXComponent (" Excel.Application ") is opened
Xxxvii. setting excel is invisible
Xxxviii. the document for obtaining all openings in excel, returns to documents object
Xxxix. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the ExportAsFixedFormat method for xl. calling document object
Xli. close document
Xlii. excel application program is closed
Step 4: document conversion server step 3 is converted after PDF format document or address of document be sent to Web Server, so that user terminal uses the PDF format document information after the conversion of browser online browse.Using the PDF text of standard Shelves format can directly be browsed as output document format, the document by browser plug-in, have very strong versatility.
Further, the document convert requests in step 2 carry out user terminal, i.e. user terminal is sent to Web server The request of document preview, which is sent to document conversion server again by Web server, complete by document conversion server The format conversion of pairs of the document.
Further, the document convert requests in step 2 can be from management terminal, i.e. management terminal takes to Web When business device uploads source document, the document convert requests to the document are demarcated in advance, which is sent to by Web server again Document conversion server is completed to convert the format of the document by document conversion server.
Illustrative description has been done to the present invention above, it should explanation, the case where not departing from core of the invention Under, any simple deformation, modification or other skilled in the art can not spend the equivalent replacement of creative work equal Fall into protection scope of the present invention.

Claims (3)

1. a kind of online method for previewing of document based on browser, it is characterised in that: including management terminal, Web server, user Terminal and document conversion server;
Step 1: management terminal uploads the document of general format to Web server, and the document of the general format can be The documents such as word, Excel, PPT, PDF, txt, ZIP;
Step 2: Web server is according to document convert requests.The document for needing to convert is sent to document conversion server;
Step 3: document conversion server carries out document conversion by following below scheme:
1, the suffix name of source document is obtained
2, judge the suffix name of source document, and be handled as follows
If a) the suffix of source document entitled doc, docx, txt, is handled as follows:
I. word application program new ActiveXComponent (" Word.Application ") is opened
Ii. setting word is invisible
Iii. the document for obtaining all openings in word, returns to documents object
Iv. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the save As method for v. calling document object
Vi. close document
Vii. word application program is closed
If b) the suffix of source document entitled ppt, pptx, is handled as follows:
Viii. ppt application program new ActiveXComponent (" PowerPoint.Application ") is opened
Ix. the document for obtaining all openings in ppt, returns to documents object
X. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the saveAs method for xi. calling document object
Xii. close document
Xiii. ppt application program is closed
If c) the suffix of source document entitled xls, xlsx, is handled as follows:
Xiv. it replaces source file and file destination "/" is " "
Xv. excel application program new ActiveXComponent (" Excel.Application ") is opened
Xvi. setting excel is invisible
Xvii. the document for obtaining all openings in excel, returns to documents object
Xviii. it calls open method in documents object to open document, and returns to open document object document
Document storing is pdf format by the ExportAsFixedFormat method for xix. calling document object
Xx. close document
Xxi. excel application program is closed
Step 4: document conversion server step 3 is converted after PDF format document or address of document be sent to Web service Device, so that user terminal uses the PDF format document information after the conversion of browser online browse.
2. the online method for previewing of the document according to claim 1 based on browser, it is characterised in that: the text in step 2 Shelves convert requests come user terminal, i.e. request of the user terminal to Web server transmission document preview, and Web server again will The solicited message is sent to document conversion server, completes to convert the format of the document by document conversion server.
3. the online method for previewing of the document according to claim 1 based on browser, it is characterised in that: the text in step 2 Shelves convert requests can be from management terminal, i.e. management terminal is demarcated in advance when uploading source document to Web server to this The solicited message is sent to document conversion server again by the document convert requests of document, Web server, by document Transformation Service Device is completed to convert the format of the document.
CN201910340682.3A 2019-04-25 2019-04-25 A kind of online method for previewing of document based on browser Pending CN110232161A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910340682.3A CN110232161A (en) 2019-04-25 2019-04-25 A kind of online method for previewing of document based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910340682.3A CN110232161A (en) 2019-04-25 2019-04-25 A kind of online method for previewing of document based on browser

Publications (1)

Publication Number Publication Date
CN110232161A true CN110232161A (en) 2019-09-13

Family

ID=67860256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910340682.3A Pending CN110232161A (en) 2019-04-25 2019-04-25 A kind of online method for previewing of document based on browser

Country Status (1)

Country Link
CN (1) CN110232161A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190866A (en) * 2019-12-31 2020-05-22 北京指掌易科技有限公司 Application document display method, device, equipment and storage medium
CN112069132A (en) * 2020-07-31 2020-12-11 广东飞企互联科技股份有限公司 Attachment online preview method, device, equipment and medium
CN112612978A (en) * 2020-12-17 2021-04-06 山东浪潮商用系统有限公司 File online browsing method based on browser
CN113778680A (en) * 2021-09-10 2021-12-10 厦门悦讯信息科技股份有限公司 Document online preview method and system

Citations (3)

* 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
US20160364497A1 (en) * 2013-12-27 2016-12-15 Beijing Branch Office Of Foxit Corporation Method and device for increasing the speed of online browsing and loading of pdf document
CN108804503A (en) * 2018-04-12 2018-11-13 北京明朝万达科技股份有限公司 A kind of online method for previewing of document and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160364497A1 (en) * 2013-12-27 2016-12-15 Beijing Branch Office Of Foxit Corporation Method and device for increasing the speed of online browsing and loading of pdf document
CN105589836A (en) * 2015-12-21 2016-05-18 华为技术有限公司 Document previewing method, terminal and server
CN108804503A (en) * 2018-04-12 2018-11-13 北京明朝万达科技股份有限公司 A kind of online method for previewing of document and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DALON_G: "《java 实现word文件转pdf文件》", 《HTTPS://BLOG.CSDN.NET/DALON_G/ARTICLE/DETAILS/80703402/》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190866A (en) * 2019-12-31 2020-05-22 北京指掌易科技有限公司 Application document display method, device, equipment and storage medium
CN112069132A (en) * 2020-07-31 2020-12-11 广东飞企互联科技股份有限公司 Attachment online preview method, device, equipment and medium
CN112612978A (en) * 2020-12-17 2021-04-06 山东浪潮商用系统有限公司 File online browsing method based on browser
CN113778680A (en) * 2021-09-10 2021-12-10 厦门悦讯信息科技股份有限公司 Document online preview method and system

Similar Documents

Publication Publication Date Title
CN110232161A (en) A kind of online method for previewing of document based on browser
US8819168B2 (en) Link expansion service
US6626957B1 (en) Markup language content and content mapping
KR101085651B1 (en) Accessing different types of electronic messages through a common messaging interface
CN105589836A (en) Document previewing method, terminal and server
CN102662928A (en) Rich text editing method for importing documents and device thereof
JP2004514983A (en) Meta-application architecture for integrating photo service websites
US20020138653A1 (en) Workstation system, computer, data transfer method, data editing method, computer program generation method, computer program and storage medium
JP2004334866A (en) Conversion of web site summary through tag rib
KR20030094320A (en) Dedicated processor for efficient processing of documents encoded in a markup language
US20100131614A1 (en) System and method for scalable architecture for web-based collaborative annotation of page-based documents
WO2001033874A1 (en) System for a remote file management with mobile devices
US8909675B2 (en) Executing transcription requests on files
CN103116586A (en) Document reading achieving method, terminal, document conversion server and processing system
CN101082927A (en) File services method based on ContextFS context file systems
JP2011507074A5 (en)
US8463744B2 (en) Method and system for synchronizing data
CN103944949A (en) Method of uploading files, system and cloud storage equipment
US20110055679A1 (en) Document link converting server, document link converting system and document link converting method
WO2015000322A1 (en) Document processing method and system in wireless communications device
JP2007328750A (en) Compound document preparing method and registering method to blog
CN106372109A (en) Internet resource file caching method and apparatus
US20070049302A1 (en) Method and System for Handling Files with Mobile Terminals and a Corresponding Computer Program and a Corresponding Computer-Readable Storage Medium
JP4308448B2 (en) Content generation according to the output device
CN102455996A (en) System for automatically converting multiple document formats to swf (shock wave flash) in batch

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