options

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CellCommentsNone primitives.CellCommentsType
	CellCommentsAsDisplayed
	CellCommentsAtEnd
)

List of all possible values for CellCommentsType

View Source
const (
	OrientationDefault primitives.OrientationType
	OrientationPortrait
	OrientationLandscape
)

List of all possible values for OrientationType

View Source
const (
	PageOrderDownThenOver primitives.PageOrderType
	PageOrderOverThenDown
)

List of all possible values for PageOrderType

View Source
const (
	PrintErrorDisplayed primitives.PrintErrorType
	PrintErrorBlank
	PrintErrorDash
	PrintErrorNA
)

List of all possible values for PrintErrorType

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	PaperSize          *int
	Scale              *int
	FirstPageNumber    *int
	FitToWidth         *int
	FitToHeight        *int
	PageOrder          primitives.PageOrderType
	Orientation        primitives.OrientationType
	UsePrinterDefaults *bool
	BlackAndWhite      bool
	Draft              bool
	CellComments       primitives.CellCommentsType
	UseFirstPageNumber bool
	Errors             primitives.PrintErrorType
	HorizontalDpi      *int
	VerticalDpi        *int
	Copies             *int
}

Info hold advanced settings of sheet. N.B.: You should NOT mutate any value directly.

func New

func New(settings ...Option) *Info

New create and returns option set for sheet

func (*Info) Set

func (i *Info) Set(settings ...Option)

Set sets new options for option set

type Option

type Option func(co *Info)

Option is helper type to set options for sheet

func BlackAndWhite

func BlackAndWhite(blackAndWhite bool) Option

BlackAndWhite sets flag indicating to print black and white.

func CellComments

func CellComments(cellComments primitives.CellCommentsType) Option

CellComments specifies how to print cell comments.

func Copies

func Copies(copies int) Option

Copies sets a number of copies to print.

func Draft

func Draft(draft bool) Option

Draft sets flag indicating to print without graphics.

func Errors

func Errors(errors primitives.PrintErrorType) Option

Errors specifies how to print cell values for cells with errors.

func FirstPageNumber

func FirstPageNumber(firstPageNumber int) Option

FirstPageNumber sets a page number for first printed page.

func FitToHeight

func FitToHeight(fitToHeight int) Option

FitToHeight sets a number of vertical pages to fit on.

func FitToWidth

func FitToWidth(fitToWidth int) Option

FitToWidth sets a number of horizontal pages to fit on.

func HorizontalDpi

func HorizontalDpi(horizontalDpi int) Option

HorizontalDpi sets a horizontal print resolution of the device.

func Orientation

func Orientation(orientation primitives.OrientationType) Option

Orientation sets an orientation of the page.

func PageOrder

func PageOrder(pageOrder primitives.PageOrderType) Option

PageOrder sets a order of printed pages.

func PaperSize

func PaperSize(paperSize int) Option

PaperSize sets a paper size.

func Scale

func Scale(scale int) Option

Scale sets a print scaling

func UseFirstPageNumber

func UseFirstPageNumber(useFirstPageNumber bool) Option

UseFirstPageNumber sets flag indicating to use firstPageNumber value for first page number,

func UsePrinterDefaults

func UsePrinterDefaults(usePrinterDefaults bool) Option

UsePrinterDefaults sets flag indicating to use the printer’s defaults settings for page setup values

func VerticalDpi

func VerticalDpi(verticalDpi int) Option

VerticalDpi sets a vertical print resolution of the device.

Jump to

Keyboard shortcuts

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