Skip to content

joehewett/pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Reader

A super lightweight, simple Go library which enables reading PDF files.

This repository is the maintained fork of:

Install:

go get -u github.com/joehewett/pdf

Read plain text

package main

import (
	"bytes"
	"fmt"

	"github.com/joehewett/pdf"
)

func main() {
	r, err := pdf.Open("test.pdf")
	if err != nil {
		panic(err)
	}

	var buf bytes.Buffer
	b, err := r.GetPlainText()
	if err != nil {
		panic(err)
	}

	buf.ReadFrom(b)

	fmt.Println(buf.String())

	return
}

About

A simple PDF library for Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 17

Languages