Documentation ¶
Overview ¶
Package pdfengine provides a module which interacts with LibreOffice via the UNO (Universal Network Objects) API and implements the gotenberg.PdfEngine interface. This package allows for:
1. The conversion to specific PDF formats.
Index ¶
- type LibreOfficePdfEngine
- func (engine *LibreOfficePdfEngine) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, ...) error
- func (engine *LibreOfficePdfEngine) Descriptor() gotenberg.ModuleDescriptor
- func (engine *LibreOfficePdfEngine) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, ...) error
- func (engine *LibreOfficePdfEngine) Provision(ctx *gotenberg.Context) error
- func (engine *LibreOfficePdfEngine) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)
- func (engine *LibreOfficePdfEngine) 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 LibreOfficePdfEngine ¶
type LibreOfficePdfEngine struct {
// contains filtered or unexported fields
}
LibreOfficePdfEngine interacts with the LibreOffice (Universal Network Objects) API and implements the gotenberg.PdfEngine interface.
func (*LibreOfficePdfEngine) Convert ¶
func (engine *LibreOfficePdfEngine) Convert(ctx context.Context, logger *zap.Logger, formats gotenberg.PdfFormats, inputPath, outputPath string) error
Convert converts the given PDF to a specific PDF format. Currently, only the PDF/A-1b, PDF/A-2b, PDF/A-3b and PDF/UA formats are available. If another PDF format is requested, it returns a gotenberg.ErrPdfFormatNotSupported error.
func (*LibreOfficePdfEngine) Descriptor ¶
func (engine *LibreOfficePdfEngine) Descriptor() gotenberg.ModuleDescriptor
Descriptor returns a LibreOfficePdfEngine's module descriptor.
func (*LibreOfficePdfEngine) Merge ¶
func (engine *LibreOfficePdfEngine) Merge(ctx context.Context, logger *zap.Logger, inputPaths []string, outputPath string) error
Merge is not available in this implementation.
func (*LibreOfficePdfEngine) Provision ¶
func (engine *LibreOfficePdfEngine) Provision(ctx *gotenberg.Context) error
Provision sets the module properties.
func (*LibreOfficePdfEngine) ReadMetadata ¶ added in v8.3.0
func (engine *LibreOfficePdfEngine) ReadMetadata(ctx context.Context, logger *zap.Logger, inputPath string) (map[string]interface{}, error)
ReadMetadata is not available in this implementation.
func (*LibreOfficePdfEngine) WriteMetadata ¶ added in v8.3.0
func (engine *LibreOfficePdfEngine) WriteMetadata(ctx context.Context, logger *zap.Logger, metadata map[string]interface{}, inputPath string) error
WriteMetadata is not available in this implementation.