Documentation
¶
Index ¶
- type Array
- type ArrayObj
- type BoolObj
- type Boolean
- type DictObj
- type Dictionary
- type Document
- type DocumentMetadata
- type HexStringObj
- type HintTable
- type Name
- type NameObj
- type Null
- type NullObj
- type Number
- type NumberObj
- type Object
- type ObjectRef
- type PageOffsetHint
- type Parser
- type ParserConfig
- type Permissions
- type RefObj
- type Reference
- type Stream
- type StreamObj
- type String
- type StringObj
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Dictionary interface {
Object
Get(key Name) (Object, bool)
Set(key Name, value Object)
Keys() []Name
Len() int
}
Dictionary represents a PDF dictionary object.
type Document ¶
type Document struct {
Objects map[ObjectRef]Object
Trailer Dictionary
Version string // e.g., "1.7"
Metadata DocumentMetadata
Permissions Permissions
MetadataEncrypted bool
Encrypted bool
Linearized bool
HintTable *HintTable
}
Document is the root container for raw PDF objects.
type DocumentMetadata ¶
type DocumentMetadata struct {
Producer string
Creator string
Title string
Author string
Subject string
Keywords []string
}
DocumentMetadata contains common PDF info fields.
type HexStringObj ¶
type HexStringObj struct{ Bytes []byte }
HexStringObj encodes bytes as a hexadecimal string literal.
func HexStr ¶
func HexStr(bytes []byte) HexStringObj
func (HexStringObj) IsHex ¶
func (s HexStringObj) IsHex() bool
func (HexStringObj) IsIndirect ¶
func (s HexStringObj) IsIndirect() bool
func (HexStringObj) Type ¶
func (s HexStringObj) Type() string
func (HexStringObj) Value ¶
func (s HexStringObj) Value() []byte
type HintTable ¶
type HintTable struct {
PageOffsets []PageOffsetHint
}
HintTable represents the parsed content of a linearization hint stream.
type PageOffsetHint ¶
type Parser ¶
Parser converts bytes into a raw.Document.
func NewParser ¶
func NewParser(cfg ParserConfig) Parser
NewParser constructs a simple raw.Parser implementation.
type ParserConfig ¶
ParserConfig controls raw parsing behavior.
type Permissions ¶
type Permissions struct {
Print, Modify, Copy, ModifyAnnotations, FillForms, ExtractAccessible, Assemble, PrintHighQuality bool
}
Permissions describes allowed actions expressed in the parsed document.
type Stream ¶
type Stream interface {
Object
Dictionary() Dictionary
RawData() []byte
Length() int64
}
Stream represents a raw (undecoded) PDF stream.
type StreamObj ¶
Stream object
func (*StreamObj) Dictionary ¶
func (s *StreamObj) Dictionary() Dictionary
func (*StreamObj) IsIndirect ¶
type StringObj ¶
type StringObj struct{ Bytes []byte }
String object (literal only)
func (StringObj) IsIndirect ¶
Click to show internal directories.
Click to hide internal directories.