pdf

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPopplerVersion

func CheckPopplerVersion() error

CheckPopplerVersion checks if the installed version of poppler is compatible

Types

type Page

type Page struct {
	Content string
	Number  int
}

func Extract

func Extract(pdfBytes []byte) (pdfPages []Page, err error)

Extract PDF text content in simplified format

func ExtractOrError

func ExtractOrError(pdfBytes []byte) (pages []Page, err error)

ExtractOrError Just like Extract, but indicates issues with errors

type PopplerTsvRow

type PopplerTsvRow struct {
	Level    int     `col:"0"`
	PageNum  int     `col:"1"`
	ParNum   int     `col:"2"`
	BlockNum int     `col:"3"`
	LineNum  int     `col:"4"`
	WordNum  int     `col:"5"`
	Left     float64 `col:"6"`
	Top      float64 `col:"7"`
	Width    float64 `col:"8"`
	Height   float64 `col:"9"`
	Conf     int     `col:"10"`
	Text     string  `col:"11"`
}

func ExtractInPopplerTsv

func ExtractInPopplerTsv(pdfBytes []byte) (tsvRows []PopplerTsvRow, err error)

ExtractInPopplerTsv Access raw stdout content from Poppler

Jump to

Keyboard shortcuts

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