Help us shape the future of Go! Take the 2026 Go Developer Survey

engine

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	PageCount(ctx context.Context, path string) (int, error)
	Trim(ctx context.Context, in string, out string, pages []string) error
	Merge(ctx context.Context, in []string, out string, divider bool) error
}

Engine defines the interface for PDF operations.

This is effectively a wrapper around the pdfcpu library, providing methods for counting pages, trimming PDFs, and merging PDFs.

This interface allows for different implementations of PDF engines, enabling flexibility in how PDF operations are performed.

type PDFCPUEngine

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

func NewPDFCPUEngine

func NewPDFCPUEngine() (*PDFCPUEngine, error)

func (*PDFCPUEngine) Merge

func (e *PDFCPUEngine) Merge(ctx context.Context, inputFiles []string, outputFile string, divider bool) error

func (*PDFCPUEngine) PageCount

func (e *PDFCPUEngine) PageCount(ctx context.Context, path string) (int, error)

func (*PDFCPUEngine) Trim

func (e *PDFCPUEngine) Trim(ctx context.Context, inputFile string, outputFile string, pageRanges []string) error

Jump to

Keyboard shortcuts

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