gopdf

package module
v0.0.0-...-a40c339 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2019 License: MIT Imports: 7 Imported by: 0

README

GoPDF

Golang package for reading and extracting text from a pdf.

Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	File io.ReaderAt
	Size int64

	Content  string
	Font     string
	FontSize float64
	// contains filtered or unexported fields
}

File struct for data and receivers

func OpenFileHTTP

func OpenFileHTTP(f *multipart.FileHeader) (*File, error)

OpenFileHTTP func accepts *multipart.FileHeader and exposes multipart.File

func OpenLocal

func OpenLocal(filePath string) (*File, error)

OpenLocal func

type PDF

type PDF struct {
	// Scalar value types
	Integer    int64
	Boolean    bool
	RealNumber float64
	Name       string // i.e. '/text'
	String     string // in the file as either '(...characters...)' or '<...hexadecimal character codes...>'
	// Container (Object) types
	Dictionary struct{}            // in the file as '<<...other objects...>>. These are always in pairs, a Name Obj followed by any other object type.
	Array      []struct{}          // a list of un-delimited objects separated by white space only where necessary
	Stream     map[struct{}]string // This is the most complex type. It's actually a Dictionary Obj mated with a string a bytes
}

PDF struct for internal type reference.

type PdfReader

type PdfReader struct {
	File string

	StartXref int
	Xref      map[int]int
	Trailer   map[string][]byte
	// contains filtered or unexported fields
}

PdfReader struct

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader struct

type ReaderI

type ReaderI interface {
	ReadAt(buf []byte, pos int64) (n int, err error)
	Read(buf []byte) (n int, err error)
	Slice(n int) []byte
	Seek(off int, whence int) (ret int64, err error)
	ReadByte() (c byte, err error)
	UnreadByte() error
	Size() int64
}

ReaderI Interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL