Documentation ¶
Overview ¶
Package exiftool provides an implementation of the gotenberg.PdfEngine interface using the ExifTool command-line tool. This package allows for:
1. The reading of metadata. 2. The writing of metadata.
The path to the exiftool binary must be specified using the EXIFTOOL_BIN_PATH environment variable.
See: https://exiftool.org.
Index ¶
- type ExifTool
- func (engine *ExifTool) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, ...) error
- func (engine *ExifTool) Descriptor() gotenberg.ModuleDescriptor
- func (engine *ExifTool) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, ...) error
- func (engine *ExifTool) Provision(ctx *gotenberg.Context) error
- func (engine *ExifTool) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)
- func (engine *ExifTool) Validate() error
- func (engine *ExifTool) 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 ExifTool ¶
type ExifTool struct {
// contains filtered or unexported fields
}
ExifTool abstracts the CLI tool ExifTool and implements the gotenberg.PdfEngine interface.
func (*ExifTool) Convert ¶
func (engine *ExifTool) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, inputPath, outputPath string) error
Convert is not available in this implementation.
func (*ExifTool) Descriptor ¶
func (engine *ExifTool) Descriptor() gotenberg.ModuleDescriptor
Descriptor returns ExifTool's module descriptor.
func (*ExifTool) Merge ¶
func (engine *ExifTool) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, outputPath string) error
Merge is not available in this implementation.
func (*ExifTool) ReadMetadata ¶
func (engine *ExifTool) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)
ReadMetadata extracts the metadata of a given PDF file.
Click to show internal directories.
Click to hide internal directories.