Documentation ¶
Overview ¶
Access to PDF files.
Index ¶
- Constants
- func Array(s []byte) [][]byte
- type DictionaryT
- type PdfReaderT
- func (pd *PdfReaderT) Arr(reference []byte) [][]byte
- func (pd *PdfReaderT) Att(a string, src []byte) []byte
- func (pd *PdfReaderT) Attribute(a string, src []byte) []byte
- func (pd *PdfReaderT) DecodedStream(reference []byte) (DictionaryT, []byte)
- func (pd *PdfReaderT) Dic(reference []byte) DictionaryT
- func (pd *PdfReaderT) ForcedArray(reference []byte) [][]byte
- func (pd *PdfReaderT) Num(reference []byte) int
- func (pd *PdfReaderT) Obj(reference []byte) []byte
- func (pd *PdfReaderT) PageFonts(page []byte) DictionaryT
- func (pd *PdfReaderT) Pages() [][]byte
- func (pd *PdfReaderT) Resolve(s []byte) (int, []byte)
- func (pd *PdfReaderT) Stream(reference []byte) (DictionaryT, []byte)
Constants ¶
const ( MAX_PDF_UPDATES = 1024 MAX_PDF_ARRAYSIZE = 1024 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DictionaryT ¶
func Dictionary ¶
func Dictionary(s []byte) DictionaryT
Dictionary() makes a map/hash from PDF dictionary data.
type PdfReaderT ¶
type PdfReaderT struct { File string // name of the file Startxref int // starting of xref table Xref map[int]int // "pointers" of the xref table Trailer DictionaryT // trailer dictionary of the file // contains filtered or unexported fields }
func (*PdfReaderT) Arr ¶
func (pd *PdfReaderT) Arr(reference []byte) [][]byte
pd.Arr() queries array data from a reference.
func (*PdfReaderT) Att ¶
func (pd *PdfReaderT) Att(a string, src []byte) []byte
pd.Att() tries to get an attribute from a page reference. The attribute will be resolved.
func (*PdfReaderT) Attribute ¶
func (pd *PdfReaderT) Attribute(a string, src []byte) []byte
pd.Attribute() tries to get an attribute definition from a page reference. Note that the attribute definition is not resolved - so it's possible to get back a reference here.
func (*PdfReaderT) DecodedStream ¶
func (pd *PdfReaderT) DecodedStream(reference []byte) (DictionaryT, []byte)
pd.DecodedStream() returns decoded contents of a stream.
func (*PdfReaderT) Dic ¶
func (pd *PdfReaderT) Dic(reference []byte) DictionaryT
pd.Dic() queries dictionary data from a reference.
func (*PdfReaderT) ForcedArray ¶
func (pd *PdfReaderT) ForcedArray(reference []byte) [][]byte
pd.ForcedArray() queries array data. If reference does not refer to an array, reference is taken as element of the returned array.
func (*PdfReaderT) Num ¶
func (pd *PdfReaderT) Num(reference []byte) int
pd.Num() queries integer data from a reference.
func (*PdfReaderT) Obj ¶
func (pd *PdfReaderT) Obj(reference []byte) []byte
pd.Obj() is the universal method to access contents of PDF objects or data tokens in i.e. dictionaries. For reading streams you'll have to utilize pd.Resolve().
func (*PdfReaderT) PageFonts ¶
func (pd *PdfReaderT) PageFonts(page []byte) DictionaryT
pd.PageFonts() returns references to the fonts defined for a page.
func (*PdfReaderT) Pages ¶
func (pd *PdfReaderT) Pages() [][]byte
pd.Pages() returns an array with references to the pages of the PDF.
func (*PdfReaderT) Resolve ¶
func (pd *PdfReaderT) Resolve(s []byte) (int, []byte)
pd.Resolve() resolves a reference in the PDF file. You'll probably need this method for reading streams only.
func (*PdfReaderT) Stream ¶
func (pd *PdfReaderT) Stream(reference []byte) (DictionaryT, []byte)
pd.Stream() returns contents of a stream.
Directories ¶
Path | Synopsis |
---|---|
Character Mappings (cmap).
|
Character Mappings (cmap). |
HTTP-server example.
|
HTTP-server example. |
"crush" bytes into bits - variable length.
|
"crush" bytes into bits - variable length. |
Enhanced input.
|
Enhanced input. |
hex encoder/decoder for PDF.
|
hex encoder/decoder for PDF. |
LZW decoder for PDF.
|
LZW decoder for PDF. |
Decoder for pfb fonts.
|
Decoder for pfb fonts. |
PS top-down parser.
|
PS top-down parser. |
string math
|
string math |
Library to convert PDF pages to SVG.
|
Library to convert PDF pages to SVG. |
SVG driver for graf.go.
|
SVG driver for graf.go. |
SVG driver (text) for graf.go.
|
SVG driver (text) for graf.go. |
Encode UTF-8.
|
Encode UTF-8. |