Sign inSign up

[Open Source] A JavaEE service that converts Office documents into PDF with excellent format compatibility

Open SourceStorage & Files
2026-06-28 08:42 10 views • 0 downloads 0KB
[Open Source] A JavaEE service that converts Office documents into PDF with excellent format compatibility

1. Project Overview

A JavaEE service that converts Office documents into PDF with excellent format compatibility.

2. Open Source License

Licensed under MIT

3. Screenshots

Image

4. Feature Overview

Simplicity

Simply provide a document URL, and the document format will be automatically detected based on its content.

Real-Time

Efficient, fast, and real-time preview with 0-millisecond response time for repeated requests

Cross-Platform

Uses HTML5 to display content and supports both PC and mobile devices.

Multiple Formats

Supports various document formats, including PDF, OFD, DOC/X, XLS/X, PPT/X, WPS, JPG, and MP4.

5. Tech Stack

Windows System

Server Configuration

Hardware Requirements

CPU: 2 cores

Memory: 4GB

Disk Space: 40GB

Operating System

64-bit Windows, Windows Server 2012 recommended

Note: The above specifications are for reference only and are not mandatory. Better hardware configurations can provide faster responses and higher concurrency.

Install Office (Optional)

Install Microsoft Office, WPS, or LibreOffice. Microsoft Office 2010 or WPS 2016 is recommended.

Linux System

Server Configuration

Hardware Requirements

CPU: 2 cores

Memory: 4GB

Disk Space: 40GB

Operating System

Linux, CentOS 7 recommended

Note: The above specifications are for reference only and are not mandatory. Better hardware configurations can provide faster responses and higher concurrency.

Install LibreOffice (Optional)

Install LibreOffice 7.3.5 or later

Installation and Deployment

  1. Install Microsoft Office 2010 or later

  2. Extract release/xoffice.zip and run startup.bat

URL Invocation

http://locahost:9090/xoffice?_xformat=*Document Format*&_file=*Document URL*&_watermark=*Watermark*

Document Formats: doc, docx, xls, xlsx, ppt, pptx

Document URL: An HTTP protocol address that must be UTF-8 encoded

Watermark: PDF watermark text

Example: http://locahost:9090/xoffice?_xformat=docx&_file=http%3A%2F%2Flocahost%3A9090%2Fxoffice%2Fdemo.docx&_watermark=https%3A%2F%2Fview.xdocin.com

XOfficeClient Invocation

public static void main(String[] args) {
  XOfficeClient xc = new XOfficeClient("http://localhost:9090");
  try {
    xc.setWatermark("https://view.xdocin.com");
    xc.to(new File("c:/tmp.docx"), new File("c:/tmp.pdf"));
  } catch (IOException e) {
    e.printStackTrace();
  }
}
Source: XDOC Document Preview Service Official Documentation
#1
资源直链https://gitee.com/xdoc/xoffice
Download