consts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package consts groups the small enumeration types used across Paper: alignment, orientation, line styles, break-line strategies, font families, barcode types, generation modes, and provider types. Larger constant domains (border, pagesize, fontstyle, extension, protection) keep their own subpackages.

Index

Constants

View Source
const (
	// FontFamilyArial represents the arial font family.
	FontFamilyArial string = "arial"
	// FontFamilyHelvetica represents the helvetica font family.
	FontFamilyHelvetica string = "helvetica"
	// FontFamilySymbol represents the symbol font family.
	FontFamilySymbol string = "symbol"
	// FontFamilyZapBats represents the zapfdingbats font family.
	FontFamilyZapBats string = "zapfdingbats"
	// FontFamilyCourier represents the courier font family.
	FontFamilyCourier string = "courier"
)

Built-in font families available without registering custom fonts.

View Source
const DefaultLineThickness float64 = 0.2

DefaultLineThickness is the default thickness, in mm, applied to lines and borders when no explicit thickness is set.

Variables

This section is empty.

Functions

This section is empty.

Types

type Align

type Align string

Align is the representation of a horizontal or vertical alignment.

const (
	// AlignLeft represents a left horizontal alignment.
	AlignLeft Align = "L"
	// AlignRight represents a right horizontal alignment.
	AlignRight Align = "R"
	// AlignCenter represents a center horizontal/vertical alignment.
	AlignCenter Align = "C"
	// AlignTop represents a top vertical alignment.
	AlignTop Align = "T"
	// AlignBottom represents a bottom vertical alignment.
	AlignBottom Align = "B"
	// AlignMiddle represents a middle vertical alignment.
	AlignMiddle Align = "M"
	// AlignJustify represents a horizontal alignment that distributes
	// extra space between words so both edges of the column are flush.
	AlignJustify Align = "J"
)

type BarcodeType

type BarcodeType string

BarcodeType is the representation of a barcode symbology.

const (
	// BarcodeCode128 represents the Code 128 symbology.
	BarcodeCode128 BarcodeType = "code128"
	// BarcodeEAN represents the EAN symbology.
	BarcodeEAN BarcodeType = "ean"
)

type BreakLineStrategy

type BreakLineStrategy string

BreakLineStrategy is the representation of a text line-breaking strategy.

const (
	// BreakLineEmptySpace breaks lines on word boundaries (empty spaces).
	BreakLineEmptySpace BreakLineStrategy = "empty_space_strategy"
	// BreakLineDash breaks lines mid-word, appending a dash at the break.
	BreakLineDash BreakLineStrategy = "dash_strategy"
)

type GenerationMode

type GenerationMode string

GenerationMode is the representation of a document generation mode.

const (
	// GenerationSequential renders pages one at a time on a single goroutine.
	GenerationSequential GenerationMode = "sequential"
	// GenerationConcurrent renders page chunks in parallel worker goroutines
	// and merges the resulting documents.
	GenerationConcurrent GenerationMode = "concurrent"
	// GenerationSequentialLowMemory renders page chunks sequentially,
	// releasing memory between chunks, and merges the resulting documents.
	GenerationSequentialLowMemory GenerationMode = "sequential_low_memory"
)

type LineStyle

type LineStyle string

LineStyle is the representation of a line style.

const (
	// LineStyleSolid represents a continuous line.
	LineStyleSolid LineStyle = "solid"
	// LineStyleDashed represents a dashed line.
	LineStyleDashed LineStyle = "dashed"
	// LineStyleDotted represents a dotted line.
	LineStyleDotted LineStyle = "dotted"
)

type Orientation

type Orientation string

Orientation is the representation of a page orientation.

const (
	// OrientationVertical represents the portrait page orientation.
	OrientationVertical Orientation = "vertical"
	// OrientationHorizontal represents the landscape page orientation.
	OrientationHorizontal Orientation = "horizontal"
)

type ProviderType

type ProviderType string

ProviderType is the representation of a document rendering provider.

const ProviderPaper ProviderType = "paper"

ProviderPaper is the built-in PDF rendering provider.

Directories

Path Synopsis
Package border contains all border types.
Package border contains all border types.
Package extension contains all image extensions.
Package extension contains all image extensions.
Package fontstyle contains all default font styles.
Package fontstyle contains all default font styles.
Package pagesize contains all default page sizes.
Package pagesize contains all default page sizes.
Package protection contains all protection types.
Package protection contains all protection types.

Jump to

Keyboard shortcuts

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