Versions in this module Expand all Collapse all v1 v1.1.0 Jun 25, 2019 Changes in this version + const KEYWORD_BEGIN_BF_CHAR + const KEYWORD_BEGIN_BF_RANGE + const KEYWORD_FALSE + const KEYWORD_N + const KEYWORD_NULL + const KEYWORD_OBJ + const KEYWORD_R + const KEYWORD_STREAM + const KEYWORD_TEXT + const KEYWORD_TEXT_END + const KEYWORD_TEXT_FONT + const KEYWORD_TEXT_MOVE_1 + const KEYWORD_TEXT_MOVE_2 + const KEYWORD_TEXT_MOVE_3 + const KEYWORD_TEXT_POSITION + const KEYWORD_TEXT_SHOW_1 + const KEYWORD_TEXT_SHOW_2 + const KEYWORD_TEXT_SHOW_3 + const KEYWORD_TRAILER + const KEYWORD_TRUE + const KEYWORD_XREF + const XrefTypeCompressedObject + const XrefTypeFreeObject + const XrefTypeIndirectObject + var EncryptionError = errors.New("missing required encryption info") + var EncryptionPasswordError = errors.New("incorrect password") + var EncryptionUnsupported = errors.New("unsupported encryption") + var EndOfArray = errors.New("end of array") + var EndOfDictionary = errors.New("end of dictionary") + var EndOfHexString = errors.New("end of hex string") + var EndOfString = errors.New("end of string") + var InvalidDictionaryKeyType = "invalid dictionary key type" + var InvalidHexStringChar = "invalid hex string character" + var InvalidNameEscapeChar = "invalid name escape character" + var InvalidOctal = "invalid octal in string" + var MissingDictionaryValue = "missing dictionary value" + var ReadError = errors.New("read failed") + var UnclosedArray = "unclosed array" + var UnclosedDictionary = "unclosed dictionary" + var UnclosedHexString = "unclosed hex string" + var UnclosedStream = "unclosed stream" + var UnclosedString = "unclosed string" + var UnclosedStringEscape = "unclosed escape in string" + var UnclosedStringOctal = "unclosed octal in string" + var UnnecessaryEscapeName = "unnecessary espace sequence in name" + var UnnecessaryEscapeString = "unnecessary espace sequence in string" + var Verbose *bool + func ASCII85Decode(data []byte) []byte + func ASCIIHexDecode(data []byte) []byte + func BytesToInt(b []byte) int + func Debug(format string, a ...interface{}) + func DecodeStream(filter string, data []byte, decode_parms Dictionary) []byte + func FlateDecode(data []byte, decode_parms Dictionary) []byte + func GetBits(d []byte, p int, n int) uint32 + func IsHex(b byte) bool + func LZWDecode(data []byte, decode_parms Dictionary) []byte + func Parse(file_path string, password string, output_dir string) error + func ReadInt(reader io.Reader, width int) (int, bool) + func ReadInt64(reader io.Reader, width int) (int64, bool) + func ReversePredictor(data []byte, decode_parms Dictionary) []byte + func RunLengthDecode(data []byte) []byte + func SetBits(d []byte, p int, n int, v uint32) + type Action Dictionary + func (a Action) Extract(output *Output) + type Array []Object + func (a Array) GetArray(index int) (Array, bool) + func (a Array) GetBool(index int) (bool, bool) + func (a Array) GetBytes(index int) ([]byte, bool) + func (a Array) GetDictionary(index int) (Dictionary, bool) + func (a Array) GetInt(index int) (int, bool) + func (a Array) GetInt64(index int) (int64, bool) + func (a Array) GetName(index int) (string, bool) + func (a Array) GetNumber(index int) (Number, bool) + func (a Array) GetObject(index int) (Object, bool) + func (a Array) GetStream(index int) ([]byte, bool) + func (a Array) GetString(index int) (string, bool) + func (a Array) String() string + type CryptFilter interface + NewDecryptor func(int, int) Decryptor + type CryptFilterAES struct + func (c *CryptFilterAES) NewDecryptor(n int, g int) Decryptor + type CryptFilterNone struct + func (c *CryptFilterNone) NewDecryptor(n int, g int) Decryptor + type CryptFilterRC4 struct + func (c *CryptFilterRC4) NewDecryptor(n int, g int) Decryptor + type Decryptor interface + Decrypt func([]byte) + type DecryptorAES struct + func (d *DecryptorAES) Decrypt(data []byte) + type DecryptorNone struct + func (d *DecryptorNone) Decrypt(data []byte) + type DecryptorRC4 struct + func (d *DecryptorRC4) Decrypt(data []byte) + type Dictionary map[string]Object + func (d Dictionary) GetArray(key string) (Array, bool) + func (d Dictionary) GetBool(key string) (bool, bool) + func (d Dictionary) GetBytes(key string) ([]byte, bool) + func (d Dictionary) GetDictionary(key string) (Dictionary, bool) + func (d Dictionary) GetInt(key string) (int, bool) + func (d Dictionary) GetInt64(key string) (int64, bool) + func (d Dictionary) GetName(key string) (string, bool) + func (d Dictionary) GetNameTreeMap(key string) Array + func (d Dictionary) GetNumber(key string) (Number, bool) + func (d Dictionary) GetObject(key string) (Object, bool) + func (d Dictionary) GetPageTree(key string) ([]Dictionary, bool) + func (d Dictionary) GetReference(key string) (*Reference, bool) + func (d Dictionary) GetStream(key string) ([]byte, bool) + func (d Dictionary) GetString(key string) (string, bool) + func (d Dictionary) ResolveKids(resolved_kids map[int]interface{}) []Dictionary + func (d Dictionary) String() string + type File Dictionary + func (file File) Extract(output *Output, isCommand bool) + type Font struct + Cmap map[int]string + Width int + var FontDefault *Font = &Font{ ... } + func NewFont(d Dictionary) *Font + func (font *Font) Decode(b []byte) string + type IndirectObject struct + Generation int + Number int + Stream []byte + Value Object + func NewIndirectObject(number int) *IndirectObject + func (object *IndirectObject) Extract(output *Output) + func (object *IndirectObject) String() string + type Keyword string + func NewKeyword(keyword string) Keyword + func (keyword Keyword) String() string + type Name string + func (name Name) String() string + type Number float64 + func (number Number) String() string + type Object interface + String func() string + type Output struct + Commands *os.File + Directory string + Errors *os.File + Files *os.File + Javascript *os.File + Raw *os.File + Text *os.File + URLs *os.File + func NewOutput(directory string) (output *Output, err error) + func (output *Output) Close() + func (output *Output) DumpFile(name string, data []byte) + func (output *Output) Error(message string) + type Page Dictionary + func (page Page) Extract(output *Output) + type Parser struct + Xref map[int]*XrefEntry + func NewParser(readSeeker io.ReadSeeker, output *Output) *Parser + func (parser *Parser) CurrentOffset() int64 + func (parser *Parser) GetObject(number int) *IndirectObject + func (parser *Parser) Load(password string) error + func (parser *Parser) ReadArray(decryptor Decryptor) Array + func (parser *Parser) ReadCommand() (Keyword, Array, error) + func (parser *Parser) ReadDictionary(decryptor Decryptor) Dictionary + func (parser *Parser) ReadHexString(decryptor Decryptor) String + func (parser *Parser) ReadInt() (int, bool) + func (parser *Parser) ReadInt64() (int64, bool) + func (parser *Parser) ReadKeyword() Keyword + func (parser *Parser) ReadName() Name + func (parser *Parser) ReadNumber() Number + func (parser *Parser) ReadObject(decryptor Decryptor) (Object, error) + func (parser *Parser) ReadObjectHeader() (int, int, bool) + func (parser *Parser) ReadStream(decryptor Decryptor, filter_list Array, decode_parms_list Array) []byte + func (parser *Parser) ReadString(decryptor Decryptor) String + func (parser *Parser) Seek(offset int64, whence int) (int64, error) + func (parser *Parser) SetPassword(password string) error + type Reference struct + Generation int + Number int + func NewReference(parser *Parser, number int, generation int) *Reference + func (reference *Reference) Resolve() Object + func (reference *Reference) ResolveStream() []byte + func (reference *Reference) String() string + type SecurityHandler struct + func NewSecurityHandler() *SecurityHandler + func (sh *SecurityHandler) Init(password []byte, trailer Dictionary) error + type String string + func (s String) String() string + type XrefEntry struct + Generation int + IsEncrypted bool + IsXrefStream bool + Offset int64 + Type int + func NewXrefEntry(offset int64, generation int, type_value int) *XrefEntry