rendering

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package rendering provides a function to render HTML to images. It uses the Chrome Debug Protocol through the rod package. It will download a headless Chrome version if needed that matches the current platform.

If the environment variable SND_DEBUG=1 it will start the chrome instances in non-headless mode.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderHTML

func RenderHTML(html string, width int) (image.Image, error)

RenderHTML renders the element #content into an image.

func RenderURL added in v0.4.1

func RenderURL(url string, width int) (image.Image, error)

RenderURL opens the URL and renders the element #content into an image.

Types

This section is empty.

Jump to

Keyboard shortcuts

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