pdf

package
v0.0.0-...-f79cf23 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrGotenbergTimeout errs.Sentinel = "Gotenberg timeout"
)

Variables

This section is empty.

Functions

func RenderHTML

func RenderHTML(ctx context.Context, args *RenderHTMLArgs) (pdf []byte, err error)

func ToBase64Encoding

func ToBase64Encoding(file []byte) string

ToBase64Encoding encodes the file in base64 ready to be used in HTML tags.

Types

type ErrGotenbergInternal

type ErrGotenbergInternal string

func (ErrGotenbergInternal) Error

func (err ErrGotenbergInternal) Error() string

type RenderHTMLArgs

type RenderHTMLArgs struct {
	HeaderHTML []byte
	FooterHTML []byte
	IndexHTML  []byte

	MarginTop    float64
	MarginRight  float64
	MarginBottom float64
	MarginLeft   float64
}

Jump to

Keyboard shortcuts

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