Documentation ¶
Overview ¶
Package filters provide logic to handle binary data encoded with PDF filters, such as inline data images. Regular stream objects provide a Length information, but inline data images don't, which requires to detect the End of Data marker, which depends on the filter. This package only parse encoded content. See pdfcpu/filter for an alternative to also encode data.
Index ¶
Constants ¶
View Source
const ( ASCII85 = "ASCII85Decode" ASCIIHex = "ASCIIHexDecode" RunLength = "RunLengthDecode" LZW = "LZWDecode" Flate = "FlateDecode" DCT = "DCTDecode" CCITTFax = "CCITTFaxDecode" )
PDF defines the following filters. See also 7.4 in the PDF spec, and 8.9.7 - Inline Images
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Skipper ¶
type Skipper interface { // Skip reads the input data and look for an EOD marker. // It returns the number of bytes read to go right after EOD. // Note that, due to buferring, the given reader may actually have read a bit more. Skip(io.Reader) (int, error) }
Skipper is able to detect the end of a filtered content. Since some filters take additional parameters, skippers should be directly created by their concrete types, but this interface is exposed as a convenience.
type SkipperAscii85 ¶
type SkipperAscii85 struct{}
type SkipperAsciiHex ¶
type SkipperAsciiHex struct{}
type SkipperCCITT ¶
type SkipperCCITT struct {
Params ccitt.CCITTParams
}
type SkipperDCT ¶
type SkipperDCT struct{}
type SkipperFlate ¶
type SkipperFlate struct{}
type SkipperLZW ¶
type SkipperLZW struct {
EarlyChange bool // In PDF, written as an integer. Default value: 1 (true).
}
type SkipperRunLength ¶
type SkipperRunLength struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.