filter

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package filter contains PDF filter implementations.

Index

Constants

View Source
const EOD = '>'

EOD represents the end of data marker.

Variables

View Source
var (

	// ErrUnsupportedFilter signals an unsupported filter type.
	ErrUnsupportedFilter = errors.New("Filter not supported")
)

Functions

func DecodeStream

func DecodeStream(streamDict *types.PDFStreamDict) error

DecodeStream decodes streamDict data by applying its filter pipeline.

func EncodeStream

func EncodeStream(streamDict *types.PDFStreamDict) error

EncodeStream encodes stream dict data by applying its filter pipeline.

Types

type Filter

type Filter interface {
	Encode(r io.Reader) (*bytes.Buffer, error)
	Decode(r io.Reader) (*bytes.Buffer, error)
}

Filter defines an interface for encoding/decoding buffers.

func NewFilter

func NewFilter(filterName string, decodeParms, encodeParms *types.PDFDict) (filter Filter, err error)

NewFilter returns a filter for given filterName and an optional parameter dictionary.

Jump to

Keyboard shortcuts

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