pdf

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

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

Page represents a PDF page

func (Page) GetPlainText

func (p Page) GetPlainText() (string, error)

GetPlainText extracts plain text from the page

type Reader

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

Reader represents a PDF file reader. Provides methods to extract text and get page information.

func Open

func Open(filename string) (*os.File, *Reader, error)

Open opens a PDF file and returns a Reader. Returns the file handle (must be closed by caller), a Reader, and any error.

func (*Reader) GetPlainText

func (r *Reader) GetPlainText() (io.Reader, error)

GetPlainText extracts all text from the PDF and returns it as an io.Reader.

func (*Reader) NumPage

func (r *Reader) NumPage() int

NumPage returns the number of pages in the PDF.

func (*Reader) Page

func (r *Reader) Page(num int) Page

Page returns a page by number (1-indexed)

Jump to

Keyboard shortcuts

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