pdfcheck

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: EPL-2.0 Imports: 6 Imported by: 0 modules, 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 pdfcheck reads what a test needs to know about a PDF file written by any backend: the number of pages, their sizes, the fonts and the embedded images. It looks at the bytes, not at the object graph: it inflates every Flate stream it finds (cairo packs objects into object streams) and scans the text of the file and of those streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Pages  []Size
	Fonts  []string // BaseFont names, as written ("/ABCDEF+Name" without the slash), sorted by first appearance
	Images int
	// Text is the decoded text of the whole file, for searching marks such as content operators.
	Text string
}

Info is what Inspect found.

func Inspect

func Inspect(data []byte) (*Info, error)

Inspect parses data. It fails for data that is not a PDF.

type Size

type Size struct{ W, H float64 }

Size is a page size in points.

Jump to

Keyboard shortcuts

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