convert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToPdf

func ConvertToPdf(s *_d.Sheet) *_f.Creator

ConvertToPdf converts a sheet to a PDF file. This package is beta, breaking changes can take place.

func ConvertToPdfWithOptions

func ConvertToPdfWithOptions(s *_d.Sheet, opts *Options) *_f.Creator

ConvertToPdfWithOptions convert a sheet to PDF with given options.

func RegisterFont

func RegisterFont(name string, style FontStyle, font *_cd.PdfFont)

RegisterFont makes a PdfFont accessible for using in converting to PDF.

func RegisterFontsFromDirectory

func RegisterFontsFromDirectory(dirName string) error

RegisterFontsFromDirectory registers all fonts from the given directory automatically detecting font families and styles.

Types

type FontStyle

type FontStyle = _fb.FontStyle

FontStyle represents a kind of font styling. It can be FontStyle_Regular, FontStyle_Bold, FontStyle_Italic and FontStyle_BoldItalic.

const (
	FontStyle_Regular    FontStyle = 0
	FontStyle_Bold       FontStyle = 1
	FontStyle_Italic     FontStyle = 2
	FontStyle_BoldItalic FontStyle = 3
)

type Options

type Options struct {

	// DefaultPageSize is applied when there is no page size explicitly set in the document.
	// A4 is the default option.
	DefaultPageSize _fb.PageSize
}

Options contains the options for convert process

Jump to

Keyboard shortcuts

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