Documentation
¶
Index ¶
- func Version() string
- type Annot
- func (a *Annot) Close()
- func (a *Annot) Color() Color
- func (a *Annot) Contents() string
- func (a *Annot) Date() string
- func (a *Annot) Flags() AnnotFlag
- func (a *Annot) Index() int
- func (a *Annot) Name() string
- func (a *Annot) Quads() []Quad
- func (a *Annot) Rect() Rectangle
- func (a *Annot) SetColor(c Color)
- func (a *Annot) SetContents(c string)
- func (a *Annot) SetFlags(f AnnotFlag)
- func (a *Annot) Type() AnnotType
- type AnnotFlag
- type AnnotType
- type Color
- type Document
- func (d *Document) Close()
- func (d *Document) GetNAttachments() int
- func (d *Document) GetNPages() int
- func (d *Document) GetPage(i int) (page *Page)
- func (d *Document) HasAttachments() bool
- func (d *Document) Info() DocumentInfo
- func (d *Document) NewAnnot(t AnnotType, r Rectangle, q []Quad) (Annot, error)
- func (d *Document) Save(filename string) (saved bool, err error)
- type DocumentInfo
- type Image
- type Page
- func (p *Page) AddAnnot(a Annot)
- func (p *Page) AnnotText(a Annot) string
- func (p *Page) Close()
- func (p *Page) ConvertToSVG(filename string)
- func (p *Page) Duration() float64
- func (p *Page) GetAnnots() (Annots []*Annot)
- func (p *Page) Images() (results []Image)
- func (p *Page) Index() int
- func (p *Page) Label() string
- func (p *Page) RemoveAnnot(a Annot)
- func (p *Page) Size() (width, height float64)
- func (p *Page) Text() string
- func (p *Page) TextAttributes() (results []TextAttributes)
- func (p *Page) TextLayout() (layouts []Rectangle)
- func (p *Page) TextLayoutAndAttrs() (result []TextEl)
- type Point
- type Quad
- type Rectangle
- type TextAttributes
- type TextEl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Annot ¶ added in v0.0.2
type Annot struct {
// contains filtered or unexported fields
}
func (*Annot) SetContents ¶ added in v0.0.4
type AnnotType ¶ added in v0.0.3
type AnnotType int
const ( AnnotUnknown AnnotType = iota AnnotText AnnotLink AnnotFreeText AnnotLine AnnotSquare AnnotCircle AnnotPolygon AnnotPolyLine AnnotHighlight AnnotUnderline AnnotSquiggly AnnotStrikeOut AnnotStamp AnnotCaret AnnotInk AnnotPopup AnnotFileAttachment AnnotSound AnnotMovie AnnotWidget AnnotScreen AnnotPrinterMark AnnotTrapNet AnnotWatermark Annot3D )
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func (*Document) GetNAttachments ¶
func (*Document) HasAttachments ¶
func (*Document) Info ¶
func (d *Document) Info() DocumentInfo
type DocumentInfo ¶
type Image ¶
func (*Image) GetSurface ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func (*Page) ConvertToSVG ¶
Converts a page into SVG and saves to file. Inspired by https://github.com/dawbarton/pdf2svg
func (*Page) RemoveAnnot ¶ added in v0.0.4
func (*Page) TextAttributes ¶
func (p *Page) TextAttributes() (results []TextAttributes)
func (*Page) TextLayout ¶
func (*Page) TextLayoutAndAttrs ¶
type TextAttributes ¶
type TextEl ¶
type TextEl struct {
Text string
Attrs *TextAttributes
Rect Rectangle
}
Click to show internal directories.
Click to hide internal directories.