chromium

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package chromium exports immutable Margo HTML through an explicitly selected installed Chromium-family executable. It never downloads a browser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ExecutablePath string
	Timeout        time.Duration
}

Config binds the engine to one already-installed browser executable.

type Engine

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

Engine is an explicitly configured Chromium PDF renderer.

func New

func New(config Config) (*Engine, error)

New validates the executable identity without launching or downloading it.

func (*Engine) Export

func (engine *Engine) Export(ctx context.Context, request pdf.Request) (pdf.Result, error)

Export launches only the selected executable, waits for document resources, and prints the fully loaded page. A render failure is terminal: callers must not silently fall back to another engine.

func (*Engine) Name

func (*Engine) Name() string

func (*Engine) Version

func (engine *Engine) Version(ctx context.Context) (string, error)

Version reports the selected executable's own version string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL