1. Products
  2.   Presentation
  3.   GO
  4.   Gotenberg Go client
 
  

Open Source Go Library for Converting Microsoft® PowerPoint Files

Convert Microsoft PowerPoint PPT and PPTX Presentations to PDF via Free GO API 

What is Gotenberg Go client?

Often times, GO developers are looking for open-source and free APIs to convert Microsoft Presentation to PDF file format. Gotenberg Go client is free GO library for developers to convert PPT and PPTX to PDF file format easily. The developers can easily integrate PPTX to PDF and PPT to PDF conversion feature inside their own application.

By default, a handful of fonts are installed and the API also support Asian characters. In order to get any specific fonts in the output PDF document, you will have to install your own fonts.

Previous Next

Getting Started with Gotenberg Go client

The recommended way to install the Gotenberg Go client into your project is by using Github. Please use the following command for a smooth installation.

Install Gotenberg Go client via GitHub

$ go get -u github.com/thecodingmachine/gotenberg-go-client/v7

Convert PPTX to PDF via Free Go API

The open-source library Gotenberg Go client allows converting one or more Microsoft Presentation file formats to PDF file format in a single function. The API uses, gotenberg.NewOfficeRequest() method to load a new file and accepts filename and file path as parameters. In order to convert you PowerPoint file to PDF, you can load one or more file and convert it to PDF easily. The following code snippet demonstrates, how you can convert PPTX to PDF in GO

Convert PowerPoint to PDF in GO

  1. Load two PPTx files using NewDocumentFromPath() method and pass filename and file path as parameters
  2. Convert both files to PDF using gotenberg.NewOfficeRequest() method and pass doc objects
  3. Save PDF document

Convert PPTX to PDF via Free GO API

c := &gotenberg.Client{Hostname: "http://localhost:3000"}
  doc, _ := gotenberg.NewDocumentFromPath("document.pptx", "/path/to/file")
  doc2, _ := gotenberg.NewDocumentFromPath("document2.pptx", "/path/to/file")
  req := gotenberg.NewOfficeRequest(doc, doc2)
  dest := "fileformat.pdf"
  c.Store(req, dest)
 English