Skip to content

macro-inc/go-libreofficekit

 
 

Repository files navigation

go-libreofficekit

CGo bindings to LibreOfficeKit

Install

# Latest version of LibreOffice (5.2) is required
$ sudo add-apt-repository ppa:libreoffice/ppa
$ sudo apt-get update
$ sudo apt-get install libreoffice libreofficekit-dev
$ go get github.com/docsbox/go-libreofficekit

Update Bindings

go build libreofficekit.go

Usage

This example demonstrates how to convert Microsoft Office document to PDF

package main

import "github.com/dveselov/go-libreofficekit"

func main() {
    office, _ := libreofficekit.NewOffice("/path/to/libreoffice")

    document, _ := office.LoadDocument("kittens.docx")
    document.SaveAs("kittens.pdf", "pdf", "skipImages")

    document.Close()
    office.Close()
}

About

CGo bindings to LibreOfficeKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 93.0%
  • Go 6.2%
  • Dockerfile 0.8%