smartpdf

package
v0.0.0-...-1b76ffa Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FallbackOptions

type FallbackOptions struct {
	OnEmptyContent *bool `mapstructure:"onEmptyContent" json:"onEmptyContent,omitempty"`
	OnImageCount   int   `mapstructure:"onImageCount" json:"onImageCount,omitempty"`
	OnTable        *bool `mapstructure:"onTable" json:"onTable,omitempty"`
}

func (*FallbackOptions) SetDefaults

func (f *FallbackOptions) SetDefaults()

type SmartPDF

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

func NewSmartPDF

func NewSmartPDF(file io.Reader, cfg SmartPDFConfig) (*SmartPDF, error)

func (*SmartPDF) Load

func (s *SmartPDF) Load(ctx context.Context) ([]vs.Document, error)

func (*SmartPDF) Name

func (s *SmartPDF) Name() string

type SmartPDFConfig

type SmartPDFConfig struct {
	MuPDF           mupdf.PDFOptions `mapstructure:"muPDF" json:"muPDF"`
	OpenAIOCR       openai.OpenAIOCR `mapstructure:"openAIOCR" json:"openAIOCR"`
	FallbackOptions FallbackOptions  `mapstructure:"fallbackOptions" json:"fallbackOptions"`
}

Jump to

Keyboard shortcuts

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