inspect

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package inspect provides lightweight PDF inspection helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodedStreams

func DecodedStreams(data []byte) ([][]byte, error)

DecodedStreams returns raw or Flate-decoded PDF streams in file order.

func FirstPageSizePoints

func FirstPageSizePoints(data []byte) (float64, float64, error)

FirstPageSizePoints returns the first MediaBox dimensions in PDF points.

func PageCount

func PageCount(data []byte) (int, error)

PageCount returns the number of pages GoPDFKit can import from data.

func PageText

func PageText(data []byte, pageNum int) (string, error)

PageText imports one PDF page through GoPDFKit and extracts text from the resulting single-page PDF.

func Text

func Text(data []byte) (string, error)

Text extracts literal text operators from PDF content streams.

func ValidateStructure

func ValidateStructure(data []byte) error

ValidateStructure checks that data can be parsed as an unencrypted classic PDF with at least one importable page.

Types

This section is empty.

Jump to

Keyboard shortcuts

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