Versions in this module Expand all Collapse all v0 v0.1.0 Dec 2, 2026 Changes in this version + const Blitz + const Chromium + const DefaultJPEGQuality + const DefaultResourceTimeout + const DefaultViewportHeight + const DefaultViewportWidth + const EngineFailed + const EngineIdle + const EngineReady + const EngineStarting + const JPEG + const PNG + const Version + var ErrClosed = errors.New("renderer is closed") + func AssetsFromFS(files fs.FS) (map[string][]byte, error) + func MarkdownToHTML(source string) (string, error) + type Config struct + DefaultEngine EngineName + Engines map[EngineName]EngineConfig + type Engine interface + Close func() error + Render func(context.Context, Page) (image.Image, error) + type EngineConfig struct + Concurrency int + New func() (Engine, error) + type EngineName string + type EngineState string + type EngineStatus struct + Concurrency int + Error string + State EngineState + type Format string + func (f Format) MediaType() string + type InputError struct + Cause error + func (e *InputError) Error() string + func (e *InputError) Unwrap() error + type Options struct + Clip *Rect + DeviceScaleFactor float64 + Format Format + JPEGQuality int + ResourceTimeout time.Duration + Selector string + Transparent bool + ViewportHeight int + ViewportOnly bool + ViewportWidth int + func (o *Options) UnmarshalJSON(data []byte) error + func (o Options) MarshalJSON() ([]byte, error) + type Page struct + BaseURL string + HTML string + Options Options + type Rect struct + Height float64 + Width float64 + X float64 + Y float64 + type Renderer struct + func New(config Config) (*Renderer, error) + func (r *Renderer) Close() error + func (r *Renderer) Render(ctx context.Context, request Request) (result Result, returnErr error) + func (r *Renderer) Status() map[EngineName]EngineStatus + func (r *Renderer) Warmup(name EngineName) error + type Request struct + Assets map[string][]byte + BaseURL string + Engine EngineName + HTML string + Markdown string + Options Options + type Result struct + Duration time.Duration + Engine EngineName + Height int + ImageBytes []byte + MediaType string + Width int