Versions in this module Expand all Collapse all v1 v1.1.1 Aug 4, 2026 v1.1.0 Aug 3, 2026 Changes in this version + func WriteProfileDoc(w io.Writer, p Profile) error type Options + func (o *Options) ApplyProfileDoc(d *ProfileDoc) error + type ProfileDoc struct + Base Profile + Description string + Heuristics json.RawMessage + Name string + Options json.RawMessage + func LoadProfileDoc(r io.Reader) (*ProfileDoc, error) v1.0.0 Aug 3, 2026 Changes in this version + type Block struct + Bounds Rect + Caption string + Font string + ID string + ImageID string + InlineImage bool + Kind BlockKind + Level int + Links []CrossRef + ListItems []string + ListOrdered bool + ListStart int + NoteLabel string + NoteRefs map[string]string + Page int + Size float64 + Styles []StyleRun + Superscripts []string + TableConfidence string + TableRows [][]TableCell + Text string + type BlockKind string + const KindCaption + const KindCode + const KindFigure + const KindFootnote + const KindHeading + const KindList + const KindParagraph + const KindQuote + const KindTable + type Converter struct + func New(opts Options) (*Converter, error) + func (c *Converter) Analyze(ctx context.Context, r io.ReaderAt, size int64) (*Document, error) + func (c *Converter) Convert(ctx context.Context, r io.ReaderAt, size int64, w io.Writer) (*Report, error) + func (c *Converter) Options() Options + func (c *Converter) Probe(ctx context.Context, r io.ReaderAt, size int64, stage ProbeStage, page int) (*ProbeResult, error) + func (c *Converter) Write(ctx context.Context, doc *Document, w io.Writer) (*Report, error) + type CrossRef struct + End int + Start int + TargetID string + TargetPage int + TargetY float64 + type Diagnostic struct + Message string + Page int + Severity Severity + Stage string + type Document struct + Author string + Blocks []Block + Digest string + Images []Image + Language string + Modified time.Time + Outline []OutlineItem + PageCount int + Source string + Title string + func (d *Document) Report() *Report + type DocumentInfo struct + Author string + Created time.Time + Creator string + Digest string + Identifier string + Keywords string + Language string + Modified time.Time + Outline []OutlineItem + OutlineEntries int + PageCount int + PageSizes []PageSize + Producer string + Source string + Subject string + Title string + func Meta(ctx context.Context, r io.ReaderAt, size int64) (*DocumentInfo, error) + type EncryptedError struct + Handler string + Revision int + func (e *EncryptedError) Error() string + type Heuristics struct + BackgroundCoverRatio float64 + BaselineTolerance float64 + BlockGapRatio float64 + BlockOverlapRatio float64 + BlockSizeChangeRatio float64 + CaptionGapLines float64 + CaptionOverlapRatio float64 + CaptionSizeRatio float64 + ColumnMinGlyphRatio float64 + ColumnMinLines int + ColumnMinRows int + FootnoteBandRatio float64 + FootnoteSizeRatio float64 + FurnitureBandRatio float64 + FurnitureMinPages int + FurnitureRepeatRatio float64 + FurnitureSamplePages int + GutterMinHeightRatio float64 + GutterMinWidthSpaces float64 + HeadingBoldMaxWords int + HeadingMaxWords int + HeadingSizeRatio float64 + InlineImageWidthRatio float64 + KeepRotated bool + MaxColumns int + MinImageAreaRatio float64 + MinImagePoints float64 + ParagraphGapRatio float64 + ParagraphIndentEm float64 + QuoteIndentEm float64 + RTLLetterRatio float64 + RotationTolerance float64 + RuleClusterTolerance float64 + RuleMaxThickness float64 + RuleRowCoverRatio float64 + ScanImageCoverRatio float64 + ScanImagePageRatio float64 + ScanMedianGlyphs int + ScanSamplePages int + ShortLineRatio float64 + SpaceGapRatio float64 + StyleMinLetters int + SuperscriptRiseEm float64 + SuperscriptSizeRatio float64 + TableColumnTolerance float64 + TableMinFilledRatio float64 + TableMinRows int + TableMinSharedColumns int + TableRegionGap float64 + VectorMinPaints int + func DefaultHeuristics() Heuristics + type HyphenDecision struct + Dropped bool + Left string + Reason string + Right string + type HyphenationReport struct + Decisions []HyphenDecision + Dropped int + Kept int + Language string + Patterns int + type Image struct + Data []byte + Ext string + Height int + ID string + MediaType string + Passthrough bool + Width int + func (i Image) Href() string + type ImageMode string + const ImagesDrop + const ImagesGrayscale + const ImagesKeep + func (m ImageMode) Valid() bool + type MalformedError struct + Detail string + Err error + func (e *MalformedError) Error() string + func (e *MalformedError) Unwrap() error + type Metadata struct + Author string + Language string + Title string + type NoTextLayerError struct + ImagePageFraction float64 + MedianGlyphs float64 + SampledPages int + func (e *NoTextLayerError) Error() string + type Options struct + Columns int + Deterministic time.Time + Heuristics Heuristics + ImageMaxWidth int + Images ImageMode + KeepHeaders bool + KeepSmallImages bool + MaxChunkBytes int + Metadata Metadata + NoDehyphenate bool + Pages PageRange + Profile Profile + SplitAt SplitMode + Strict bool + Tables TableMode + func DefaultOptions() Options + func (o *Options) ApplyProfileDefaults() + type OutlineItem struct + Children []OutlineItem + Page int + Title string + Y float64 + type PageMetrics struct + Blocks int + Columns int + DecodeFailures int + Glyphs int + Images int + Letters int + Lines int + Page int + RTLLetters int + RotatedDropped int + Tables int + UsedInvisibleText bool + VectorPaints int + VerticalText bool + func (m PageMetrics) DecodeFailureRate() float64 + type PageRange struct + func ParsePageRange(s string) (PageRange, error) + func (p PageRange) All() bool + func (p PageRange) Contains(i int) bool + func (p PageRange) String() string + type PageSize struct + Height float64 + Pages int + Rotate int + Width float64 + type ProbeBlock struct + Bounds Rect + Kind string + Level int + Lines int + Paragraphs []string + type ProbeGlyph struct + Advance float64 + Font string + Missing bool + Mode int + Rise float64 + Rotation float64 + Rune string + Size float64 + X float64 + Y float64 + type ProbeLine struct + Baseline float64 + Bounds Rect + Font string + Glyphs int + Size float64 + Text string + type ProbePage struct + Blocks []ProbeBlock + Glyphs []ProbeGlyph + Height float64 + Lines []ProbeLine + Page int + Rotate int + Width float64 + type ProbeResult struct + Notes []string + Pages []ProbePage + Stage ProbeStage + type ProbeStage string + const StageBlocks + const StageGlyphs + const StageLines + const StageStructure + func (s ProbeStage) Valid() bool + type Profile string + const ProfileCrossPoint + const ProfileMinimal + const ProfileStandard + func (p Profile) Valid() bool + type Rect struct + MaxX float64 + MaxY float64 + MinX float64 + MinY float64 + func (r Rect) Height() float64 + func (r Rect) Width() float64 + type Report struct + Blocks map[BlockKind]int + BodyFont string + Chapters int + Diagnostics []Diagnostic + FurnitureRemoved int + Headings map[int]int + Hyphenation HyphenationReport + ImageBytes int + ImagesPlaced int + LargestChapterBytes int + MultiColumnPages int + OutputBytes int64 + PageCount int + Pages []PageMetrics + PagesConverted int + QualityScore int + RTLLetterRatio float64 + Source string + Tables map[string]int + VectorPagesDropped int + VectorPaintsDropped int + VerticalTextPages int + func (r *Report) DecodeFailureRate() float64 + func (r *Report) Finish() + func (r *Report) MedianGlyphsPerPage() float64 + func (r *Report) Warnings() int + type Severity string + const SeverityInfo + const SeverityWarning + type SplitMode string + const SplitAtH1 + const SplitAtH2 + const SplitAtNone + const SplitAtPage + func (s SplitMode) Valid() bool + type StyleRun struct + Bold bool + End int + Italic bool + Start int + type TableCell struct + ColSpan int + Text string + type TableMode string + const TableAuto + const TableDrop + const TableHTML + const TableText + func (m TableMode) Valid() bool + type UsageError struct + Err error + func (e *UsageError) Error() string + func (e *UsageError) Unwrap() error