CN110765378A - Method and system for playing Office document at webpage end - Google Patents

Method and system for playing Office document at webpage end Download PDF

Info

Publication number
CN110765378A
CN110765378A CN201910892451.3A CN201910892451A CN110765378A CN 110765378 A CN110765378 A CN 110765378A CN 201910892451 A CN201910892451 A CN 201910892451A CN 110765378 A CN110765378 A CN 110765378A
Authority
CN
China
Prior art keywords
playing
file
picture
pdf
office document
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
CN201910892451.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.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing 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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN201910892451.3A priority Critical patent/CN110765378A/en
Publication of CN110765378A publication Critical patent/CN110765378A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions

Abstract

The invention discloses a method and a system for playing Office documents at a webpage end, wherein the method comprises the following steps: receiving an Office document uploaded by a user; converting the Office document into a picture or an HTML file; and playing the picture or the HTML file at a webpage end. Because the display of the pictures and the HTML files on the webpage does not depend on flash, the modification of the webpage version is not needed, the workload of playing Office documents on the webpage end is greatly reduced, and the playing of Word, Excel, PPT or PDF documents on a PC end or a mobile end browser is conveniently and quickly realized. By adopting the method for playing Office documents at the webpage end, the system can quickly play Word, Excel, PPT or PDF documents at the PC end or the mobile end browser, thereby greatly saving the labor cost and reducing the error probability during manual document conversion.

Description

