CN102254005A - Method for transforming and displaying document on webpage - Google Patents

Method for transforming and displaying document on webpage Download PDF

Info

Publication number
CN102254005A
CN102254005A CN 201110198505 CN201110198505A CN102254005A CN 102254005 A CN102254005 A CN 102254005A CN 201110198505 CN201110198505 CN 201110198505 CN 201110198505 A CN201110198505 A CN 201110198505A CN 102254005 A CN102254005 A CN 102254005A
Authority
CN
China
Prior art keywords
document
pdf
webpage
converted
swf
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
CN 201110198505
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.)
Suzhou Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network 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 Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN 201110198505 priority Critical patent/CN102254005A/en
Publication of CN102254005A publication Critical patent/CN102254005A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method for transforming and displaying a document on a webpage. The method comprises the following steps: a Web server receives an uploaded document to be transformed, runs a document transformation detection function, and recursively detects whether a transformation state document exists in a Web server returned document transformation directory. A document transformation server acquires the document to be converted from the Web server, calls a portable document format (PDF) transformation tool to acquire and store a PDF document, and returns to an absolute path of the PDF document. The document transformation server calls a small web format (swf) transformation tool which converts the PDF document into a swf document according to the absolute path of the acquired PDF document. The Web server acquires the transformation state document which is positioned in the document transformation directory. After the document transformation detection function detects that the transformation state document exists in the Web server returned document transformation directory, the transformation state document is analyzed, and the swf document acquired by transformation is played on the webpage according to the transformation state document.

Description

