pdf

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPDFToImages

func ConvertPDFToImages(pdf []byte, opts ConvertOptions) ([]image.Image, error)

ConvertPDFToImages converts a PDF file to a []image.Image. MuPdf is not thread safe. There is no point in goroutines here.

Types

type ConvertOptions

type ConvertOptions struct {

	// MaxPages limits the number of pages to convert (0 = all pages)
	MaxPages int

	// SkipFirstNPages skips the first N pages
	SkipFirstNPages int

	// DPI is the resolution of the image
	DPI float64
}

func DefaultOptions

func DefaultOptions() ConvertOptions

Jump to

Keyboard shortcuts

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