pdfengine

package
v8.30.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package pdfengine implements gotenberg.PdfEngine using LibreOffice via the UNO API. Converts PDFs to specific PDF formats.

Index

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 *slog.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) EmbedFiles added in v8.25.0

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

EmbedFiles is not available in this implementation.

func (*LibreOfficePdfEngine) Encrypt added in v8.23.1

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

Encrypt is not available in this implementation.

func (*LibreOfficePdfEngine) Flatten added in v8.16.0

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

Flatten is not available in this implementation.

func (*LibreOfficePdfEngine) Merge

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

Merge is not available in this implementation.

func (*LibreOfficePdfEngine) PageCount added in v8.28.0

func (engine *LibreOfficePdfEngine) PageCount(ctx context.Context, logger *slog.Logger, inputPath string) (int, error)

PageCount is not available in this implementation.

func (*LibreOfficePdfEngine) Provision

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

Provision sets the module properties.

func (*LibreOfficePdfEngine) ReadBookmarks added in v8.28.0

func (engine *LibreOfficePdfEngine) ReadBookmarks(ctx context.Context, logger *slog.Logger, inputPath string) ([]gotenberg.Bookmark, error)

ReadBookmarks is not available in this implementation.

func (*LibreOfficePdfEngine) ReadMetadata added in v8.3.0

func (engine *LibreOfficePdfEngine) ReadMetadata(ctx context.Context, logger *slog.Logger, inputPath string) (map[string]any, error)

ReadMetadata is not available in this implementation.

func (*LibreOfficePdfEngine) Rotate added in v8.28.0

func (engine *LibreOfficePdfEngine) Rotate(ctx context.Context, logger *slog.Logger, inputPath string, angle int, pages string) error

Rotate is not available in this implementation.

func (*LibreOfficePdfEngine) Split added in v8.15.0

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

Split is not available in this implementation.

func (*LibreOfficePdfEngine) Stamp added in v8.28.0

func (engine *LibreOfficePdfEngine) Stamp(ctx context.Context, logger *slog.Logger, inputPath string, stamp gotenberg.Stamp) error

Stamp is not available in this implementation.

func (*LibreOfficePdfEngine) Watermark added in v8.28.0

func (engine *LibreOfficePdfEngine) Watermark(ctx context.Context, logger *slog.Logger, inputPath string, stamp gotenberg.Stamp) error

Watermark is not available in this implementation.

func (*LibreOfficePdfEngine) WriteBookmarks added in v8.28.0

func (engine *LibreOfficePdfEngine) WriteBookmarks(ctx context.Context, logger *slog.Logger, inputPath string, bookmarks []gotenberg.Bookmark) error

WriteBookmarks is not available in this implementation.

func (*LibreOfficePdfEngine) WriteMetadata added in v8.3.0

func (engine *LibreOfficePdfEngine) WriteMetadata(ctx context.Context, logger *slog.Logger, metadata map[string]any, 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