kkFileView

kekingcn活跃维护

基于 Spring-Boot 的通用文件在线预览服务,把 Office、PDF、图片等各类文档转成网页可直接查看的格式,省去本地装软件。

Universal File Online Preview Project based on Spring-Boot

v5.0.3发布于 2026-10-08 07:58 UTC14,840star +6 / 7 天3,341fork同步于 2026-11-10 05:27 UTC

怎么上手

README 里没有找到可直接复制的安装命令

README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。

硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v5.0.3
  1. v5.0.3v5.0.3 — Security release最新正式版2026-10-08 · 2026-10-08 07:58 UTC

    v5.0.3 安全补丁 / Security release

    建议所有 v5.0.2 及更早版本用户升级。JDK 21 及以上仍为运行要求。 All users on v5.0.2 or earlier should upgrade. JDK 21 or higher remains required.

    安全修复 / Security fixes

    • FTP 命令参数控制字符校验 / Validate FTP command arguments before connecting (GHSA-2459-998h-g664).
    • 上传和建目录限制在演示目录内 / Confine uploads and folder creation to demo storage (GHSA-mw74-3vmw-q3hg).
    • 校验全部预览源地址 / Validate every preview source against trust policies (GHSA-xmfr-w3f5-hmr2).
    • 校验页码和代理参数 / Validate page and agent parameters before template rendering (GHSA-p2q6-8h6g-r47q).
    • 移除公开目录枚举入口 / Scope directory trees to validated archive previews (GHSA-g82r-cx6x-rwq5).
    • 监控默认仅返回汇总健康状态 / Limit monitoring defaults to aggregate health (GHSA-35g7-v33j-xjr7).

    其他修复 / Other fixes

    • 修复 Redis 缓存模式下的普通图片预览,保留图片文件名。 / Fix image previews with Redis and preserve original image titles.
    • 修复特殊字符文件地址,以及 Office 水印缺省值和语言环境兼容问题。 / Preserve special characters in preview URLs and fix missing or locale-sensitive Office watermark defaults.
    • 改进 OFD 兼容性、PDF 自定义水印及 Office 依赖兼容性。 / Improve OFD compatibility, custom PDF watermarks, and Office dependency compatibility.

    升级说明 / Upgrade notes

    • 已有外部配置文件需显式设置以下两项;仅替换 JAR 不会覆盖旧配置。发行包中的 application.properties 和 test.properties 均已更新。
    • Existing external configuration files need the following settings; replacing the JAR alone does not override existing configuration. Both shipped configuration files are updated.
    management.endpoints.web.exposure.include = health
    management.endpoint.health.show-details = never
    
    • /directory 已移除,内置压缩包目录预览继续可用。 / /directory is removed; built-in archive browsing remains available.
    • 上传仍默认禁用。启用后,上传和建目录仅允许演示存储目录内的路径,不能通过符号链接写出该目录。 / Uploads remain disabled by default. When enabled, writes and folder creation are confined to demo storage, including symbolic-link checks.
    • 监控指标如需重新开放,请在独立、受保护的管理入口配置访问控制。 / If metrics are needed, expose them through a separately protected management interface.

    完整变更 / Full changelog: https://github.com/kekingcn/kkFileView/compare/v5.0.2...v5.0.3

  2. v5.0.25.0.2版本发布 / Release v5.0.22026-08-14 · 2026-08-14 06:34 UTC
    查看更新说明

    项目简介 / Project Overview

    kkFileView 是一个文件文档在线预览开源解决方案,基于 Spring Boot 构建,部署后可独立提供预览服务,通过 HTTP 接口访问,不需要和业务系统强耦合集成,适合跨系统、跨语言场景使用。项目提供 Windows / Linux 发行包、自定义配置文件,以及一键启动 / 停止脚本,同时也提供 Docker 部署方式,便于在容器环境中快速落地。

    kkFileView is an open-source solution for online file and document preview, built with Spring Boot. Once deployed, it can run as an independent preview service and be accessed through HTTP APIs without tight integration with your business application. It is suitable for cross-system and cross-language usage. The project provides Windows / Linux release packages, custom configuration files, one-click start / stop scripts, and Docker-based deployment options.

    由于项目目前主要由开源社区持续维护和迭代,服务器与运维成本也由社区共同支持,因此我们同步运营了 kk 开源社区,用于发布最新发行包、解答使用问题、沉淀经验案例,并支持 kkFileView 及相关开源项目的持续发展。

    The project is now maintained and iterated mainly by the open-source community. Infrastructure and maintenance costs are also supported by the community, so we operate the kk Community to share the latest release packages, answer usage questions, collect practical experience, and support the sustainable development of kkFileView and related open-source projects.

    本次 v5.0.2 更新内容 / What's New in v5.0.2

    安全修复 / Security Fixes

    中文:

    • 将不可信 HTML 预览放入不具有同源权限的 iframe 沙箱,并默认禁用其中的 JavaScript,避免被预览文件在 kkFileView 应用源中执行脚本(GHSA-9wcf-jxxf-w2g2)。
    • 默认禁用演示文件删除接口,将接口改为 POST,并要求显式配置密码后进行精确比较(GHSA-f3qx-xrwc-5428)。

    English:

    • Sandboxed untrusted HTML previews in an opaque-origin iframe and disabled embedded JavaScript by default, preventing previewed files from executing in the kkFileView application origin (GHSA-9wcf-jxxf-w2g2).
    • Disabled the demo file deletion endpoint by default, changed it to POST, and required an explicitly configured password with exact comparison (GHSA-f3qx-xrwc-5428).

    修复 / Fixes

    中文:

    • 在 PDF 转图服务启动时刷新 ImageIO 插件,使 JBIG2 等嵌套 JAR 图像读取器能够被发现,避免 PDF 转图片预览时部分图像丢失。

    English:

    • Refreshed ImageIO plugins when PDF conversion starts so nested JAR providers such as the JBIG2 reader are discovered, preventing images from disappearing in PDF-to-image previews.

    升级说明 / Upgrade Notes

    中文:

    • 建议所有 v5.0.1 及更早版本用户尽快升级到 v5.0.2。
    • 本版本继续要求 JDK 21 及以上,现有 v5.0.1 配置可直接沿用。
    • 文件删除功能现在默认禁用;如确需启用,请通过 KK_DELETE_PASSWORD 或外部 delete.password 设置独立强密码,并将 /deleteFile 调用改为 POST。
    • kk.scriptjs 现在默认为 false;显式启用后,脚本仍只会在隔离的 iframe 沙箱内运行。

    English:

    • All users running v5.0.1 or earlier are strongly encouraged to upgrade to v5.0.2.
    • JDK 21 or higher remains required, and existing v5.0.1 configuration can be reused.
    • File deletion is now disabled unless KK_DELETE_PASSWORD or an external delete.password is set to an independent strong password; integrations must call /deleteFile with POST.
    • kk.scriptjs now defaults to false; when explicitly enabled, scripts still run only inside the isolated iframe sandbox.

    完整变更 / Full Changelog: https://github.com/kekingcn/kkFileView/compare/v5.0.1...v5.0.2


    社区说明 / Community Note

    最新发行包、部署答疑、使用问题支持,以及 kkFileView 相关经验分享,会优先在 kk 开源社区内同步。欢迎加入社区,支持开源项目持续迭代。

    The latest release packages, deployment support, usage Q&A, and practical experience around kkFileView are shared first in the kk Community. You are welcome to join the community and support the continued development of this open-source project.

  3. v5.0.15.0.1版本发布 / Release v5.0.12026-07-13 · 2026-07-13 09:21 UTC
    查看更新说明

    项目简介 / Project Overview

    kkFileView 是一个文件文档在线预览开源解决方案,基于 Spring Boot 构建,部署后可独立提供预览服务,通过 HTTP 接口访问,不需要和业务系统强耦合集成,适合跨系统、跨语言场景使用。项目提供 Windows / Linux 发行包、自定义配置文件,以及一键启动 / 停止脚本,同时也提供 Docker 部署方式,便于在容器环境中快速落地。

    kkFileView is an open-source solution for online file and document preview, built with Spring Boot. Once deployed, it can run as an independent preview service and be accessed through HTTP APIs without tight integration with your business application. It is suitable for cross-system and cross-language usage. The project provides Windows / Linux release packages, custom configuration files, one-click start / stop scripts, and Docker-based deployment options.

    由于项目目前主要由开源社区持续维护和迭代,服务器与运维成本也由社区共同支持,因此我们同步运营了 kk 开源社区,用于发布最新发行包、解答使用问题、沉淀经验案例,并支持 kkFileView 及相关开源项目的持续发展。

    The project is now maintained and iterated mainly by the open-source community. Infrastructure and maintenance costs are also supported by the community, so we operate the kk Community to share the latest release packages, answer usage questions, collect practical experience, and support the sustainable development of kkFileView and related open-source projects.

    本次 v5.0.1 更新内容 / What's New in v5.0.1

    安全修复 / Security Fixes

    中文:

    • 修复 /addTask 未应用信任主机和本地目录过滤,可能导致服务端请求伪造(SSRF)的问题(GHSA-gwwj-52hv-6g2m)。
    • 修复 /listFiles 的 directory 参数可越出演示目录,造成路径遍历和目录信息泄露的问题(GHSA-pmp8-g8p2-p6jq)。

    English:

    • Fixed /addTask bypassing trusted-host and local-directory filters, which could allow server-side request forgery (SSRF) (GHSA-gwwj-52hv-6g2m).
    • Fixed the /listFiles directory parameter escaping the demo directory, which could allow path traversal and directory information disclosure (GHSA-pmp8-g8p2-p6jq).

    修复 / Fixes

    中文:

    • 修复 PDF 跨域、页码定位、文本高亮、打印、打印水印和反向代理绝对路径相关问题。
    • 修复水印或高亮文本包含特殊字符时的解析失败。
    • 修复 Redis 单机、集群、主从、哨兵模式配置不一致和地址协议缺失问题。
    • 修复下载 MIME 类型校验失败后仍返回成功、HTTP 错误原因不明确,以及共享 HTTP Client 被错误关闭的问题。
    • 修复 LuckyExcel 数据校验类型未映射时的 xlsx 解析崩溃。

    English:

    • Fixed PDF cross-origin access, page positioning, text highlighting, printing, print watermarks, and absolute paths behind reverse proxies.
    • Fixed parsing failures when watermark or highlight text contains special characters.
    • Fixed inconsistent Redis settings across standalone, cluster, master-replica, and sentinel modes, including missing address protocols.
    • Fixed successful responses after MIME validation failures, unclear HTTP error reporting, and accidental closure of a shared HTTP client.
    • Fixed xlsx parsing crashes when LuckyExcel data-validation types have no mapping.

    优化 / Improvements

    中文:

    • 大型 xlsx 文件改用 Web Worker 执行 LuckyExcel 解析,并在 Worker 不可用或异常时自动回退主线程。
    • 新增 pdf.sidebar.open 配置,可控制 PDF 预览是否默认打开侧栏。
    • Maven CI 增加 Linux、Windows、macOS 构建验证。
    • 新增仓库安全策略和私密漏洞报告入口。

    English:

    • Moved LuckyExcel parsing for large xlsx files into a Web Worker, with automatic main-thread fallback when the Worker is unavailable or fails.
    • Added pdf.sidebar.open to control whether the PDF sidebar opens by default.
    • Added Linux, Windows, and macOS validation to Maven CI.
    • Added a repository security policy and private vulnerability reporting guidance.

    升级说明 / Upgrade Notes

    中文:

    • 建议所有 v5.0.0 及更早版本用户尽快升级到 v5.0.1;这是上述两个安全公告的首个修复版本。
    • 本版本继续要求 JDK 21 及以上,现有 v5.0.0 配置可直接沿用。

    English:

    • All users running v5.0.0 or earlier are strongly encouraged to upgrade to v5.0.1, the first patched release for both advisories above.
    • JDK 21 or higher remains required, and existing v5.0.0 configuration can be reused.

    完整变更 / Full Changelog: https://github.com/kekingcn/kkFileV

  4. v5.0.05.0.0版本发布 / Release v5.0.02026-04-14 · 2026-04-14 01:14 UTC
    查看更新说明

    项目简介 / Project Overview

    kkFileView 是一个文件文档在线预览开源解决方案,基于 Spring Boot 构建,部署后可独立提供预览服务,通过 HTTP 接口访问,不需要和业务系统强耦合集成,适合跨系统、跨语言场景使用。项目提供 Windows / Linux 发行包、自定义配置文件,以及一键启动 / 停止脚本,同时也提供 Docker 部署方式,便于在容器环境中快速落地。

    kkFileView is an open-source solution for online file and document preview, built with Spring Boot. Once deployed, it can run as an independent preview service and be accessed through HTTP APIs without tight integration with your business application. It is suitable for cross-system and cross-language usage. The project provides Windows / Linux release packages, custom configuration files, one-click start / stop scripts, and Docker-based deployment options.

    由于项目目前主要由开源社区持续维护和迭代,服务器与运维成本也由社区共同支持,因此我们同步运营了 kk 开源社区,用于发布最新发行包、解答使用问题、沉淀经验案例,并支持 kkFileView 及相关开源项目的持续发展。

    The project is now maintained and iterated mainly by the open-source community. Infrastructure and maintenance costs are also supported by the community, so we operate the kk Community to share the latest release packages, answer usage questions, collect practical experience, and support the sustainable development of kkFileView and related open-source projects.

    本次 v5.0.0 更新内容 / What's New in v5.0.0

    优化 / Improvements

    中文:

    • 优化 xlsx、图片、tif、svg、json 解析效果,并提升 FTP 多客户端接入与 Markdown 渲染体验。
    • 首页支持目录访问,并切换为 POST 服务端分页机制。
    • 压缩包预览页重构为单工作区布局,支持目录折叠与右侧内嵌预览。
    • 优化压缩包内文件类型标识,并改进单图预览页展示样式。
    • 重构演示门户页面,包括首页、接入说明、版本记录与赞助页。
    • 补充面向工程自动化与编码代理的仓库说明文档。

    English:

    • Improved parsing and rendering for xlsx, images, tif, svg, and json, while enhancing FTP multi-client access and Markdown rendering.
    • Added directory access on the home page and switched it to POST-based server-side pagination.
    • Redesigned archive preview into a single workspace with a collapsible tree and inline preview panel.
    • Improved archive file-type badges and refined the single-image preview experience.
    • Refreshed the demo portal pages, including the index, integration guide, release record, and sponsor pages.
    • Added an agent-friendly repository guide for engineering automation and maintenance.

    新增 / New Capabilities

    中文:

    • 新增 msg 邮件预览、HEIC/HEIF 预览、pptm 支持。
    • 新增页码定位、文本高亮、AES、Basic Auth、秘钥访问等能力。
    • 新增防重复转换、异步等待、上传限制与 cadviewer 转换能力。

    English:

    • Added support for msg email preview, HEIC/HEIF preview, and pptm.
    • Added page positioning, text highlighting, AES, Basic Auth, and key-based access capabilities.
    • Added anti-duplicate conversion, async waiting, upload restrictions, and cadviewer conversion support.

    修复 / Fixes

    中文:

    • 修复压缩包路径处理问题、安全相关问题、图片水印不完整问题,以及 SSL 自签证书接入兼容性问题。
    • 修复压缩包内 Office 文件重复解压后被追加写坏,导致一直卡在加载中的问题。
    • 修复 OFD 表格竖线溢出导致的渲染异常。
    • 修复 PDF.js 兼容性补丁,避免兼容环境下的预览报错。

    English:

    • Fixed compressed-file path handling, multiple security-related issues, incomplete image watermark rendering, and SSL self-signed certificate compatibility.
    • Fixed archive-contained Office files that could stay stuck on loading because repeated extraction appended to existing files.
    • Fixed OFD table border overflow rendering issues.
    • Refined the PDF.js compatibility polyfill to avoid preview errors in compatibility environments.

    升级说明 / Upgrade Notes

    中文:

    • JDK 21 及以上现已成为必需要求。
    • Office 预览默认切换为 PDF 模式,且 PDF 预览默认展开缩略图侧栏。
    • 图片/PDF 模式切换按钮默认隐藏;如果你希望升级后继续保持旧的图片优先体验,请显式设置 office.preview.type=image 与 office.preview.switch.disabled=false。
    • trust.host 及相关规则现已支持通配符和 CIDR 匹配;如果你依赖域名/IP 模式匹配,请在升级后重新检查白名单和黑名单的实际生效范围。

    English:

    • JDK 21 or higher is now required.
    • Office preview now defaults to PDF mode, and PDF preview opens with the thumbnail sidebar visible by default.
    • The image/PDF mode switch is hidden by default. If you need the previous image-first behavior after upgrade, explicitly set office.preview.type=image and office.preview.switch.disabled=false.
    • trust.host and related rules now support wild
  5. v4.4.04.4.0版本发布2025-01-16 · 2025-01-16 03:42 UTC
    查看更新说明

    项目简介

        本项目为文件文档在线预览开源解决方案,项目使用流行的 Spring Boot 搭建,易上手和部署,部署好后可以独立提供预览服务,使用 http 接口访问,不需要和应用集成,具有跨系统跨语言使用的特性。提供 Windows / Linux 版本发行包、自定义配置文件、和一键启动 / 停止脚本等,极大方便部署使用,同时官方提供 Docker 镜像,方便容器环境中部署使用。

    由于本项目现在完全由开源社区主导维护和迭代,也意味着所有的服务器费用需要社区来支持,所以我们推出了付费的知识社区。

    本社区用于发布最新的 kkFileView 发行包,以及解答使用 kkFIleView 遇到的任何问题,创建付费社区旨在推动以 kkFileView 为首的一系列 kk 开源项目的健康、可持续发展。欢迎加入我们的社区,支持我们开源。

    本次 v4.4.0 更新内容:

    优化

    1. 优化 OFD 移动端预览 页面不自适应
    2. 更新 xlsx 前端解析组件,加速解析速度
    3. 升级 CAD 组件
    4. office 功能调整,支持批注、转换页码限制、生成水印等功能
    5. 升级 markdown 组件
    6. 升级 dcm 解析组件
    7. 升级 PDF.JS 解析组件
    8. 更换视频播放插件为 ckplayer
    9. tif 解析更加智能化,支持被修改的图片格式
    10. 针对大小文本文件检测字符编码的正确率,处理并发隐患
    11. 重构下载文件的代码,新增通用的文件服务器认证访问的设计
    12. 更新 bootstrap 组件,并精简掉不需要的文件
    13. 更新 epub 版本,优化 epub 显示效果
    14. 解决定时清除缓存时,对于多媒体类型文件,只删除了磁盘缓存文件
    15. 自动检测已安装 Office 组件,增加 LibreOffice 7.5 & 7.6 版本默认路径
    16. 修改 drawio 默认为预览模式
    17. 新增 PDF 线程管理、超时管理、内存缓存管理,更新 PDF 解析组件版本
    18. 优化 Dockerfile,支持真正的跨平台构建镜像

    新增

    1. xlsx 新增支持打印功能
    2. 配置文件新增启用 GZIP 压缩
    3. CAD 格式新增支持转换成 SVG 和 TIF 格式,新增超时结束、线程管理
    4. 新增删除文件使用验证码校验
    5. 新增 xbrl 格式预览支持
    6. PDF 预览新增控制签名、绘图、插图控制、搜索定位页码、定义显示内容等功能
    7. 新增 CSV 格式前端解析支持
    8. 新增 ARM64 下的 Docker 镜像支持
    9. 新增 Office 预览支持转换超时属性设置功能
    10. 新增预览文件 host 黑名单机制

    修复

    1. 修复 forceUpdatedCache 属性设置,但本地缓存文件不更新的问题
    2. 修复 PDF 解密加密文件转换成功后后台报错的问题
    3. 修复 BPMN 不支持跨域的问题
    4. 修复压缩包二级反代特殊符号错误问题
    5. 修复视频跨域配置导致视频无法预览的问题
    6. 修复 TXT 文本类分页二次加载问题
    7. 修复 Drawio 缺少 Base64 组件的问题
    8. 修复 Markdown 被转义问题
    9. 修复 EPUB 跨域报错问题
    10. 修复 URL 特殊符号问题
    11. 修复压缩包穿越漏洞
    12. 修复压缩获取路径错误、图片合集路径错误、水印问题等 BUG
    13. 修复前端解析 XLSX 包含 EMF 格式文件错误问题

    预览文件支持请至在线体验:https://file.kkview.cn 查看

    kkFileView 支持预览的文件类型列表:

    1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx,xlam, xla ,pages 等 Office 办公文档
    2. 支持 wps, dps, et, ett, wpt 等国产 WPS Office 办公文档
    3. 支持 odt, ods, ots, odp, otp, six, ott, fodt, fods 等OpenOffice、LibreOffice 办公文档
    4. 支持 vsd, vsdx 等 Visio 流程图文件
    5. 支持 wmf, emf 等 Windows 系统图像文件
    6. 支持 psd ,eps 等 Photoshop 软件模型文件
    7. 支持 pdf ,ofd, rtf 等文档
    8. 支持 xmind 软件模型文件
    9. 支持 bpmn 工作流文件
    10. 支持 eml 邮件文件
    11. 支持 epub 图书文档
    12. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件
    13. 支持 dwg, dxf, dwf, iges , igs, dwt, dng, ifc, dwfx, stl, cf2, plt 等 CAD 模型文件
    14. 支持 txt, xml(渲染), md(渲染), java, php, py, js, css 等所有纯文本
    15. 支持 zip, rar, jar, tar, gzip, 7z 等压缩包
    16. 支持 jpg, jpeg, png, gif, bmp, ico, jfif, webp 等图片预览(翻转,缩放,镜像)
    17. 支持 tif, tiff 图信息模型文件
    18. 支持 tga 图像格式文件
    19. 支持 svg 矢量图像格式文件
    20. 支持 mp3,wav,mp4,flv 等音视频格式文件
    21. 支持 avi, mov, rm, webm, ts, rm, mkv, mpeg, ogg, mpg, rmvb, wmv, 3gp, ts, swf 等视频格式转码预览
    22. 支持 dcm 等医疗数位影像预览
    23. 支持 drawio 绘图预览

    发行版下载:

    kkFileView-4.4.0.zip (Windows版) kkFileView-4.4.0.tar.gz (Linux或MacOS版) kkFileView-4.4.0-docker_x64.tar (x86架构Docker离线文件版) kkFileView-4.4.0-docker_arrch.tar (arm64架构Docker离线文件版)

    以上安装包请加入 kk开源社区 获取

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    kkFileView

    Introduction

    Document online preview project solution, built using the popular Spring Boot framework for easy setup and deployment. This versatile open source project provides basic support for a wide range of document formats, including:

    1. Supports Office documents such as doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, , dotm, xlt, xltm, dot, xlam, dotx, xla, ,pages ,pptm etc.
    2. Supports domestic WPS Office documents such as wps, dps, et , ett, wpt.
    3. Supports OpenOffice, LibreOffice office documents such as odt, ods, ots, odp, otp, six, ott, fodt and fods.
    4. Supports Visio flowchart files such as vsd, vsdx.
    5. Supports Windows system image files such as wmf, emf.
    6. Supports Photoshop software model files such as psd ,eps.
    7. Supports document formats like pdf, ofd, and rtf.
    8. Supports software model files like xmind.
    9. Support for bpmn workflow files.
    10. Support for eml , msg mail files
    11. Support for epub book documents
    12. Supports 3D model files like obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim, etc.
    13. Supports CAD model files such as dwg, dxf, dwf iges , igs, dwt , dng , ifc , dwfx , stl , cf2 , plt, etc.
    14. Supports all plain text files such as txt, xml (rendering), md (rendering), java, php, py, js, css, etc.
    15. Supports compressed packages such as zip, rar, jar, tar, gzip, 7z, etc.
    16. Supports image previewing (flip, zoom, mirror) of jpg, jpeg, png, gif, bmp, ico, jfif, webp, heic, ,heif etc.
    17. Supports image information model files such as tif and tiff.
    18. Supports image format files such as tga.
    19. Supports vector image format files such as svg.
    20. Supports mp3,wav,mp4,flv .
    21. Supports many audio and video format files such as avi, mov, wmv, mkv, 3gp, and rm.
    22. Supports for dcm .
    23. Supports for drawio .

    Features

    • Build with the popular frame spring boot
    • Easy to build and deploy
    • Basically support online preview of mainstream office documents, such as Doc, docx, Excel, PDF, TXT, zip, rar, pictures, etc
    • REST API
    • Abstract file preview interface so that it is easy to extend more file extensions and develop this project on your own

    Official website and DOCS

    URL:https://kkview.cn

    Live demo

    Please treat public service kindly, or this would stop at any time.

    URL:https://file.kkview.cn

    Contact Us

    We will answer your questions carefully and solve any problems you encounter while using the project. We also kindly ask that you at least Google or Baidu before asking questions in order to save time and avoid ineffective communication. Let's cherish our lives and stay away from ineffective communication.

    Quick Start

    Technology stack

    Dependencies

    • Redis(Optional, Unnecessary by default)
    • OpenOffice or LibreOffice(Integrated on Windows, will be installed automatically on Linux, need to be manually installed on Mac OS)
    1. First step:git pull https://github.com/kekingcn/kkFileView.git

    2. second step:Run the main method of /server/src/main/java/cn/keking/ServerMain.java. After starting,visit http://localhost:8012/.

    Change History

    Version 5.0.3 (October 8, 2026)

    Security Fixes
    1. Reject control characters in FTP command arguments before connecting
    2. Confine uploads and folder creation to demo storage, including symbolic-link checks
    3. Validate every preview source URL to prevent parameter-confusion bypasses of trust policies
    4. Validate page and agent parameters before rendering preview templates
    5. Render archive directory trees within the validated preview flow and remove the public /directory endpoint
    6. Expose only aggregate health status by default; detailed health, info, and metrics are no longer public defaults
    Upgrade Notes
    1. All v5.0.2 and earlier users should upgrade to v5.0.3; JDK 21 or higher remains required
    2. Existing external configuration files must set management.endpoints.web.exposure.include=health and management.endpoint.health.show-details=never to apply the monitoring hardening
    3. The /directory endpoint is removed; the built-in archive preview remains supported
    4. Uploads remain disabled by default. Enabled uploads and folder creation accept only paths beneath demo storage

    Version 5.0.2 (August 14, 2026)

    Security Fixes
    1. Sandboxed untrusted HTML previews in an opaque-origin iframe and disabled embedded JavaScript by default, preventing previewed files from executing in the kkFileView application origin (GHSA-9wcf-jxxf-w2g2)
    2. Disabled the demo file deletion endpoint by default, changed it to POST, and required an explicitly configured password with exact comparison (GHSA-f3qx-xrwc-5428)
    Fixes
    1. Refreshed ImageIO plugins when PDF conversion starts so nested JAR providers such as the JBIG2 reader are discovered, preventing images from disappearing in PDF-to-image previews
    Upgrade Notes
    1. All users running v5.0.1 or earlier are strongly encouraged to upgrade to v5.0.2
    2. JDK 21 or higher remains required, and existing v5.0.1 configuration can be reused
    3. File deletion is now disabled unless KK_DELETE_PASSWORD or an external delete.password is set to an independent strong password; integrations must call /deleteFile with POST
    4. kk.scriptjs now defaults to false; when explicitly enabled, scripts still run only inside the isolated iframe sandbox

    Version 5.0.1 (July 13, 2026)

    Security Fixes
    1. Fixed /addTask bypassing trusted-host and local-directory filters, which could allow server-side request forgery (SSRF) (GHSA-gwwj-52hv-6g2m)
    2. Fixed the /listFiles directory parameter escaping the demo directory, which could allow path traversal and directory information disclosure (GHSA-pmp8-g8p2-p6jq)
    Fixes
    1. Fixed PDF cross-origin access, page positioning, text highlighting, printing, and print watermark issues
    2. Fixed PDF absolute paths behind reverse proxies and parsing failures when watermark or highlight text contains special characters
    3. Fixed inconsistent Redis settings across standalone, cluster, master-replica, and sentinel modes, including missing address protocols
    4. Fixed successful responses after MIME validation failures, unclear HTTP error reporting, and accidental closure of a shared HTTP client
    5. Fixed xlsx parsing crashes when LuckyExcel data-validation types have no mapping
    Improvements
    1. Moved LuckyExcel parsing for large xlsx files into a Web Worker, with automatic main-thread fallback when the Worker is unavailable or fails
    2. Added pdf.sidebar.open to control whether the PDF sidebar opens by default
    3. Added Linux, Windows, and macOS validation to Maven CI
    4. Added a repository security policy and private vulnerability reporting guidance
    Upgrade Notes
    1. All users running v5.0.0 or earlier are strongly encouraged to upgrade to v5.0.1
    2. JDK 21 or higher remains required, and existing v5.0.0 configuration can be reused

    Version 5.0.0 (April 14, 2026)

    Improvements
    1. Enhanced xlsx front-end parsing - Improved Excel file front-end rendering performance
    2. Optimized image parsing - Enhanced image processing mechanism
    3. Improved tif parsing - Enhanced TIF format support
    4. Enhanced svg parsing - Optimized SVG vector image rendering
    5. Improved json parsing - Enhanced JSON file processing
    6. Optimized ftp multi-client access - Improved FTP service compatibility
    7. Enhanced home page directory access - Implemented post server-side pagination mechanism
    8. Improved marked parsing - Enhanced Markdown rendering
    9. Redesigned archive preview into a single workspace with a collapsible tree and inline file preview
    10. Improved archive preview file-type badges and single-image preview styling
    11. Added an agent-focused repository guide for engineering automation and maintenance
    12. Refreshed the demo portal pages, including the index, integration guide, release record, and sponsor pages
    New Features
    1. msg email parsing - Added support for msg format email file preview
    2. heic image parsing - Added support for HEIC format image preview
    3. Cross-domain methods - Added cross-domain processing mechanism
    4. Highlighting methods - Added text highlighting functionality
    5. Pagination methods - Added document page control
    6. AES encryption methods - Added AES encryption support
    7. Basic authentication methods - Added Basic authentication mechanism
    8. Key management methods - Added key management functionality
    9. Anti-duplicate conversion - Added duplicate file conversion protection
    10. Async waiting - Added asynchronous processing mechanism
    11. Upload restrictions - Added restrictions for unsupported file uploads
    12. cadviewer conversion methods - Added CAD viewer conversion functionality
    Fixed Issues
    1. Compressed file path issues - Fixed internal path handling in compressed files
    2. Security issues - Fixed security vulnerabilities
    3. Incomplete image watermark issues - Fixed incomplete watermark display
    4. SSL self-signed certificate access issues - Fixed compatibility with self-signed certificates
    5. Fixed archive-contained Office files that could stay stuck on loading because repeated extraction appended to existing files
    6. Default Office preview now prefers PDF mode, and PDF preview opens with the thumbnail sidebar visible by default
    7. Updated startup scripts to discover the packaged jar dynamically instead of relying on stale hard-coded jar names
    8. Updated Docker and release helper docs to align with the 5.0.0 release line
    9. Fixed OFD table border overflow rendering issues
    10. Refined the PDF.js compatibility polyfill to avoid preview errors in compatibility environments
    Updates
    1. JDK version requirement - Mandatory requirement for JDK 21 or higher
    2. pdf front-end parsing update - Upgraded PDF front-end rendering component
    3. odf front-end parsing update - Upgraded ODF document front-end rendering
    4. 3D model front-end parsing update - Upgraded 3D model viewer
    5. pdf backend async conversion optimization - Implemented multi-threaded asynchronous conversion
    6. tif backend async conversion optimization - Implemented multi-threaded asynchronous conversion
    7. Video backend async conversion optimization - Implemented multi-threaded asynchronous conversion
    8. CAD backend async conversion optimization - Implemented multi-threaded asynchronous conversion
    9. Default preview configuration strategy adjusted - Office preview now defaults to PDF mode, the mode switch is hidden by default, and PDF preview opens with the thumbnail sidebar visible. If you need the previous image-first behavior after upgrade, explicitly set office.preview.type=image and office.preview.switch.disabled=false.
    10. Trust host configuration matching expanded - trust.host and related rules now support wildcard and CIDR matching, which may broaden or narrow effective allow/deny behavior after upgrade depending on your patterns

    Version 4.4.0 (January 16, 2025)

    New Features
    1. xlsx printing support
    2. Added GZIP compression enablement in configuration
    3. CAD format now supports conversion to SVG and TIF formats, added timeout termination and thread management
    4. Added captcha verification for file deletion
    5. Added xbrl format preview support
    6. PDF preview added control over signatures, drawings, illustration control, search positioning pagination, and display content definition
    7. Added CSV format front-end parsing support
    8. Added Docker image support for ARM64
    9. Added Office preview conversion timeout property setting
    10. Added preview file host blacklist mechanism
    Optimizations
    1. Optimized OFD mobile preview page adaptability
    2. Updated xlsx front-end parsing component to accelerate parsing speed
    3. Upgraded CAD component
    4. Office function adjustments, supporting comments, conversion page limit, watermark generation, etc.
    5. Upgraded markdown component
    6. Upgraded dcm parsing component
    7. Upgraded PDF.JS parsing component
    8. Changed video player plugin to ckplayer
    9. Smarter tif parsing, supporting modified image formats
    10. Improved character encoding detection accuracy for large and small text files, handling concurrency vulnerabilities
    11. Refactored file download code, added general file server authentication access design
    12. Updated bootstrap component and streamlined unnecessary files
    13. Updated epub version, optimized epub display effect
    14. Fixed issue where scheduled cache cleanup only deleted disk cache files for multimedia file types
    15. Auto-detection of installed Office components, added default paths for LibreOffice 7.5 & 7.6 versions
    16. Changed drawio default to preview mode
    17. Added PDF thread management, timeout management, memory cache management, updated PDF parsing component version
    18. Optimized Dockerfile for true cross-platform image building
    Fixes
    1. Fixed forceUpdatedCache property setting issue where local cache files weren't updated
    2. Fixed PDF decryption error after successful encrypted file conversion
    3. Fixed BPMN cross-domain support issue
    4. Fixed special character error in compressed package secondary reverse proxy
    5. Fixed video cross-domain configuration causing video preview failure
    6. Fixed TXT text pagination secondary loading issue
    7. Fixed Drawio missing Base64 component issue
    8. Fixed Markdown escaping issue
    9. Fixed EPUB cross-domain error
    10. Fixed URL special character issues
    11. Fixed compressed package traversal vulnerability
    12. Fixed compressed file path errors, image collection path errors, watermark issues, etc.
    13. Fixed front-end parsing XLSX containing EMF format file errors

    Version 4.3.0 (July 5, 2023)

    New Features
    1. Added DCM medical digital imaging preview
    2. Added drawio drawing preview
    3. Added command to regenerate with cache enabled: &forceUpdatedCache=true
    4. Added dwg CAD file preview
    5. Added PDF file password support
    6. Added DPI customization for PDF file image generation
    7. Added configuration to delete converted OFFICE, CAD, TIFF, compressed package source files (enabled by default to save disk space)
    8. Added front-end xlsx parsing method
    9. Added support for pages, eps, iges, igs, dwt, dng, ifc, dwfx, stl, cf2, plt and other formats
    Optimizations
    1. Modified generated PDF file names to include file extensions to prevent duplicate names
    2. Adjusted SQL file preview method
    3. Optimized OFD preview compatibility
    4. Beautified TXT text pagination box display
    5. Upgraded Linux/Docker built-in office to LibreOffice-7.5.3
    6. Upgraded Windows built-in office to LibreOffice-7.5.3 Portable
    7. Other functional optimizations
    Fixes
    1. Fixed compressed package path errors in reverse proxy scenarios
    2. Fixed .click error when image preview URLs contain &
    3. Fixed known OFD preview issues
    4. Fixed page error when clicking on file directories (tree nodes) in compressed package preview
    5. Other known issue fixes

    Version 4.2.1 (April 18, 2023)

    Change Log
    1. Fixed null pointer bug in dwg file preview

    Version 4.2.0 (April 13, 2023)

    New Features
    1. Added SVG format file preview support
    2. Added encrypted Office file preview support
    3. Added encrypted zip, rar, and other compressed package file preview support
    4. Added xmind software model file preview support
    5. Added BPMN workflow model file preview support
    6. Added eml email file preview support
    7. Added EPUB e-book file preview support
    8. Added office document format support: dotm, ett, xlt, xltm, wpt, dot, xlam, xla, dotx, etc.
    9. Added 3D model file support: obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim, etc.
    10. Added configurable high-risk file upload restrictions (e.g., exe files)
    11. Added configurable site filing information
    12. Added password requirement for demo site file deletion
    Optimizations
    1. Added caching for text document preview
    2. Beautified 404, 500 error pages
    3. Optimized invoice and other OFD file preview seal rendering compatibility
    4. Removed office-plugin module, using new jodconverter component
    5. Optimized Excel file preview effect
    6. Optimized CAD file preview effect
    7. Updated xstream, junrar, pdfbox, and other dependency versions
    8. Updated TIF to PDF conversion plugin, added conversion cache
    9. Optimized demo page UI deployment
    10. Compressed package file preview supports directories
    Fixes
    1. Fixed XSS issues in some interfaces
    2. Fixed console printed demo address not following content-path configuration
    3. Fixed OFD file preview cross-domain issues
    4. Fixed internal self-signed certificate HTTPS URL file download issues
    5. Fixed special character file deletion issues
    6. Fixed OOM caused by unreclaimed memory in PDF to image conversion
    7. Fixed garbled preview for xlsx 7.4+ version files
    8. Fixed TrustHostFilter not intercepting cross-domain interfaces (security issue - upgrade required if using TrustHost)
    9. Fixed compressed package file preview filename garbled issue on Linux systems
    10. Fixed OFD file preview only displaying 10 pages

    Changelog

    December 14, 2022, version 4.1.0 released:

    1. Updated homepage design by @wsd7747.
    2. Compatible with multipage tif for pdf and jpg conversion and multiple page online preview for tif image preview by @zhangzhen1979.
    3. Optimized docker build, using layered build method by @yl-yue.
    4. Implemented file encryption based on userToken cache by @yl-yue.
    5. Implemented preview for encrypted Word, PPT, and Excel files by @yl-yue.
    6. Upgraded Linux & Docker images to LibreOffice 7.3.
    7. Updated OFD preview component, tif preview component, and added support for PPT watermarking.
    8. Numerous other upgrades, optimizations, and bug fixes. We thank @yl-yue, @wsd7747, @zhangzhen1979, @tomhusky, @shenghuadun, and @kischn.sun for their code contributions.

    July 6, 2021, version 4.0.0 released:

    1. The integration of OpenOffice in the underlying system has been replaced with LibreOffice, resulting in enhanced compatibility and improved preview effects for Office files.
    2. Fixed the directory traversal vulnerability in compressed files.
    3. Fixed the issue where previewing PPT files in PDF mode was ineffective.
    4. Fixed the issue where the front-end display of image preview mode for PPT files was abnormal.
    5. Added a new feature: the file upload function on the homepage can be enabled or disabled in real-time through configuration.
    6. Optimized the logging of Office process shutdown.
    7. Optimized the logic for finding Office components in Windows environment, with built-in LibreOffice taking priority.
    8. Optimized the synchronous execution of starting Office processes.

    June 17, 2021, version 3.6.0 released:

    This version includes support for OFD file type versions, and all the important features in this release were contributed by the community. We thank @gaoxingzaq and @zhangxiaoxiao9527 for their code contributions.

    1. Added support for previewing OFD type files. OFD is a domestically produced file format similar to PDF.
    2. Added support for transcoding and previewing video files through ffmpeg. With transcoding enabled, theoretically, all mainstream video file formats such as RM, RMVB, FLV, etc. are supported for preview.
    3. Beautified the preview effect of PPT and PPTX file types, much better looking than the previous version.
    4. Updated the versions of dependencies such as pdfbox, xstream, common-io.

    January 28, 2021:

    The final update of the Lunar New Year 2020 has been released, mainly including some UI improvements, bug fixes reported by QQ group users and issues, and most importantly, it is a new version for a good year.

    1. Introduced galimatias to solve the problem of abnormal file download caused by non-standard file names.
    2. Updated UI style of index access demonstration interface.
    3. Updated UI style of markdown file preview.
    4. Updated UI style of XML file preview, adjusted the architecture of text file preview to facilitate expansion.
    5. Updated UI style of simTxT file preview.
    6. Adjusted the UI of continuous preview of multiple images to flip up and down.
    7. Simplified all file download IO operations by adopting the apache-common-io package.
    8. XML file preview supports switching to pure text mode.
    9. Enhanced prompt information when url base64 decoding fails.
    10. Fixed import errors and image preview bug.
    11. Fixed the problem of missing log directory when running the release package.
    12. Fixed the bug of continuous preview of multiple images in the compressed package.
    13. Fixed the problem of no universal matching for file type suffixes in uppercase and lowercase.
    14. Specified the use of the Apache Commons-code implementation for Base64 encoding to fix exceptions occurring in some JDK versions.
    15. Fixed the bug of HTML file preview of text-like files.
    16. Fixed the problem of inability to switch between jpg and pdf when previewing dwg files.
    17. Escaped dangerous characters to prevent reflected xss.
    18. Fixed the problem of duplicate encoding causing the failure of document-to-image preview and standardized the encoding.

    December 27, 2020:

    The year-end major update of 2020 includes comprehensive architecture design, complete code refactoring, significant improvement in code quality, and more convenient secondary development. We welcome you to review the source code and contribute to building by raising issues and pull requests.

    1. Adjusted architecture modules, extensively refactored code, and improved code quality by several levels. Please feel free to review.
    2. Enhanced XML file preview effect and added preview of XML document structure.
    3. Added support for markdown file preview, including support for md rendering and switching between source text and preview.
    4. Switched the underlying web server to jetty, resolving the issue: https://github.com/kekingcn/kkFileView/issues/168
    5. Introduced cpdetector to solve the problem of file encoding recognition.
    6. Adopted double encoding with base64 and urlencode for URLs to completely solve preview problems with bizarre file names.
    7. Added configuration item office.preview.switch.disabled to control the switch of office file preview.
    8. Optimized text file preview logic, transmitting content through Base64 to avoid requesting file content again during preview.
    9. Disabled the image zoom effect in office preview mode to achieve consistent experience with image and pdf preview.
    10. Directly set pdfbox to be compatible with lower version JDK, and there will be no warning prompts even when run in IDEA.
    11. Removed non-essential toolkits like Guava and Hutool to reduce code volume.
    12. Asynchronous loading of Office components speeds up application launch to within 5 seconds.
    13. Reasonable settings of the number of threads in the preview consumption queue.
    14. Fixed the bug where files in compressed packages failed to preview again.
    15. Fixed the bug in image preview.

    May 20th 2020 :

    1. Support for global watermark and dynamic change of watermark content through parameters
    2. Support for CAD file Preview
    3. Add configuration item base.url, support using nginx reverse proxy and set context-path
    4. All configuration items can be read from environment variables, which is convenient for docker image deployment and large-scale use in cluster
    5. Support the configuration of TrustHost (only the file source from the trust site can be previewed), and protect the preview service from abuse
    6. Support configuration of customize cache cleanup time (cron expression)
    7. All recognizable plain text can be previewed directly without downloading, such as .md .java .py, etc
    8. Support configuration to limit PDF file download after conversion
    9. Optimize Maven packaging configuration to solve the problem of line break in .sh script
    10. Place all CDN dependencies on the front end locally for users without external network connection
    11. Comment Service on home page switched from Sohu ChangYan to gitalk
    12. Fixed preview exceptions that may be caused by special characters in the URL
    13. Fixed the addtask exception of the transformation file queue
    14. Fixed other known issues
    15. Official website build: https://kkview.cn
    16. Official docker image repository build: https://hub.docker.com/r/keking/kkfileview

    June 18th 2019 :

    1. Support automatic cleaning of cache and preview files
    2. Support http/https stream url file preview
    3. Support FTP url file preview
    4. Add Docker build

    April 8th 2019

    1. Cache and queue implementations abstract, providing JDK and REDIS implementations (REDIS becomes optional dependencies)
    2. Provides zip and tar.gz packages, and provides a one-click startup script

    January 17th 2018

    1. Refined the project directory, abstract file preview interface, Easy to extend more file extensions and depoly this project on your own
    2. Added English documentation (@幻幻Fate,@汝辉) contribution
    3. Support for more image file extensions
    4. Fixed the issue that image carousel in zip file will always start from the first

    January 12th 2018

    1. Support for multiple images preview
    2. Support for images rotation preview in rar/zip

    January 2nd 2018

    1. Fixed gibberish issue when preview a txt document caused by the file encoding problem
    2. Fixed the issue that some module dependencies can not be found
    3. Add a spring boot profile, and support for Multi-environment configuration
    4. Add pdf.js to preview the documents such as doc,etc.,support for generating doc headlines as pdf menu,support for mobile preview

    Sponsor Us

    If this project has been helpful to you, we welcome your sponsorship. Your support is our greatest motivation.!