Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
// Execute executes a script in the context of the document.
Execute(ctx context.Context, script string) (interface{}, error)
// RegisterDOM registers the PDF Document Object Model with the engine.
RegisterDOM(dom PDFDOM) error
}
Engine represents a scripting engine (e.g., JavaScript).
type FormFieldProxy ¶
type FormFieldProxy interface {
GetValue() interface{}
SetValue(value interface{})
}
FormFieldProxy represents a form field exposed to scripts.
type PDFDOM ¶
type PDFDOM interface {
// GetField returns a form field by name.
GetField(name string) (FormFieldProxy, error)
// GetPage returns a page by index (0-based).
GetPage(index int) (PageProxy, error)
// Alert shows an alert dialog (if supported by the viewer/runner).
Alert(message string)
}
PDFDOM exposes the PDF document structure to the scripting engine. It provides a safe, controlled API for scripts to interact with the PDF.
Click to show internal directories.
Click to hide internal directories.