pdf

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 10 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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRangeTooLarge = errors.New("extracted PDF page range exceeds byte limit")
)

Functions

func ExtractRange

func ExtractRange(ctx context.Context, rs io.ReadSeeker, start, end, maxBytes int) ([]byte, error)

ExtractRange creates a PDF containing the zero-based half-open page range [start, end). A fresh source context is parsed on every call because pdfcpu's extraction mutates or shares named-destination structures between contexts.

func PageCount

func PageCount(path string) (int, error)

func PageCountContext

func PageCountContext(ctx context.Context, rs io.ReadSeeker) (int, error)

PageCountContext deliberately skips pdfcpu's full validation and optimization. Some valid-in-practice PDFs (for example, invoices with a bare /Annots Dict) are readable but rejected by the validator even in relaxed mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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