xbmlz / uniconv

Using LibreOffice as a server for converting documents.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uniconv

Build Status Coverage Status Go Report Card Go Doc Code Size Release

Using LibreOffice as a server for converting documents.

Requirements

Installation

go get -u github.com/xbmlz/uniconv

Usage

package main

import (
    "fmt"
    "github.com/xbmlz/uniconv"
)

func main() {
    // create a new processor, the default port is 2002
    p := uniconv.NewProcessor()
    
    // Start an office process and connect to the started instance (on port 2002).
    p.Start()
    defer p.Stop()
    

    // Convert
    c := uniconv.NewConverter()
    c.Convert("input.docx", "output.pdf")
}

About

Using LibreOffice as a server for converting documents.

License:MIT License


Languages

Language:Go 100.0%