render

package
v3.0.0-...-55e877b Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: GPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageDevice

type ImageDevice struct {

	// OutputWidth represents the width of the rendered images in pixels.
	// The heights of the output images are calculated based on the selected
	// width and the original height of each rendered page.
	OutputWidth int
	// contains filtered or unexported fields
}

ImageDevice is used to render PDF pages to image targets.

func NewImageDevice

func NewImageDevice() *ImageDevice

NewImageDevice returns a new image device.

func (*ImageDevice) Render

func (_fd *ImageDevice) Render(page *_aa.PdfPage) (_f.Image, error)

Render converts the specified PDF page into an image and returns the result.

func (*ImageDevice) RenderToPath

func (_cgb *ImageDevice) RenderToPath(page *_aa.PdfPage, outputPath string) error

RenderToPath converts the specified PDF page into an image and saves the result at the specified location.

type PdfShadingType

type PdfShadingType int64

PdfShadingType defines PDF shading types. Source: PDF32000_2008.pdf. Chapter 8.7.4.5

const (
	ShadingTypeFunctionBased PdfShadingType = 1
	ShadingTypeAxial         PdfShadingType = 2
	ShadingTypeRadial        PdfShadingType = 3
	ShadingTypeFreeForm      PdfShadingType = 4
	ShadingTypeLatticeForm   PdfShadingType = 5
	ShadingTypeCoons         PdfShadingType = 6
	ShadingTypeTensorProduct PdfShadingType = 7
)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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