Method and system for playing Office document at webpage end
Technical Field
The invention relates to the technical field of internet, in particular to a method and a system for playing Office documents on a webpage end.
Background
Under the background of the internet era, Office documents are often required to be played at a webpage end, particularly the training industry which rises rapidly, the traditional offline training mode is difficult to keep pace with the era, so that online training, particularly a mobile training mode, is vigorously developed, and the problem to be solved at present is how to rapidly play trained courseware (Word, Excel, PPT and PDF documents) by using a PC and a mobile browser.
Because the traditional courseware (Word, Excel, PPT and PDF documents) can not be directly played in a browser, the general solution is to modify the webpage version of the courseware, but the modification workload is huge. In addition, aiming at historical training courseware accumulated in a large number of enterprises, the solution of most of the enterprises is to use a flash paper plug-in to play documents, the mode can only enable the courseware to be played at a PC (personal computer) end, the compatibility of a browser is not good, and the browser of flash must be supported.
Disclosure of Invention
One of the purposes of the present invention is to overcome the problem that Word, Excel, PPT and PDF documents in the prior art cannot be directly played in a browser, thereby providing a method for playing Office documents at a web page end, which quickly plays the Word, Excel, PPT or PDF documents at a PC end or a mobile end browser by means of file format conversion, and in order to achieve the above purpose, the present invention provides the following technical scheme:
a method for playing Office documents at a webpage end comprises the following steps:
receiving an Office document uploaded by a user;
converting the Office document into a picture or an HTML file;
and playing the picture or the HTML file at a webpage end.
Preferably, the method for converting the Office document into a picture or an HTML file specifically includes:
judging whether the Office document is a PDF file or not, and converting the Office document in a non-PDF format into the PDF file;
and converting the PDF file into a picture or an HTML file.
Specifically, a jacob plug-in is used to convert an Office document in a non-PDF format into a PDF file.
Preferably, the specific method for converting the PDF file into a picture or an HTML file includes:
acquiring the space proportion of the picture and the text in the PDF file;
when the picture space proportion of the PDF file is larger than or equal to the text space proportion, converting the PDF file into a picture;
and when the picture space proportion of the PDF file is smaller than the text space proportion, converting the PDF file into an HTML file.
Specifically, the PDF file is converted into a picture using a pdfbox plug-in.
Further, the PDF file is converted into an HTML file using a PDF2htmlEX plug-in.
The second purpose of the present invention is to overcome the problem that Word, Excel, PPT and PDF documents in the prior art cannot be directly played in a browser, so as to provide a system for playing Office documents at a web page end, which quickly plays the Word, Excel, PPT or PDF documents at a PC end or a mobile end browser by means of file format conversion, and in order to achieve the above purpose, the present invention provides the following technical scheme:
a system for playing Office documents at a webpage end comprises a receiving module, a conversion module and a playing module, wherein,
the receiving module is used for receiving Office documents uploaded by users;
the conversion module is used for converting the Office document into a picture or an HTML file;
the playing module is used for playing the pictures or the HTML files at a webpage end.
Preferably, the conversion module comprises a judgment unit, a first conversion unit and a second conversion unit, wherein,
the judging unit is used for judging whether the Office document is a PDF (portable document format) file;
the first conversion unit is used for converting the Office document in the non-PDF format into a PDF file;
the second conversion unit is used for converting the PDF file into a picture or an HTML file.
Preferably, the conversion module further comprises a security verification unit, and the security verification unit is configured to perform identity authentication on the uploading module and the playing module accessing the conversion module.
The third purpose of the present invention is to overcome the problem that Word, Excel, PPT and PDF documents in the prior art cannot be directly played in a browser, so as to provide a computer readable storage medium, where a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to execute the steps of the method for playing Office documents at the web site.
Compared with the prior art, the method and the system for playing the Office document at the webpage end have the following beneficial effects that:
the invention provides a method for playing Office documents at a webpage end, which comprises the steps of firstly receiving Office documents uploaded by a user; then converting the Office document into a picture or an HTML file; and finally, playing the picture or the HTML file at the webpage end. Because the display of the picture and the HTML file on the webpage does not depend on flash, the support for a PC and a mobile terminal is better, the compatibility of the browser is better, the modification of a webpage version is not needed, the workload of playing Office documents on the webpage terminal is greatly reduced, and the playing of Word, Excel, PPT or PDF documents on the PC terminal or the mobile terminal browser is conveniently and quickly realized.
According to the system for playing the Office document at the webpage end, provided by the invention, by adopting the method for playing the Office document at the webpage end, the Word, Excel, PPT or PDF document can be quickly played at the PC end or the mobile end browser, so that the labor cost is greatly saved, and the error probability during manual document conversion is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic flow chart of a method for playing Office documents on a web page side according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of file conversion in the method for playing Office documents at a web page end in the embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, a method for playing an Office document at a web page end according to an embodiment of the present invention includes the steps of:
receiving an Office document uploaded by a user;
converting the Office document into a picture or an HTML file;
and playing pictures or HTML files at the webpage end.
Because the display of the picture and the HTML file on the webpage does not depend on flash, the support for a PC and a mobile terminal is better, the compatibility of the browser is better, the modification of a webpage version is not needed, the workload of playing Office documents on the webpage terminal is greatly reduced, and the playing of Word, Excel, PPT or PDF documents on the PC terminal or the mobile terminal browser is conveniently and quickly realized.
Referring to fig. 2, in the method for playing an Office document at a web page end according to the embodiment of the present invention, the method for converting the Office document into a picture or an HTML file specifically includes: and judging whether the Office document is a PDF (portable document format) file, converting the Office document in a non-PDF format into a PDF file, and converting the PDF file into a picture or an HTML (hypertext markup language) file. For example, in a course training system of a webpage version, courseware is mostly Word, PPT or Excel files, and then the courseware needs to be uniformly converted into PDF files and then converted into pictures or HTML files, so that the PDF files are convenient to play at a webpage end, the course training system of the webpage end does not need to be modified, the modification cost is reduced, and the course training system is convenient and fast.
In the specific implementation, the Office document in the non-PDF format is converted into the PDF file by using the jacob plug-in, the modification of a webpage is not needed, and the method is convenient and quick and has low cost.
In addition, referring to fig. 2, the specific method for converting a PDF file into a picture or an HTML file includes: firstly, acquiring the space proportion of pictures and characters in a PDF file; when the picture space proportion of the PDF file is larger than or equal to the text space proportion, converting the PDF file into a picture; and when the picture space proportion of the PDF file is smaller than the text space proportion, converting the PDF file into an HTML file. According to the method, the PDF file is automatically converted into the picture or the HTML file according to the space proportion of the picture and the text in the PDF file, a better webpage end display effect can be obtained, the distortion of a large number of pictures is not easy to cause, and meanwhile, the file is more smoothly played. In practical use, the PDF file can be converted into one of two formats, namely, a picture or an HTML file according to the user's own choice.
In the specific implementation, a PDF box plug-in is used for converting a PDF file into a picture, and a PDF2htmlEX plug-in is used for converting the PDF file into an HTML file, so that a webpage is not required to be modified, the method is convenient and fast, and the cost is low.
For example, after a user uploads courseware by using a webpage version courseware system through a mobile terminal and a PC terminal, the courseware system receives the courseware uploaded by the user and then requests a conversion module to perform file conversion, the type of the file uploaded by the user is judged, when the file is an office document such as Word, PPT or Excel, the file is preferentially converted into a PDF (portable document format) document, the PDF document is converted into a corresponding picture or HTML webpage format according to different output requirements, and finally conversion result information is returned to the webpage version system to be played, so that the user can realize the webpage-based and mobile playing of the courseware without changing the original training courseware, can convert the file into two modes of a picture or an HTML webpage according to different requirements of the user, and because the display of the picture and the HTML file on the webpage is not dependent on a flash plug-in, the support of the PC and the mobile terminal is better and the compatibility is strong.
It is to be noted that, since the jacob plug-in, the pdfbox plug-in and the pdf2htmlEX plug-in used in the conversion process of the Office document all need to be executed in the Windows system environment, the method for playing the Office document at the web page end provided in the embodiment of the present invention also needs to be executed in the Windows system environment.
Example two
The embodiment of the invention provides a system for playing Office documents at a webpage end, which comprises a receiving module, a conversion module and a playing module, wherein the receiving module is used for receiving Office documents uploaded by a user; the conversion module is used for converting the Office document into a picture or an HTML file; the playing module is used for playing pictures or HTML files at the webpage end.
The system for playing Office documents at the webpage end provided by the invention adopts the method for playing Office documents at the webpage end in the previous embodiment, so that Word, Excel, PPT or PDF documents can be quickly played at a PC (personal computer) end or a mobile end browser, the labor cost is saved to a great extent, and the error probability during manual document conversion is reduced.
In a specific implementation, the conversion module comprises a judgment unit, a first conversion unit and a second conversion unit, wherein the judgment unit is used for judging whether the Office document is a PDF (Portable document Format) file; the first conversion unit is used for converting the Office document in the non-PDF format into a PDF file; the second conversion unit is used for converting the PDF file into a picture or an HTML file.
The first conversion unit converts the Office document in the non-PDF format into a PDF file by using a jacob plug-in; the second conversion unit converts the PDF file into a picture using a pdfbox plug-in and converts the PDF file into an HTML file using a PDF2htmlEX plug-in. The conversion process does not need to reform the webpage, and is convenient and quick and low in cost.
The conversion module is also provided with a monitoring unit which can provide uniform document conversion management for a service system accessed by the conversion module, monitor the life cycle of the whole file conversion and can report errors in time. In addition, the conversion module also comprises a safety verification unit which is used for carrying out identity authentication on the uploading module and the playing module of the access conversion module, so that the safety of the conversion module is improved, and converted files can be prevented from being stolen.
Taking a webpage version course training system as an example, specifically explaining the system for playing Office documents at a webpage end provided by the embodiment of the invention, firstly, after a mobile end and a PC end use the webpage version course system to upload courseware, the course system receives courseware uploaded by a user and requests a conversion module to perform file conversion, in the specific conversion process, firstly, the type of the file uploaded by the user is judged, when the file is Office documents such as Word, PPT or Excel and the like, the file is preferentially converted into a PDF document, then the PDF document is converted into a corresponding picture or HTML webpage format according to different output requirements, and finally, conversion result information is returned to the webpage end course system to be played, so that the webpage and mobile playing of the courseware realized on the basis of not changing the original training courseware ensured by the user, the file can be converted into two modes of the picture or the HTML according to different requirements of the user, and the display of the picture and the file on the webpage is not dependent on a flash plug-in, the support to the PC and the mobile terminal is better, and the compatibility is strong.
It is to be noted that, since the jacob plug-in, the pdfbox plug-in and the pdf2htmlEX plug-in used in the conversion process of the Office document all need to be executed in the Windows system environment, the system for playing the Office document at the web page end provided in the embodiment of the present invention also needs to be executed in the Windows system environment.
EXAMPLE III
The embodiment of the invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for playing an Office document at a webpage end in the first embodiment are executed. The computer readable storage medium ensures that the method for playing the Office document at the webpage end in the first embodiment is executed in the modes of interface calling and the like on the premise of not changing the original webpage end playing system architecture, so as to realize the webpage and mobile playing of the Office document.
In the foregoing description of embodiments, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for playing Office documents at a webpage end is characterized by comprising the following steps:
receiving an Office document uploaded by a user;
converting the Office document into a picture or an HTML file;
and playing the picture or the HTML file at a webpage end.
2. The method for playing Office document on webpage side according to claim 1, wherein the method for converting the Office document into picture or HTML file specifically comprises:
judging whether the Office document is a PDF file or not, and converting the Office document in a non-PDF format into the PDF file;
and converting the PDF file into a picture or an HTML file.
3. The method for playing Office document on webpage side according to claim 2, wherein the Office document in non-PDF format is converted into PDF file using jacob plug-in.
4. The method for playing Office document according to claim 2, wherein the specific method for converting the PDF file into a picture or an HTML file comprises:
acquiring the space proportion of the picture and the text in the PDF file;
when the picture space proportion of the PDF file is larger than or equal to the text space proportion, converting the PDF file into a picture;
and when the picture space proportion of the PDF file is smaller than the text space proportion, converting the PDF file into an HTML file.
5. The method for playing Office document on web site as claimed in claim 4, wherein the PDF file is converted into picture by using pdfbox plug-in.
6. The method for playing Office document on web site as claimed in claim 4, wherein PDF file is converted to HTML file by PDF2htmlEX plug-in.
7. A system for playing Office documents at a webpage end is characterized by comprising a receiving module, a conversion module and a playing module, wherein,
the receiving module is used for receiving Office documents uploaded by users;
the conversion module is used for converting the Office document into a picture or an HTML file;
the playing module is used for playing the pictures or the HTML files at a webpage end.
8. The system for playing Office document on web site as claimed in claim 7, wherein the conversion module comprises a judgment unit, a first conversion unit and a second conversion unit, wherein,
the judging unit is used for judging whether the Office document is a PDF (portable document format) file;
the first conversion unit is used for converting the Office document in the non-PDF format into a PDF file;
the second conversion unit is used for converting the PDF file into a picture or an HTML file.
9. The system for playing Office document on webpage side according to claim 8, wherein the conversion module further comprises a security verification unit for performing identity authentication on the uploading module and the playing module accessing the conversion module.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of the claims 1 to 6.
CN201910892451.3A 2019-09-20 2019-09-20 Method and system for playing Office document at webpage end Pending CN110765378A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910892451.3A CN110765378A (en) 2019-09-20 2019-09-20 Method and system for playing Office document at webpage end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910892451.3A CN110765378A (en) 2019-09-20 2019-09-20 Method and system for playing Office document at webpage end

