Skip to content

A simple web service that converts Microsoft Word documents (.doc, .docx) to PDF format using LibreOffice.

License

Notifications You must be signed in to change notification settings

emre-guler/to-pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple web service that converts Microsoft Word documents (.doc, .docx) to PDF format using LibreOffice.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages