Documentation
¶
Index ¶
- func NewDocument() document.Document
- type Document
- func (p *Document) AddBookmark(name string) error
- func (p *Document) AddCheckbox(name string, x, y float64) error
- func (p *Document) AddComboBox(name string, x, y, w, h float64, options ...string) error
- func (p *Document) AddFootnote(text string) error
- func (p *Document) AddHeading(text string, level int, style ...document.CellStyle) error
- func (p *Document) AddHyperlink(text, url string, style ...document.CellStyle) error
- func (p *Document) AddList(items []string, ordered bool, style ...document.CellStyle) error
- func (p *Document) AddPageBreak() error
- func (p *Document) AddParagraph(text string, style ...document.CellStyle) error
- func (p *Document) AddRadioButton(name string, x, y float64, options ...string) error
- func (p *Document) AddRichParagraph(spans []document.TextSpan) error
- func (p *Document) AddSection(settings document.PageSettings) error
- func (p *Document) AddTable(rows, cols int) (document.Table, error)
- func (p *Document) AddTableOfContents() error
- func (p *Document) AddTextField(name string, x, y, w, h float64) error
- func (p *Document) AttachFile(path, name, description string) error
- func (p *Document) Close() error
- func (p *Document) DrawEllipse(x, y, w, h float64, style ...document.CellStyle) error
- func (p *Document) DrawLine(x1, y1, x2, y2 float64, style ...document.CellStyle) error
- func (p *Document) DrawRect(x, y, w, h float64, style ...document.CellStyle) error
- func (d *Document) Export(uri string) error
- func (p *Document) GetMetadata() (document.Metadata, error)
- func (p *Document) ImportPage(path string, pageNum int) error
- func (p *Document) InsertImage(path string, width, height float64, style ...document.CellStyle) error
- func (p *Document) Open(ctx context.Context, reader io.Reader) error
- func (p *Document) ReadContent() (string, error)
- func (p *Document) RegisterFont(name, path string) error
- func (p *Document) Replace(replacements map[string]string) error
- func (p *Document) Save(ctx context.Context, writer io.Writer) error
- func (p *Document) Search(keywords []string) ([]document.SearchResult, error)
- func (d *Document) SetContext(ctx context.Context)
- func (d *Document) SetExportFunc(fn func(doc document.Document, uri string) error)
- func (p *Document) SetFooter(text string, style ...document.CellStyle) error
- func (p *Document) SetHeader(text string, style ...document.CellStyle) error
- func (p *Document) SetMetadata(metadata document.Metadata) error
- func (p *Document) SetPageSettings(settings document.PageSettings) error
- func (d *Document) SetPassword(password string) error
- func (p *Document) SetWatermark(text string, style ...document.CellStyle) error
- func (p *Document) Table(index int) (document.Table, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDocument ¶
NewDocument creates a new instance of a PDF document processor.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document implements the document.Document and document.WordProcessor interfaces. It uses composition to delegate logic to specialized smaller units.
func (*Document) AddBookmark ¶
func (*Document) AddCheckbox ¶
func (*Document) AddComboBox ¶
func (*Document) AddFootnote ¶
func (*Document) AddHeading ¶
func (*Document) AddHyperlink ¶
func (*Document) AddPageBreak ¶
func (p *Document) AddPageBreak() error
func (*Document) AddParagraph ¶
func (*Document) AddRadioButton ¶
func (*Document) AddRichParagraph ¶
func (*Document) AddSection ¶
func (p *Document) AddSection(settings document.PageSettings) error
func (*Document) AddTableOfContents ¶
func (p *Document) AddTableOfContents() error
func (*Document) AddTextField ¶
func (*Document) AttachFile ¶
func (*Document) Close ¶
func (p *Document) Close() error
Close releases any resources used by the document.
func (*Document) DrawEllipse ¶
func (*Document) GetMetadata ¶
func (*Document) ImportPage ¶
func (*Document) InsertImage ¶
func (*Document) ReadContent ¶
ReadContent returns the text contentItems of the document.
func (*Document) RegisterFont ¶
func (*Document) Search ¶
func (p *Document) Search(keywords []string) ([]document.SearchResult, error)
Search finds keywords in the document.
func (*Document) SetContext ¶
func (*Document) SetExportFunc ¶
func (*Document) SetMetadata ¶
func (*Document) SetPageSettings ¶
func (p *Document) SetPageSettings(settings document.PageSettings) error
func (*Document) SetPassword ¶
func (*Document) SetWatermark ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.