Documentation
¶
Index ¶
Constants ¶
View Source
const ( DecodeParms = "DecodeParms" Author = "Author" CreationDate = "CreationDate" ModDate = "ModDate" Title = "Title" Columns = "Columns" Predictor = "Predictor" Filter = "Filter" FlateDecode = "FlateDecode" Info = "Info" Length = "Length" Root = "Root" Size = "Size" Type = "Type" XRef = "XRef" W = "W" Prev = "Prev" Index = "Index" )
Variables ¶
View Source
var ( PdfErrorNotParsed = errors.New("Pdf has not been parsed yet") PdfErrorNotFound = errors.New("Not Found") PdfErrorInfoNotFound = errors.New("Info Not Found") PdfErrorXRefNotFound = errors.New("XRef Not Found") PdfErrorFailedToResolveRef = errors.New("Failed to resolve a PdfRef to an OBJ") PdfErrorFailedToFindIndexForXRef = errors.New("Failed to find index for XRef & object is not in xref table") PdfErrorInvalidXRefIndex = errors.New("XRef Index was not formatted correctly") PdfErrorCompressObjectsNotSupported = errors.New("Compressed Objects are not currently supported") PdfErrorFailedToParseTrailer = errors.New("Failed to parse Trailer") PdfErrorInvalidTrailerObjectType = errors.New("Expected *pdfDictionary for trailer") PdfErrorUnknownMode = errors.New("Mode passed to parseObject is not a known mode") PdfParseErrorUnclosedObject = errors.New("Never encrountered the closing token of an object") PdfParseErrorInvalidNameObject = errors.New("Invalid name object") PdfParseErrorEncounteredWhitespace = errors.New("Encountered whitespace that was suppose to be skipped. File Bug!") )
View Source
var (
Debug bool
)
Functions ¶
func Decompress ¶
Decompress provides and expanded byte array for the PDF stream provided. It will auto select the correct decompression method so it should succeed regardless of which type of compression is used. Returns error if for some reason decompress fails.
func PdfPredictor12Decode ¶
PdfPredictor12Decode will decode a PNG Up Predictor. In PDF the size of each line is size + 1 because the first byte of each "line" is the type of Predictor used. The intention is that each line could use a different predictor. At the moment this decoder can only use type:2. The type should be striped from the byte array and discarded during the computation.
Types ¶
type ObjectStreamScanner ¶
type ObjectStreamScanner struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.