extract

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package extract runs a page's content streams and collects every character drawn, positioned and sized, as layout input. It is a port of pdfminer.six's page interpreter and text device (pdfinterp.py, pdfdevice.py, and the character half of converter.py).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor struct {

	// MaxOps bounds the operators run per page, against content built to
	// never finish; zero means 10 million.
	MaxOps int
	// Paths records painted lines, rectangles and curves, which table
	// detection needs and text extraction does not.
	Paths bool
	// contains filtered or unexported fields
}

Extractor reads pages of one document, sharing loaded fonts.

func New

func New(doc *pdf.Document) *Extractor

New returns an extractor for doc.

func (*Extractor) Page

func (e *Extractor) Page(ctx context.Context, p *pdf.Page, number int) (*layout.Page, error)

Page runs a page's content and returns its characters, unanalyzed. Number is the 1-based page number, recorded on the result.

Jump to

Keyboard shortcuts

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