pdfcpu

package
v8.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package pdfcpu provides an implementation of the gotenberg.PdfEngine interface using the pdfcpu command-line tool. This package allows for:

1. The merging of PDF files. 2. The splitting of PDF files.

See: https://github.com/pdfcpu/pdfcpu.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PdfCpu

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

PdfCpu abstracts the CLI tool pdfcpu and implements the gotenberg.PdfEngine interface.

func (*PdfCpu) Convert

func (engine *PdfCpu) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, inputPath, outputPath string) error

Convert is not available in this implementation.

func (*PdfCpu) Debug added in v8.17.0

func (engine *PdfCpu) Debug() map[string]interface{}

Debug returns additional debug data.

func (*PdfCpu) Descriptor

func (engine *PdfCpu) Descriptor() gotenberg.ModuleDescriptor

Descriptor returns a PdfCpu's module descriptor.

func (*PdfCpu) Flatten added in v8.16.0

func (engine *PdfCpu) Flatten(ctx context.Context, logger *zap.Logger, inputPath string) error

Flatten is not available in this implementation.

func (*PdfCpu) Merge

func (engine *PdfCpu) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, outputPath string) error

Merge combines multiple PDFs into a single PDF.

func (*PdfCpu) Provision

func (engine *PdfCpu) Provision(ctx *gotenberg.Context) error

Provision sets the engine properties.

func (*PdfCpu) ReadMetadata added in v8.3.0

func (engine *PdfCpu) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)

ReadMetadata is not available in this implementation.

func (*PdfCpu) Split added in v8.15.0

func (engine *PdfCpu) Split(ctx context.Context, logger *zap.Logger, mode gotenberg.SplitMode, inputPath, outputDirPath string) ([]string, error)

Split splits a given PDF file.

func (*PdfCpu) Validate added in v8.12.0

func (engine *PdfCpu) Validate() error

Validate validates the module properties.

func (*PdfCpu) WriteMetadata added in v8.3.0

func (engine *PdfCpu) WriteMetadata(ctx context.Context, logger *zap.Logger, metadata map[string]interface{}, inputPath string) error

WriteMetadata is not available in this implementation.

Jump to

Keyboard shortcuts

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