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:
- Supports Office documents such as
doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, , dotm, xlt, xltm, dot, xlam, dotx, xla, ,pages ,pptm etc.
- Supports domestic WPS Office documents such as
wps, dps, et , ett, wpt.
- Supports OpenOffice, LibreOffice office documents such as
odt, ods, ots, odp, otp, six, ott, fodt and fods.
- Supports Visio flowchart files such as
vsd, vsdx.
- Supports Windows system image files such as
wmf, emf.
- Supports Photoshop software model files such as
psd ,eps.
- Supports document formats like
pdf, ofd, and rtf.
- Supports software model files like
xmind.
- Support for
bpmn workflow files.
- Support for
eml , msg mail files
- Support for
epub book documents
- Supports 3D model files like
obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim, etc.
- Supports CAD model files such as
dwg, dxf, dwf iges , igs, dwt , dng , ifc , dwfx , stl , cf2 , plt, etc.
- Supports all plain text files such as
txt, xml (rendering), md (rendering), java, php, py, js, css, etc.
- Supports compressed packages such as
zip, rar, jar, tar, gzip, 7z, etc.
- Supports image previewing (flip, zoom, mirror) of
jpg, jpeg, png, gif, bmp, ico, jfif, webp, heic, ,heif etc.
- Supports image information model files such as
tif and tiff.
- Supports image format files such as
tga.
- Supports vector image format files such as
svg.
- Supports
mp3,wav,mp4,flv .
- Supports many audio and video format files such as
avi, mov, wmv, mkv, 3gp, and rm.
- Supports for
dcm .
- 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)
First step:git pull https://github.com/kekingcn/kkFileView.git
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.2 (August 14, 2026)
Security Fixes
- 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
- 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
- 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
Version 5.0.1 (July 13, 2026)
Security Fixes
- 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
- Fixed PDF cross-origin access, page positioning, text highlighting, printing, and print watermark issues
- Fixed PDF absolute paths behind reverse proxies and 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
- 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
- All users running v5.0.0 or earlier are strongly encouraged to upgrade to v5.0.1
- JDK 21 or higher remains required, and existing v5.0.0 configuration can be reused
Version 5.0.0 (April 14, 2026)
Improvements
- Enhanced xlsx front-end parsing - Improved Excel file front-end rendering performance
- Optimized image parsing - Enhanced image processing mechanism
- Improved tif parsing - Enhanced TIF format support
- Enhanced svg parsing - Optimized SVG vector image rendering
- Improved json parsing - Enhanced JSON file processing
- Optimized ftp multi-client access - Improved FTP service compatibility
- Enhanced home page directory access - Implemented post server-side pagination mechanism
- Improved marked parsing - Enhanced Markdown rendering
- Redesigned archive preview into a single workspace with a collapsible tree and inline file preview
- Improved archive preview file-type badges and single-image preview styling
- Added an agent-focused repository guide for engineering automation and maintenance
- Refreshed the demo portal pages, including the index, integration guide, release record, and sponsor pages
New Features
- msg email parsing - Added support for msg format email file preview
- heic image parsing - Added support for HEIC format image preview
- Cross-domain methods - Added cross-domain processing mechanism
- Highlighting methods - Added text highlighting functionality
- Pagination methods - Added document page control
- AES encryption methods - Added AES encryption support
- Basic authentication methods - Added Basic authentication mechanism
- Key management methods - Added key management functionality
- Anti-duplicate conversion - Added duplicate file conversion protection
- Async waiting - Added asynchronous processing mechanism
- Upload restrictions - Added restrictions for unsupported file uploads
- cadviewer conversion methods - Added CAD viewer conversion functionality
Fixed Issues
- Compressed file path issues - Fixed internal path handling in compressed files
- Security issues - Fixed security vulnerabilities
- Incomplete image watermark issues - Fixed incomplete watermark display
- SSL self-signed certificate access issues - Fixed compatibility with self-signed certificates
- Fixed archive-contained Office files that could stay stuck on loading because repeated extraction appended to existing files
- Default Office preview now prefers PDF mode, and PDF preview opens with the thumbnail sidebar visible by default
- Updated startup scripts to discover the packaged jar dynamically instead of relying on stale hard-coded jar names
- Updated Docker and release helper docs to align with the 5.0.0 release line
- Fixed OFD table border overflow rendering issues
- Refined the PDF.js compatibility polyfill to avoid preview errors in compatibility environments
Updates
- JDK version requirement - Mandatory requirement for JDK 21 or higher
- pdf front-end parsing update - Upgraded PDF front-end rendering component
- odf front-end parsing update - Upgraded ODF document front-end rendering
- 3D model front-end parsing update - Upgraded 3D model viewer
- pdf backend async conversion optimization - Implemented multi-threaded asynchronous conversion
- tif backend async conversion optimization - Implemented multi-threaded asynchronous conversion
- Video backend async conversion optimization - Implemented multi-threaded asynchronous conversion
- CAD backend async conversion optimization - Implemented multi-threaded asynchronous conversion
- 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.
- 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
- xlsx printing support
- Added GZIP compression enablement in configuration
- CAD format now supports conversion to SVG and TIF formats, added timeout termination and thread management
- Added captcha verification for file deletion
- Added xbrl format preview support
- PDF preview added control over signatures, drawings, illustration control, search positioning pagination, and display content definition
- Added CSV format front-end parsing support
- Added Docker image support for ARM64
- Added Office preview conversion timeout property setting
- Added preview file host blacklist mechanism
Optimizations
- Optimized OFD mobile preview page adaptability
- Updated xlsx front-end parsing component to accelerate parsing speed
- Upgraded CAD component
- Office function adjustments, supporting comments, conversion page limit, watermark generation, etc.
- Upgraded markdown component
- Upgraded dcm parsing component
- Upgraded PDF.JS parsing component
- Changed video player plugin to ckplayer
- Smarter tif parsing, supporting modified image formats
- Improved character encoding detection accuracy for large and small text files, handling concurrency vulnerabilities
- Refactored file download code, added general file server authentication access design
- Updated bootstrap component and streamlined unnecessary files
- Updated epub version, optimized epub display effect
- Fixed issue where scheduled cache cleanup only deleted disk cache files for multimedia file types
- Auto-detection of installed Office components, added default paths for LibreOffice 7.5 & 7.6 versions
- Changed drawio default to preview mode
- Added PDF thread management, timeout manag