qpdf

package
v8.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

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

The path to the QPDF binary must be specified using the QPDK_BIN_PATH environment variable.

See: https://github.com/qpdf/qpdf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QPdf

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

QPdf abstracts the CLI tool QPDF and implements the gotenberg.PdfEngine interface.

func (*QPdf) Convert

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

Convert is not available in this implementation.

func (*QPdf) Debug added in v8.17.0

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

Debug returns additional debug data.

func (*QPdf) Descriptor

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

Descriptor returns a QPdf's module descriptor.

func (*QPdf) EmbedFiles added in v8.25.0

func (engine *QPdf) EmbedFiles(ctx context.Context, logger *zap.Logger, filePaths []string, inputPath string) error

EmbedFiles is not available in this implementation.

func (*QPdf) Encrypt added in v8.23.1

func (engine *QPdf) Encrypt(ctx context.Context, logger *zap.Logger, inputPath, userPassword, ownerPassword string) error

Encrypt adds password protection to a PDF file using QPDF.

func (*QPdf) Flatten added in v8.16.0

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

Flatten merges annotation appearances with page content, deleting the original annotations.

func (*QPdf) Merge

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

Merge combines multiple PDFs into a single PDF.

func (*QPdf) Provision

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

Provision sets the module properties.

func (*QPdf) ReadMetadata added in v8.3.0

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

ReadMetadata is not available in this implementation.

func (*QPdf) Split added in v8.15.0

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

Split splits a given PDF file.

func (*QPdf) Validate

func (engine *QPdf) Validate() error

Validate validates the module properties.

func (*QPdf) WriteMetadata added in v8.3.0

func (engine *QPdf) 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