Documentation ¶
Overview ¶
Package pdftk provides an implementation of the gotenberg.PdfEngine interface using the PDFtk command-line tool. This package allows for:
1. The merging of PDF files.
The path to the PDFtk binary must be specified using the PDFTK_BIN_PATH environment variable.
Index ¶
- type PdfTk
- func (engine *PdfTk) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, ...) error
- func (engine *PdfTk) Descriptor() gotenberg.ModuleDescriptor
- func (engine *PdfTk) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, ...) error
- func (engine *PdfTk) Provision(ctx *gotenberg.Context) error
- func (engine *PdfTk) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)
- func (engine *PdfTk) Validate() error
- func (engine *PdfTk) WriteMetadata(ctx context.Context, logger *zap.Logger, metadata map[string]interface{}, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PdfTk ¶
type PdfTk struct {
// contains filtered or unexported fields
}
PdfTk abstracts the CLI tool PDFtk and implements the gotenberg.PdfEngine interface.
func (*PdfTk) Convert ¶
func (engine *PdfTk) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, inputPath, outputPath string) error
Convert is not available in this implementation.
func (*PdfTk) Descriptor ¶
func (engine *PdfTk) Descriptor() gotenberg.ModuleDescriptor
Descriptor returns a PdfTk's module descriptor.
func (*PdfTk) Merge ¶
func (engine *PdfTk) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, outputPath string) error
Merge combines multiple PDFs into a single PDF.
func (*PdfTk) ReadMetadata ¶ added in v8.3.0
func (engine *PdfTk) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)
ReadMetadata is not available in this implementation.
Click to show internal directories.
Click to hide internal directories.