Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.17 KB

README.md

File metadata and controls

60 lines (40 loc) · 1.17 KB

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

  1. Clone this repository:
git clone https://github.com/emre-guler/to-pdf.git
cd to-pdf
  1. Install dependencies:
go mod download
  1. Create a directory for file uploads:
mkdir files

Usage

  1. Start the server:
go run main.go
  1. Open your web browser and navigate to http://localhost:9091

  2. Upload a Word document through the web interface

  3. 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.