document

package
v3.0.0-...-55e877b Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Pages                map[int]*Page
	NumberOfPagesUnknown bool
	NumberOfPages        uint32
	GBUseExtTemplate     bool
	InputStream          *_bb.Reader
	GlobalSegments       *Globals
	OrganizationType     _ce.OrganizationType
	Classer              *_de.Classer
	XRes, YRes           int
	FullHeaders          bool
	CurrentSegmentNumber uint32
	AverageTemplates     *_fa.Bitmaps
	BaseIndexes          []int
	Refinement           bool
	RefineLevel          int

	EncodeGlobals bool
	// contains filtered or unexported fields
}

func DecodeDocument

func DecodeDocument(input *_bb.Reader, globals *Globals) (*Document, error)

func InitEncodeDocument

func InitEncodeDocument(fullHeaders bool) *Document

func (*Document) AddClassifiedPage

func (_ge *Document) AddClassifiedPage(bm *_fa.Bitmap, method _de.Method) (_ba error)

func (*Document) AddGenericPage

func (_eg *Document) AddGenericPage(bm *_fa.Bitmap, duplicateLineRemoval bool) (_ae error)

func (*Document) Encode

func (_ded *Document) Encode() (_dcd []byte, _ca error)

func (*Document) GetGlobalSegment

func (_dega *Document) GetGlobalSegment(i int) (*_ce.Header, error)

func (*Document) GetNumberOfPages

func (_gbbe *Document) GetNumberOfPages() (uint32, error)

func (*Document) GetPage

func (_bge *Document) GetPage(pageNumber int) (_ce.Pager, error)

type EncodingMethod

type EncodingMethod int
const (
	GenericEM EncodingMethod = iota
	CorrelationEM
	RankHausEM
)

type Globals

type Globals struct{ Segments []*_ce.Header }

func (*Globals) AddSegment

func (_bc *Globals) AddSegment(segment *_ce.Header)

func (*Globals) GetSegment

func (_ad *Globals) GetSegment(segmentNumber int) (*_ce.Header, error)

func (*Globals) GetSegmentByIndex

func (_eda *Globals) GetSegmentByIndex(index int) (*_ce.Header, error)

func (*Globals) GetSymbolDictionary

func (_bcb *Globals) GetSymbolDictionary() (*_ce.Header, error)

type Page

type Page struct {
	Segments           []*_ce.Header
	PageNumber         int
	Bitmap             *_fa.Bitmap
	FinalHeight        int
	FinalWidth         int
	ResolutionX        int
	ResolutionY        int
	IsLossless         bool
	Document           *Document
	FirstSegmentNumber int
	EncodingMethod     EncodingMethod
	BlackIsOne         bool
}

func (*Page) AddEndOfPageSegment

func (_cff *Page) AddEndOfPageSegment()

func (*Page) AddGenericRegion

func (_fcda *Page) AddGenericRegion(bm *_fa.Bitmap, xloc, yloc, template int, tp _ce.Type, duplicateLineRemoval bool) error

func (*Page) AddPageInformationSegment

func (_efg *Page) AddPageInformationSegment()

func (*Page) Encode

func (_ddeg *Page) Encode(w _bb.BinaryWriter) (_dgc int, _afd error)

func (*Page) GetBitmap

func (_ebe *Page) GetBitmap() (_eceb *_fa.Bitmap, _cge error)

func (*Page) GetHeight

func (_bea *Page) GetHeight() (int, error)

func (*Page) GetResolutionX

func (_ffc *Page) GetResolutionX() (int, error)

func (*Page) GetResolutionY

func (_afg *Page) GetResolutionY() (int, error)

func (*Page) GetSegment

func (_eef *Page) GetSegment(number int) (*_ce.Header, error)

func (*Page) GetWidth

func (_bab *Page) GetWidth() (int, error)

func (*Page) String

func (_dbb *Page) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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