converter

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Image

func Image(input interface{}, opts ...Option) error

Image 渲染OFD文档

func PDF

func PDF(input interface{}, output io.Writer, opts ...interface{}) error

Types

type Converter

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

Converter 配置转换器

type Option

type Option func(*Converter)

Option 配置选项类型

func BgColor

func BgColor(bg color.Color) Option

BgColor 设置背景颜色

func DPI

func DPI(dpi float64) Option

DPI 设置DPI

func ImageWriter

func ImageWriter(f func(page int, img image.Image) error) Option

ImageWriter 设置图像写入器

func JPG

func JPG() Option

JPG 设置为JPEG格式

func PNG

func PNG() Option

PNG 设置为PNG格式

func Page

func Page(page int) Option

Page 设置特定页码

func Thumbnail

func Thumbnail(s int) Option

Thumbnail 设置缩略图大小

func Writer

func Writer(f func(page int) (io.WriteCloser, error)) Option

Writer 设置文件写入器

Jump to

Keyboard shortcuts

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