repositorypackage
0.0.0-20250101024338-ade83bc30b59
Repository: https://github.com/emre-guler/topdf.git
Documentation: pkg.go.dev
# README
to-pdf
A simple web service that converts Microsoft Word documents (.doc, .docx) to PDF format using LibreOffice.
Features
- Web-based interface for file upload
- Supports .doc and .docx file formats
- Automatic conversion to PDF
- Direct download of converted files
Prerequisites
Before running this application, make sure you have the following installed:
- Go (1.16 or later)
- LibreOffice (for document conversion)
Installation
- 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
Usage
- 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
Configuration
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
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.