spring Boot-based file documentation online preview project

spring Boot-based file documentation online preview project

2022-09-02 0 1,040
Resource Number 38040 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

This issue recommends kkFileView, an online document preview project built using spring boot.

spring Boot-based file documentation online preview project插图

kkFileView is a solution that uses spring boot to create online document preview projects. Support doc, docx, ppt, pptx, xls, xlsx, zip, rar, mp4, mp3 and many class texts such as txt, html, xml, java, properties, sql, js, md, json, conf, ini, vue, php, py, bat, gitignore and other files online preview.

Project characteristics

  • Support word, excel, ppt, pdf and other office documents
  • Support the TXT, Java, PHP, py, md, js, CSS, etc. All plain text
  • Support zip,rar,jar,tar,gzip and other compression packages
  • jpg, jpeg, png, gif and other image preview (flip, zoom, mirror)
  • Support mp3, mp4, flv and other multimedia file preview
  • Using spring boot development, the preview service setup deployment is very easy
  • rest interfaces provide services, cross-platform features (java,php,python,go,php,….) Both are supported, and application access is simple and convenient
  • Supports multiple preview sources, such as common http/https file download url, http/https file download stream url, and ftp download url
  • The zip and tar.gz distribution packages provide one-click startup scripts and various configuration items for easy deployment
  • Docker image distribution package for easy deployment in container environment
  • Abstract preview service interface, very easy to add other types of file preview support

Deployment guide

1. environmental requirement

  • Java: 1.8+
  • OpenOffice or LiberOffice (built-in for Windows, automatically downloaded and installed for CentOS or Ubuntu, self-installed for MacOS)

2. Deploy and run

2.1 Running on a physical or virtual machine:

  • Download the latest release from the Code Cloud distribution
  • Decompress the kkFileView-x.x.x file (.zip for Windows and.tar.gz for Linux/MacOS).
  • Open the bin directory of the decompressed folder and run the startup script (in Windows, run startup.bat as administrator, Linu x run startup.sh as root).
  • You can access port 8012 http://127.0.0.1:8012 in your browser to see the home page of the project demonstration

2.2 Docker container environment environment run:

  • Pull image
docker pull keking/kkfileview
  • operation
docker run -it -p 8012:8012 keking/kkfileview

The browser accesses container port 8012
http://xxx.xxx.xxx.xxx:8012 can see demonstration project home page.

3.Use in the project

When you need to preview the file in your project, just call the browser to open the preview interface of the project, and pass in the url of the file that needs to be preview, as shown in the following example:

  • 3. X. x version
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/js-base64@3.6.0/base64.min.js"></script>

var url = 'http://127.0.0.1:8080/file/test.txt'; //The access address to preview the file
window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)));
  • 2x. x and later versions
var url = 'http://127.0.0.1:8080/file/test.txt'; //The access address to preview the file
window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(previewUrl));

Preview display

  • Text preview

All types of text document preview are supported. Too many types of text documents cannot be enumerated. The following types are enabled by default txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd,The text preview looks like this:

spring Boot-based file documentation online preview project插图1

  • word Document Preview

Support doc, docx document preview, word preview has two modes: one is to convert each page of word to picture preview, the other is to convert the entire word document to pdf, and then preview pdf.

Image preview mode preview effect is as follows:

spring Boot-based file documentation online preview project插图2

pdf preview mode preview effect is as follows:

spring Boot-based file documentation online preview project插图3

  • Compressed file preview

Support zip,rar,jar,tar,gzip and other compressed packages, preview effect is as follows:

spring Boot-based file documentation online preview project插图4

Click the file name in the compressed package to preview the file directly. The preview effect is as follows:

spring Boot-based file documentation online preview project插图5

  • CAD document preview

CAD dwg document preview is supported, and there are two preview modes, just like word documents.

Image preview mode preview effect is as follows:

spring Boot-based file documentation online preview project插图6

pdf preview mode preview effect is as follows

spring Boot-based file documentation online preview project插图7

You can read more on your own.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code spring Boot-based file documentation online preview project https://ictcoder.com/kyym/spring-boot-based-file-documentation-online-preview-project.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service