Publications (1)

Publication Number Publication Date
CN110765378A true CN110765378A (en) 2020-02-07

Family

ID=69330452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910892451.3A Pending CN110765378A (en) 2019-09-20 2019-09-20 Method and system for playing Office document at webpage end

Country Status (1)

Country Link
CN (1) CN110765378A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612978A (en) * 2020-12-17 2021-04-06 山东浪潮商用系统有限公司 File online browsing method based on browser

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243665A (en) * 2011-08-22 2011-11-16 上海梅花信息有限公司 Document online playing system and method thereof
CN105630459A (en) * 2014-10-25 2016-06-01 上海未达数码科技有限公司 Method for converting PPT document to HTML page

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243665A (en) * 2011-08-22 2011-11-16 上海梅花信息有限公司 Document online playing system and method thereof
CN105630459A (en) * 2014-10-25 2016-06-01 上海未达数码科技有限公司 Method for converting PPT document to HTML page

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
_小李哥: "通过Jacob调用WPS将office文件转为PDF文件", 《HTTPS://BLOG.CSDN.NET/COCOAXIAN/ARTICLE/DETAILS/81333273》 *
QQ:3083155908: "java实现将pdf变成一张图片在页面显示", 《HTTPS://BLOG.CSDN.NET/XIAO297328/ARTICLE/DETAILS/83786778》 *
像忘了谁SQ: "OpenOffice 将word文档转为pdf再转为图片", 《HTTPS://BLOG.CSDN.NET/SONGQIANG2011/ARTICLE/DETAILS/51819468》 *
李慧云,等: "基于HTML5 的移动互联网应用转换技术", 《电信科学》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612978A (en) * 2020-12-17 2021-04-06 山东浪潮商用系统有限公司 File online browsing method based on browser

