pdf

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser implements a high-quality PDF document parser using ledongthuc/pdf.

func DefaultParser added in v1.1.3

func DefaultParser() *Parser

DefaultParser creates a new PDF parser instance.

func (*Parser) GetSupportedTypes

func (p *Parser) GetSupportedTypes() []string

GetSupportedTypes returns the file extensions this parser supports.

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, content []byte, metadata map[string]any) (*core.Document, error)

Parse is the legacy non-streaming interface wrapper.

func (*Parser) ParseStream

func (p *Parser) ParseStream(ctx context.Context, r io.Reader, metadata map[string]any) (<-chan *core.Document, error)

ParseStream reads from an io.Reader (which must be seekable or fully read) and streams Document objects representing pages or logical sections.

func (*Parser) Supports

func (p *Parser) Supports(contentType string) bool

Jump to

Keyboard shortcuts

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