Documentation
¶
Index ¶
- type Engine
- type PDFCPUEngine
- func (e *PDFCPUEngine) Merge(ctx context.Context, inputFiles []string, outputFile string, divider bool) error
- func (e *PDFCPUEngine) PageCount(ctx context.Context, path string) (int, error)
- func (e *PDFCPUEngine) Trim(ctx context.Context, inputFile string, outputFile string, pageRanges []string) error
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)
Click to show internal directories.
Click to hide internal directories.