A kind of document conversion display packing that on webpage, realizes
Technical field
The invention belongs to networking technology area, relate in particular to a kind of document conversion display packing that on webpage, realizes.
Background technology
In the process of using computer, we almost come into contacts with different documents every day, such as checking documents such as Word, PPT, Excel, PDF, CHM, TXT.For computer user, the essential condition of checking different document is that the corresponding client software of the document must be installed on terminal computer at present.Therefore, this just requires the user to install large quantities of on the computer of oneself and the sizable relative program of capacity, has just reached 791MB as Office2010, has occupied a large amount of capacity of local computing.
In addition, the mode that is implemented in on-line documentation conversion at present is: document is converted to the online demonstration of html file.Yet, in existing conversion plan, the overall process complexity of conversion, imperfect to the reduction of original document, playing process requires loaded down with trivial details.
Summary of the invention
The invention provides a kind of document conversion display packing that on webpage, realizes, to address the above problem.
The invention provides a kind of document conversion display packing that on webpage, realizes, may further comprise the steps.Web server receives the document of uploading to be converted, operation document transition detection function, and whether the recursive detection Web server exists the transition status file inside returning to document and changing catalogue.The document change server obtains document to be converted from Web server, and calls the acquisition of PDF crossover tool and preserve the PDF document, and returns the absolute path of PDF document.The document change server calls the swf crossover tool, and the swf crossover tool is converted to the swf file according to the absolute path of the PDF document that obtains with the PDF document.Web server obtains the transition status file, and the transition status file is positioned under the document conversion catalogue.Document transition detection function detects Web server and returns to document after there is the transition status file in conversion catalogue the inside, resolves the transition status file, and plays the swf file that is converted to according to the transition status file on webpage.
Compared to prior art, according to the document conversion display packing that on webpage, realizes provided by the invention, realized the on-line conversion of multiple Doctype, make things convenient for the user to read, also need not to install client software, saved the storage space of local computing.In addition, handle, document change server and Web server are separated arbitrarily, thereby increase the dirigibility of server, help distributed deployment by the socket network schemer.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Figure 1 shows that the process flow diagram of the document of on webpage, the realizing conversion display packing that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter will describe the present invention with reference to the accompanying drawings and in conjunction with the embodiments in detail.Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Figure 1 shows that the process flow diagram of the document of on webpage, the realizing conversion display packing that preferred embodiment according to the present invention provides.As shown in Figure 1, the document of realizing on the webpage conversion display packing that preferred embodiment of the present invention provides comprises step 101~104.
In step 101, Web server receives the document of uploading to be converted, operation document transition detection function, and whether the recursive detection Web server exists the transition status file inside returning to document and changing catalogue.
In this, document to be converted for example can be Word document, PPT document, PDF document or Excel document.Particularly, the user opens webpage, clicks the document selector button and selects document to be converted, after selecting to finish, clicks and uploads button, uploads selected document to Web server.Behind the document to be converted that the Web server reception is uploaded, on webpage, move document transition detection function by the javascript script, ceaselessly whether there is transition status file (for example, s.txt file) by the setTimeout recursive operation by the Ajax request server conversion catalogue the inside that returns to document.There is the transition status file if detect, then returns the content of transition status file,, then continue recursive operation next time if do not exist.
In step 102, the document change server obtains document to be converted from Web server, and calls the acquisition of PDF crossover tool and preserve the PDF document, and returns the absolute path of PDF document.In this, the document change server is a Java document change server.So, write, can realize cross-platformly, can on different servers, move, save time by Java.In addition, the PDF crossover tool is OpenOffice.Yet the present invention is not limited thereto.
In present embodiment, particularly, after Web server receives the document of uploading to be converted, send the socket order to the document change server.Wherein, the socket order comprises the absolute path of document to be converted at Web server.After the document change server receives the socket order, read in the document flow of document to be converted by document function application programming interface (API), and call PDF crossover tool (OpenOffice) and obtain the PDF document flow, the PDF document that preserve to obtain is to hard disk, and returns the absolute path of PDF document.Wherein, when document to be converted was the PDF document, the PDF crossover tool directly obtained the PDF document flow; When document to be converted was other document (for example, Word document, PPT document or Excel document) of non-PDF document, the PDF crossover tool called inner API above-mentioned document flow is converted to the PDF document flow after receiving the document flow of document to be converted.Yet the document change server is not limited thereto from the mode that Web server obtains document to be converted.In another preferred embodiment, Web server can directly be sent to the document change server with the document to be converted that receives.
In step 103, the document change server calls the swf crossover tool, the swf crossover tool is converted to the swf file according to the absolute path of the PDF document that obtains with the PDF document, and Web server obtains the transition status file, and the transition status file is positioned under the document conversion catalogue.Wherein, the swf crossover tool is the pdf2swf instrument.Yet the present invention is not limited thereto.
Particularly, be that the pdf2swf instrument is that example describes with the swf crossover tool.The document change server is by calling Runtime.getRuntime () .exec (), import pad2swf command-line tool absolute path into, and the absolute path conversion parameter of the pdf document that can discern of assembly unit pdf2swf command-line tool, the absolute path of the pdf document that the pfd2swf instrument imports into by reception is converted to an independently swf file with each page or leaf of pdf document.Wherein, the swf file that is converted to carries out order according to the page number, in order to subsequent calls.After the pdf2swf instrument was being carried out end, Runtime.getRuntime () .exec () also can be corresponding complete, creates the transition status file under the document conversion catalogue of Web server.In this, can directly under the document conversion catalogue of Web server, create the transition status file, perhaps after the document change server is created the transition status file, be sent to Web server and be kept under the document conversion catalogue.The present invention does not do any qualification to this.
In step 104, document transition detection function detects Web server and returns to document after there is the transition status file in conversion catalogue the inside, resolves the transition status file, and plays the swf file that is converted to according to the transition status file on webpage.Wherein, document transition detection function is obtained the transition status file, by the javascript script transition status file is resolved.If the content of transition status file is 0, then represent convert failed,, represent that then document changes successfully if the content of transition status file is the integer greater than 0, and the number of the swf file that above-mentioned integer representation need show on webpage, this number is also represented the total page number of the document of changing.For example, the content of transition status file is 5, represent that then document changes successfully, and the number of the swf file that need show on webpage is 5.In addition, webpage is play the swf file that is converted to by html tag language (for example, Object, embed etc.) on webpage.So, realized the web document conversion and shown that the user can read at the enterprising style of writing shelves of webpage.
In sum, the document of realizing on webpage that preferred embodiment provides according to the present invention is changed display packing, has realized the on-line conversion of multiple Doctype, makes things convenient for the user to read, and also need not to install client software, has saved the storage space of local computing.In addition, handle, document change server and Web server are separated arbitrarily, thereby increase the dirigibility of server, help distributed deployment by the socket network schemer.In addition, document transfer process whole process is changed by stream mode, and is efficient, quick.In addition, write by Java, can be cross-platform, can on different servers, move, save time.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. a document conversion display packing that realizes on webpage is characterized in that, may further comprise the steps:
Web server receives the document of uploading to be converted, operation document transition detection function, and whether the described Web server of recursive detection exists the transition status file inside returning to document and changing catalogue;
Described document change server obtains described document to be converted from described Web server, and calls the acquisition of PDF crossover tool and preserve the PDF document, and returns the absolute path of described PDF document;
Described document change server calls the swf crossover tool, described swf crossover tool is converted to the swf file according to the absolute path of the described PDF document that obtains with described PDF document, described Web server obtains the transition status file, and described transition status file is positioned under the document conversion catalogue;
Described document transition detection function detects described Web server and returns to document after there is described transition status file in conversion catalogue the inside, resolves described transition status file, and plays the swf file that is converted to according to described transition status file on webpage.
2. the document conversion display packing that on webpage, realizes according to claim 1, it is characterized in that, behind the document to be converted that described Web server reception is uploaded, on webpage, move described document transition detection function by the javascript script, whether there is the transition status file by the described Web server of the setTimeout recursive operation request conversion catalogue the inside that returns to document, if there is described transition status file, then return the content of described transition status file, if do not exist, then continue recursive operation next time.
3. the document conversion display packing that realizes on webpage according to claim 1 is characterized in that described document change server is a Java document change server.
4. the document conversion display packing that realizes on webpage according to claim 1 is characterized in that described PDF crossover tool is OpenOffice.
5. the document conversion display packing that realizes on webpage according to claim 1 is characterized in that described swf crossover tool is the pdf2swf instrument.
6. the document conversion display packing that on webpage, realizes according to claim 5, it is characterized in that, described document change server calls the swf crossover tool, described swf crossover tool according to the absolute path of the described PDF document that obtains with the process that described PDF document is converted to the swf file is: described document change server is by calling Runtime.getRuntime () .exec (), import pdf2swf command-line tool absolute path into, and the absolute path conversion parameter of the pdf document that can discern of assembly unit pdf2swf command-line tool, the absolute path of the pdf document that the pfd2swf instrument imports into by reception is converted to an independently swf file with each page or leaf of pdf document.
7. the document conversion display packing that on webpage, realizes according to claim 1, it is characterized in that, if the content in the described transition status file is 0, then represent the document convert failed, if the content in the described transition status file is the integer greater than 0, represent that then document changes successfully, and the number of the above-mentioned integer representation swf file that need on webpage, show, this number is also represented the total page number of the document of changing.
8. the document of realizing on webpage according to claim 1 transforms display packing, it is characterized in that, when described document to be converted is the PDF document, described PDF crossover tool directly obtains described PDF document flow, when described document to be converted was Word document, PPT document or Excel document, described PDF crossover tool called the internal applications DLL (dynamic link library) document flow of described document to be converted is converted to the PDF document flow.
CN 201110198505 2011-07-15 2011-07-15 Method for transforming and displaying document on webpage Pending CN102254005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110198505 CN102254005A (en) 2011-07-15 2011-07-15 Method for transforming and displaying document on webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110198505 CN102254005A (en) 2011-07-15 2011-07-15 Method for transforming and displaying document on webpage

