Versions in this module Expand all Collapse all v0 v0.4.0 Jul 23, 2024 v0.3.0 Jul 13, 2024 Changes in this version + type PageExtractor interface + Detect func() error + Extract func(inputFile string, page int, dpi float64, outputFile string) error + Name func() string + func FindExtractor() (PageExtractor, error) type Rect + func FromRectangle(r image.Rectangle) Rect + func (r Rect) ToRectangle() image.Rectangle type Size + func SizeFromBounds(b image.Rectangle) Size v0.2.1 Jun 3, 2024 v0.2.0 Jun 3, 2024 Changes in this version + func IsSupportedColorDepth(depth uint) error + type GrayscaleConfig struct + ColorDepth uint + PageRange *PageRange v0.1.0 Jun 1, 2024 Changes in this version + const Landscape + const Portrait + const Square + func FuzzFromPercent(fp float64) float64 + type Book struct + Config BookConfig + Filepath string + PageCount int + Title string + func NewBook(path string, config BookConfig) (*Book, error) + func (b *Book) LoadPage(pageNo int) (*Page, error) + type BookConfig struct + BgColor string + Density float64 + IsRTL bool + type Orientation int + func (o Orientation) String() string + type Page struct + OtherPageNo int + PageNo int + func (left *Page) Connect(right *Page) (*Page, error) + func (left *Page) IsDoublePageSpread(right *Page, cfg SpreadConfig) (bool, error) + func (p *Page) ConvertToGrayscale() error + func (p *Page) LeftRight(other *Page) (left *Page, right *Page) + func (p *Page) ResizeToFit(screen Size) error + func (p *Page) Trim(cfg TrimConfig, fuzzP float64, workDir string) error + func (p Page) Destroy() + func (p Page) Filename(suffix string) string + func (p Page) Filepath(dir string, suffix string) string + func (p Page) Rect() Rect + func (p Page) Size() Size + func (p Page) WriteFile(dir string) (string, string, error) + type PageRange struct + func NewPageRange() *PageRange + func (pr *PageRange) Add(start int, end int) + func (pr *PageRange) Parse(str string, total int) error + func (pr PageRange) All() []int + func (pr PageRange) Contains(page int) bool + func (pr PageRange) First() int + func (pr PageRange) Last() int + func (pr PageRange) PageCount() int + func (pr PageRange) String() string + type Point struct + X int + Y int + func (p Point) String() string + func (p Point) TranslateBy(dx int, dy int) Point + type Rect struct + func (r Rect) BoundBy(frame Rect) Rect + func (r Rect) InsetBy(dx int, dy int) Rect + func (r Rect) LeftEdge(width uint, margin uint) Rect + func (r Rect) MaxX() int + func (r Rect) MaxY() int + func (r Rect) MinX() int + func (r Rect) MinY() int + func (r Rect) MoveInside(frame Rect) Rect + func (r Rect) RightEdge(width uint, margin uint) Rect + func (r Rect) String() string + func (r Rect) TranslateBy(dx int, dy int) Rect + type Size struct + Height uint + Width uint + func (s Size) AspectFitIn(box Size, enlarge bool) Size + func (s Size) CanFitIn(box Size) bool + func (s Size) Orientation() Orientation + func (s Size) Rotate() Size + func (s Size) ScaleBy(f float64) Size + func (s Size) String() string + type SpreadConfig struct + BgDistort float64 + EdgeMargin uint + EdgeWidth uint + Enabled bool + LrDistort float64 + type TrimConfig struct + Enabled bool + Margin int + MinSizeP float64 v0.1.0-alpha.1 Jun 1, 2024