PDF Annotations

createPdfAnnotation(...)
createPdfAnnotation(type, x, y, w, h, ["name"]) -> string

Creates a new PDF Annotation frame. "type" refers to the kind of PDF annotation with the following key:

x and y are the upper left coordinates for the frame, having w width and h height. If "name" is not given Scribus will create one for you.

On systems without OSG installed a runtime error will be raised. May raise NameExistsError if you explicitly pass a name that's already used.

getJSActionScript(...)
getJSActionScript(which, ["name"]) -> string

Gets the JavaScript action script for a particular event

This functions accepts following arguments:

Returns a string if object's action type is Javascript, NONE otherwise.

Page item must be an annotation or an error will be raised. May raise NameExistsError if you explicitly pass a name that doesn't exist.

isAnnotated(...)
isAnnotated(["name"], ["deannotate=False"]) -> tuple

Queries whether the named or selected object is a PDF annotation. Returns NONE if it is not. If deannotate=True is included, turns off PDF annotation flag and returns NONE. If frame is annotation, first value of tuple is type, and second is any additional information obtainable.

May raise WrongFrameTypeError if object is not a text frame.

setFileAnnotation(...)
setFileAnnotation(path, page, x, y, ["name"], ["absolute=True"])

Converts a text frame to a PDF link annotation to a file. path is the absolute or relative path to the file. page is the page in the document to link to, and x and y are the page coordinates. The currently selected frame will be converted unless another name is given. The default value for absolute is True, which means the path is absolute; if set to False the path is relative.

May raise NameExistsError if you explicitly pass a name that doesn't exist. May raise WrongFrameTypeError if object is not a text frame.

setJSActionScript(...)
setJSActionScript(which, script, ["name"]) -> string

Sets the JavaScript action for a particular event and returns NONE.

Also sets the annotation's action to JavaScript.

This functions accepts following arguments:

Page item must be an annotation or an error will be raised. May raise NameExistsError if you explicitly pass a name that doesn't exist.

setLinkAnnotation(...)
setLinkAnnotation(page, x, y, ["name"])

Converts a text frame to a PDF link annotation to a page in the current document. page is the page in the document to link to, and must be in the range of pages, starting with 1. x and y are the page coordinates. The currently selected frame will be converted unless another name is given.

May raise NameExistsError if you explicitly pass a name that doesn't exist. May raise WrongFrameTypeError if object is not a text frame.

setTextAnnotation(...)
setTextAnnotation(icon, isopen, ["name"])

Converts a text frame to a text annotation. Function accepts following arguments:

The currently selected frame will be converted unless another name is given.

May raise NameExistsError if you explicitly pass a name that doesn't exist. May raise WrongFrameTypeError if object is not a text frame.

setURIAnnotation(...)
setURIAnnotation(uri, ["name"])

Converts a text frame to a PDF URI link annotation. uri is the uri to link to. The currently selected frame will be converted unless another name is given.

May raise NameExistsError if you explicitly pass a name that doesn't exist. May raise WrongFrameTypeError if object is not a text frame.