A simple web service that converts Microsoft Word documents (.doc, .docx) to PDF format using LibreOffice.
- Web-based interface for file upload
- Supports .doc and .docx file formats
- Automatic conversion to PDF
- Direct download of converted files
Before running this application, make sure you have the following installed:
- Go (1.16 or later)
- LibreOffice (for document conversion)
- Clone this repository:
git clone https://github.com/emre-guler/to-pdf.git
cd to-pdf
- Install dependencies:
go mod download
- Create a directory for file uploads:
mkdir files
- Start the server:
go run main.go
-
Open your web browser and navigate to
http://localhost:9091
-
Upload a Word document through the web interface
-
The converted PDF will be automatically downloaded
The application uses the following default settings:
- Port: 9091 (can be changed using the PORT environment variable)
- Upload folder:
./files
- Supported file extensions: .doc, .docx
Contributions are welcome! Please feel free to submit a Pull Request.