processor

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chunk

func Chunk(c ChunkConfig) error

Chunk executes the PDF splitting process

func CombinePDFs

func CombinePDFs(c CombineConfig) error

CombinePDFs merges multiple PDFs into one

func CompressPDF

func CompressPDF(c CompressConfig) error

CompressPDF executes the standalone PDF compression process without splitting

func Extract

func Extract(c ExtractConfig) error

Extract executes the PDF extraction process (Range Mode)

func Remove added in v1.3.0

func Remove(c RemoveConfig) error

Remove executes the PDF page removal process

Types

type ChunkConfig

type ChunkConfig struct {
	Input       io.ReadSeeker
	PageSize    int
	Password    string
	Compress    bool
	Quality     int
	Concurrency int
	Scale       int

	// Callbacks
	CreateWriter func(chunkIndex int, maxDigits int) (io.WriteCloser, error)
	OnProgress   func(current, total int)
	OnLog        func(msg string)
}

ChunkConfig holds the application configuration for splitting

type CombineConfig

type CombineConfig struct {
	Inputs      []io.ReadSeeker
	Password    string
	Compress    bool
	Quality     int
	Concurrency int
	Scale       int

	// Callbacks
	CreateWriter func() (io.WriteCloser, error)
	OnProgress   func(current, total int)
	OnLog        func(msg string)
}

CombineConfig holds the configuration for merging PDFs

type CompressConfig

type CompressConfig struct {
	Input       io.ReadSeeker
	Password    string
	Quality     int
	Concurrency int
	Scale       int

	// Callbacks
	CreateWriter func() (io.WriteCloser, error)
	OnProgress   func(current, total int)
	OnLog        func(msg string)
}

CompressConfig holds the configuration for standalone compression

type ExtractConfig

type ExtractConfig struct {
	Input       io.ReadSeeker
	From        int
	To          int
	Password    string
	Concurrency int
	Scale       int

	// Callbacks
	Output     io.Writer
	OnProgress func(current, total int)
	OnLog      func(msg string)
}

ExtractConfig holds the configuration for extraction

type RemoveConfig added in v1.3.0

type RemoveConfig struct {
	Input    io.ReadSeeker
	Pages    []int
	Password string

	// Callbacks
	Output     io.Writer
	OnProgress func(current, total int)
	OnLog      func(msg string)
}

RemoveConfig holds the configuration for page removal

Jump to

Keyboard shortcuts

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