Publications (1)

Publication Number Publication Date
CN102254005A true CN102254005A (en) 2011-11-23

Family

ID=44981269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110198505 Pending CN102254005A (en) 2011-07-15 2011-07-15 Method for transforming and displaying document on webpage

Country Status (1)

Country Link
CN (1) CN102254005A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136171A (en) * 2011-12-02 2013-06-05 明博教育科技有限公司 E-book making method based on shock wave flash (SWF)
CN103309848A (en) * 2013-06-14 2013-09-18 广东电网公司佛山供电局 Method for converting excel document into pdf document
CN103365830A (en) * 2012-03-26 2013-10-23 腾讯科技(深圳)有限公司 Method and device for sharing of document files on basis of microblog
CN103389969A (en) * 2012-05-07 2013-11-13 腾讯科技(深圳)有限公司 Method, device and system for previewing PDF (portable document format) file on mobile terminal
CN103729338A (en) * 2013-12-29 2014-04-16 国云科技股份有限公司 File on-line previewing method
CN103955401A (en) * 2014-04-29 2014-07-30 南京新模式软件集成有限公司 Method for optimizing on-line preview of electronic document
CN104156341A (en) * 2014-07-31 2014-11-19 武钢集团昆明钢铁股份有限公司 Online reading system and method
CN104239426A (en) * 2014-08-25 2014-12-24 武汉天喻信息产业股份有限公司 System and method for realizing cross-platform document reading
CN104268211A (en) * 2014-09-23 2015-01-07 河海大学常州校区 Online engineering document to PDF document conversion method
CN104462522A (en) * 2014-12-23 2015-03-25 深圳供电局有限公司 File on-line previewing method, terminal and server
CN104765720A (en) * 2015-03-26 2015-07-08 浪潮通信信息系统有限公司 Method and device for inputting special transmission point source
CN105740435A (en) * 2016-01-28 2016-07-06 安徽四创电子股份有限公司 On-line preview design method of document on the basis of distribution
CN103309848B (en) * 2013-06-14 2016-11-30 广东电网公司佛山供电局 Excel document turns the method for pdf document
CN106776506A (en) * 2017-02-27 2017-05-31 努比亚技术有限公司 Methods of exhibiting, device and system on document line based on browser
CN107168935A (en) * 2017-05-25 2017-09-15 山大鲁能信息科技有限公司 The online code-transferring method of document and system
CN111382130A (en) * 2018-12-20 2020-07-07 鸿合科技股份有限公司 Content submission method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833567A (en) * 2010-03-31 2010-09-15 北京志腾新诺科技有限公司 Document conversion method, device and system
CN101938717A (en) * 2010-09-07 2011-01-05 深圳市彩讯科技有限公司 Mail attachment conversion system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833567A (en) * 2010-03-31 2010-09-15 北京志腾新诺科技有限公司 Document conversion method, device and system
CN101938717A (en) * 2010-09-07 2011-01-05 深圳市彩讯科技有限公司 Mail attachment conversion system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《计算机系统应用》 20101031 汪孔敏等 基于RTMP的文档在线浏览工具 第257-260页 1-8 第19卷, 第10期 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136171A (en) * 2011-12-02 2013-06-05 明博教育科技有限公司 E-book making method based on shock wave flash (SWF)
CN103136171B (en) * 2011-12-02 2017-04-12 明博教育科技股份有限公司 E-book making method based on shock wave flash (SWF)
CN103365830B (en) * 2012-03-26 2015-07-22 腾讯科技(深圳)有限公司 Method and device for sharing of document files on basis of microblog
CN103365830A (en) * 2012-03-26 2013-10-23 腾讯科技(深圳)有限公司 Method and device for sharing of document files on basis of microblog
US9465779B2 (en) 2012-03-26 2016-10-11 Tencent Technology (Shenzhen) Company Limited Microblog-based document file sharing method and device
CN103389969A (en) * 2012-05-07 2013-11-13 腾讯科技(深圳)有限公司 Method, device and system for previewing PDF (portable document format) file on mobile terminal
CN103389969B (en) * 2012-05-07 2016-02-24 腾讯科技(深圳)有限公司 A kind of methods, devices and systems for mobile terminal preview pdf document
CN103309848A (en) * 2013-06-14 2013-09-18 广东电网公司佛山供电局 Method for converting excel document into pdf document
CN103309848B (en) * 2013-06-14 2016-11-30 广东电网公司佛山供电局 Excel document turns the method for pdf document
CN103729338A (en) * 2013-12-29 2014-04-16 国云科技股份有限公司 File on-line previewing method
CN103955401A (en) * 2014-04-29 2014-07-30 南京新模式软件集成有限公司 Method for optimizing on-line preview of electronic document
CN104156341A (en) * 2014-07-31 2014-11-19 武钢集团昆明钢铁股份有限公司 Online reading system and method
CN104239426A (en) * 2014-08-25 2014-12-24 武汉天喻信息产业股份有限公司 System and method for realizing cross-platform document reading
CN104268211A (en) * 2014-09-23 2015-01-07 河海大学常州校区 Online engineering document to PDF document conversion method
CN104462522A (en) * 2014-12-23 2015-03-25 深圳供电局有限公司 File on-line previewing method, terminal and server
CN104765720A (en) * 2015-03-26 2015-07-08 浪潮通信信息系统有限公司 Method and device for inputting special transmission point source
CN105740435A (en) * 2016-01-28 2016-07-06 安徽四创电子股份有限公司 On-line preview design method of document on the basis of distribution
CN106776506A (en) * 2017-02-27 2017-05-31 努比亚技术有限公司 Methods of exhibiting, device and system on document line based on browser
CN107168935A (en) * 2017-05-25 2017-09-15 山大鲁能信息科技有限公司 The online code-transferring method of document and system
CN111382130A (en) * 2018-12-20 2020-07-07 鸿合科技股份有限公司 Content submission method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN102254005A (en) Method for transforming and displaying document on webpage
CN103491169B (en) Method and system for uploading and downloading files
CN102567485B (en) The special parsing of provider for content retrieval
CN104115142B (en) For the file specific to equipment of bookmark synchronization
CN103678566A (en) Method, server and system for providing mobile terminal fault problem solution
US20120254118A1 (en) Recovery of tenant data across tenant moves
CN102761628B (en) Pan-domain name identification and processing device and method
CN112653579A (en) OpenResty-based gray scale publishing method and related equipment
CN104469528A (en) Method and device for loading video data and browser client side
CN101132413A (en) ActiveX component multiplexing method based on Web application
CN102118650A (en) Method and device for displaying television menu, and television
CN106843857B (en) Method and device for realizing SDK (software development kit) conversion of code base based on SRP (sequence-related protocol)
CN102207967A (en) Method and system for automatically providing new browser plugin
CN113778897B (en) Automatic test method, device and equipment for interface and storage medium
CN112149035A (en) Website static resource processing method and device
CN106126299B (en) Service plug-in processing method and device
CN102779045A (en) Interface generating method, interface editor and electronic equipment
CN104980464A (en) Network request processing method, network server and network system
CN112948247A (en) Processing method, system, device and medium for operation playback of application program
CN111124883A (en) Test case library introduction method, system and equipment based on tree form
CN103036929A (en) Multimedia file processing method and network side equipment in communication system
CN112417818B (en) Document catalog generation method and device, storage medium and electronic equipment
US10402391B2 (en) Processing method, device and system for data of distributed storage system
CN103678333A (en) Method and equipment used for improving extraction accuracy of uniform resource locator
CN109491699B (en) Resource checking method, device, equipment and storage medium of application program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20111123