Similar Documents

Publication Publication Date Title
AU2014308272B2 (en) File sharing method, server and terminal
WO2013034094A1 (en) Webpage browsing method and device, and storage medium
RU2008137141A (en) ASSESSING INITIAL DATA OF DYNAMIC PLAYBACK CONTROLS
CN104601691A (en) Method and system for increasing loading speed of Web site resource
CN106126683B (en) Page display method and terminal equipment
CN104935666A (en) Method and system for watching PDF file with mobile terminal
CN105302802A (en) Picture uploading method and system and browser
US20110289570A1 (en) System and method for integrating remotely accessed data
CN110765378A (en) Method and system for playing Office document at webpage end
CN104090896A (en) Method, device and system for importing data
Gómez et al. Context-aware content adaptation in mlearning
CN104202425A (en) Real-time online data transmission system and remote course data transmission method
CN103248647A (en) Method and server providing cross-platform book reading
CN112948247A (en) Processing method, system, device and medium for operation playback of application program
CN102663063B (en) System and method for showing general information of multiple user platforms based on XSLT (extensible stylesheet language transformation)
CN115909339A (en) Answer image acquisition and submission method and device, electronic equipment and storage medium
Hendra et al. Design and implementation of digital signage system based on raspberry pi 2 for e-tourism in indonesia
Rohit et al. System for Enhancing Accuracy of Noisy Text using Deep Network Language Models
US10176150B2 (en) Remotely providing fonts for an electronic document
CN215499039U (en) File processing system
CN204423415U (en) A kind of evaluating system based on Internet of Things
CN102255912A (en) Method, system and device for authenticating access of IMS (internet protocol multimedia subsystem) terminal to IMS network
KR101195529B1 (en) Apparatus and method for providing a composition correcting service
CN114064739B (en) Marking optimization method and device, electronic equipment and readable storage medium
CN111859210B (en) Image processing method, device, equipment and storage medium

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: 20200207