JavaScriptCollection
Overview
JavaScriptCollection is a type in Aspose.PDF FOSS for Go.
JavaScriptCollection is the document-level JavaScript store, backed by the /Catalog/Names/JavaScript name tree (ISO 32000-1 §7.7.4 / §8.5.1).
This type provides 7 methods for working with JavaScriptCollection objects in Go programs.
Available methods include: Add, Clear, Count, Get, Has, Names, Remove.
All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.
Methods
| Signature | Description |
|---|---|
Count() → int | Count reports how many named scripts are in the collection. |
Has(name: string) → bool | Has reports whether a script with the given name exists. |
Get(name: string) → string | Get returns the script registered under name, or "" if absent. |
Names() → []string | Names returns the script names in lexical order (the order they are written to the name tree). |
Add(name: string) → error | Add registers (or replaces) a named script and writes it through to the /Catalog/Names/JavaScript name tree. |
Remove(name: string) → bool | Remove deletes the named script. |
Clear() | Clear removes every named script. |