Automatic Scripter Commands list: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
(scribus scripter commands list)
 
(scribus version)
Line 1: Line 1:
As of June 2018, here is the output of the automatic scripter's command collect script
As of June 2018, here is the output of the automatic scripter's command collect script on Scribus 1.5.5svn


<pre>
<pre>

Revision as of 19:22, 22 June 2018

As of June 2018, here is the output of the automatic scripter's command collect script on Scribus 1.5.5svn


CONSTANT:
ALIGN_BLOCK 
VALUE: integer
3

CONSTANT:
ALIGN_CENTERED 
VALUE: integer
1

CONSTANT:
ALIGN_FORCED 
VALUE: integer
4

CONSTANT:
ALIGN_LEFT 
VALUE: integer
0

CONSTANT:
ALIGN_RIGHT 
VALUE: integer
2

CONSTANT:
BUTTON_ABORT 
VALUE: integer
262144

CONSTANT:
BUTTON_CANCEL 
VALUE: integer
4194304

CONSTANT:
BUTTON_DEFAULT 
VALUE: integer
256

CONSTANT:
BUTTON_IGNORE 
VALUE: integer
1048576

CONSTANT:
BUTTON_NO 
VALUE: integer
65536

CONSTANT:
BUTTON_NONE 
VALUE: integer
0

CONSTANT:
BUTTON_OK 
VALUE: integer
1024

CONSTANT:
BUTTON_RETRY 
VALUE: integer
524288

CONSTANT:
BUTTON_YES 
VALUE: integer
16384

CONSTANT:
CAP_FLAT 
VALUE: integer
0

CONSTANT:
CAP_ROUND 
VALUE: integer
32

CONSTANT:
CAP_SQUARE 
VALUE: integer
16

CONSTANT:
COLOR 
VALUE: integer
14

CONSTANT:
COLOR_BURN 
VALUE: integer
11

CONSTANT:
COLOR_DODGE 
VALUE: integer
10

CONSTANT:
DARKEN 
VALUE: integer
1

CONSTANT:
DIFFERENCE 
VALUE: integer
8

CONSTANT:
DIRECTION_LTR 
VALUE: integer
0

CONSTANT:
DIRECTION_RTL 
VALUE: integer
1

CONSTANT:
EXCLUSION 
VALUE: integer
9

CONSTANT:
FACINGPAGES 
VALUE: integer
1

CONSTANT:
FILL_CROSSDIAGONALG 
VALUE: integer
4

CONSTANT:
FILL_DIAGONALG 
VALUE: integer
3

CONSTANT:
FILL_HORIZONTALG 
VALUE: integer
1

CONSTANT:
FILL_NOG 
VALUE: integer
0

CONSTANT:
FILL_RADIALG 
VALUE: integer
5

CONSTANT:
FILL_VERTICALG 
VALUE: integer
2

CONSTANT:
FIRSTPAGELEFT 
VALUE: integer
0

CONSTANT:
FIRSTPAGERIGHT 
VALUE: integer
1

CONSTANT:
HARD_LIGHT 
VALUE: integer
6

CONSTANT:
HUE 
VALUE: integer
12

CONSTANT:
ICON_CRITICAL 
VALUE: integer
3

CONSTANT:
ICON_INFORMATION 
VALUE: integer
1

CONSTANT:
ICON_NONE 
VALUE: integer
0

CONSTANT:
ICON_WARNING 
VALUE: integer
2

FUNCTION:
ImageExport

SYNTAX:
Image export

Class ImageExport() provides the bitmap graphics exporting
for Python scripting as you know it from Export/Save as Image
menu. See related class PDFfile() and procedure savePageAsEPS().
Example:
i = ImageExport()
i.type = 'PNG' # select one from i.allTypes list
i.scale = 200 # I want to have 200%
i.name = '/home/subik/test.png'
i.save()

two last lines should be replaced with:
i.saveAs('/home/subik/test.png')

CONSTANT:
JOIN_BEVEL 
VALUE: integer
64

CONSTANT:
JOIN_MITTER 
VALUE: integer
0

CONSTANT:
JOIN_ROUND 
VALUE: integer
128

CONSTANT:
LANDSCAPE 
VALUE: integer
1

CONSTANT:
LIGHTEN 
VALUE: integer
2

CONSTANT:
LINE_DASH 
VALUE: integer
2

CONSTANT:
LINE_DASHDOT 
VALUE: integer
4

CONSTANT:
LINE_DASHDOTDOT 
VALUE: integer
5

CONSTANT:
LINE_DOT 
VALUE: integer
3

CONSTANT:
LINE_SOLID 
VALUE: integer
1

CONSTANT:
LUMINOSITY 
VALUE: integer
15

CONSTANT:
MULTIPLY 
VALUE: integer
3

CONSTANT:
NOFACINGPAGES 
VALUE: integer
0

CONSTANT:
NORMAL 
VALUE: integer
0

CONSTANT:
OVERLAY 
VALUE: integer
5

CONSTANT:
PAGE_1 
VALUE: integer
0

CONSTANT:
PAGE_2 
VALUE: integer
1

CONSTANT:
PAGE_3 
VALUE: integer
2

CONSTANT:
PAGE_4 
VALUE: integer
3

TUPLE:
PAPER_A0 
VALUE:
(2380.0, 3368.0)

TUPLE:
PAPER_A0_MM 
VALUE:
(841.0, 1189.0)

TUPLE:
PAPER_A1 
VALUE:
(1684.0, 2380.0)

TUPLE:
PAPER_A1_MM 
VALUE:
(594.0, 841.0)

TUPLE:
PAPER_A2 
VALUE:
(1190.0, 1684.0)

TUPLE:
PAPER_A2_MM 
VALUE:
(420.0, 594.0)

TUPLE:
PAPER_A3 
VALUE:
(842.0, 1190.0)

TUPLE:
PAPER_A3_MM 
VALUE:
(297.0, 420.0)

TUPLE:
PAPER_A4 
VALUE:
(595.0, 842.0)

TUPLE:
PAPER_A4_MM 
VALUE:
(210.0, 297.0)

TUPLE:
PAPER_A5 
VALUE:
(421.0, 595.0)

TUPLE:
PAPER_A5_MM 
VALUE:
(148.0, 210.0)

TUPLE:
PAPER_A6 
VALUE:
(297.0, 421.0)

TUPLE:
PAPER_A6_MM 
VALUE:
(105.0, 148.0)

TUPLE:
PAPER_A7 
VALUE:
(210.0, 297.0)

TUPLE:
PAPER_A7_MM 
VALUE:
(74.0, 105.0)

TUPLE:
PAPER_A8 
VALUE:
(148.0, 210.0)

TUPLE:
PAPER_A8_MM 
VALUE:
(52.0, 74.0)

TUPLE:
PAPER_A9 
VALUE:
(105.0, 148.0)

TUPLE:
PAPER_A9_MM 
VALUE:
(37.0, 52.0)

TUPLE:
PAPER_B0 
VALUE:
(2836.0, 4008.0)

TUPLE:
PAPER_B0_MM 
VALUE:
(1000.0, 1414.0)

TUPLE:
PAPER_B1 
VALUE:
(2004.0, 2836.0)

TUPLE:
PAPER_B10 
VALUE:
(89.0, 125.0)

TUPLE:
PAPER_B10_MM 
VALUE:
(31.0, 44.0)

TUPLE:
PAPER_B1_MM 
VALUE:
(707.0, 1000.0)

TUPLE:
PAPER_B2 
VALUE:
(1418.0, 2004.0)

TUPLE:
PAPER_B2_MM 
VALUE:
(500.0, 707.0)

TUPLE:
PAPER_B3 
VALUE:
(1002.0, 1418.0)

TUPLE:
PAPER_B3_MM 
VALUE:
(353.0, 500.0)

TUPLE:
PAPER_B4 
VALUE:
(709.0, 1002.0)

TUPLE:
PAPER_B4_MM 
VALUE:
(250.0, 353.0)

TUPLE:
PAPER_B5 
VALUE:
(501.0, 709.0)

TUPLE:
PAPER_B5_MM 
VALUE:
(176.0, 250.0)

TUPLE:
PAPER_B6 
VALUE:
(355.0, 501.0)

TUPLE:
PAPER_B6_MM 
VALUE:
(125.0, 176.0)

TUPLE:
PAPER_B7 
VALUE:
(250.0, 355.0)

TUPLE:
PAPER_B7_MM 
VALUE:
(88.0, 125.0)

TUPLE:
PAPER_B8 
VALUE:
(178.0, 250.0)

TUPLE:
PAPER_B8_MM 
VALUE:
(62.0, 88.0)

TUPLE:
PAPER_B9 
VALUE:
(125.0, 178.0)

TUPLE:
PAPER_B9_MM 
VALUE:
(44.0, 62.0)

TUPLE:
PAPER_C5E 
VALUE:
(462.0, 649.0)

TUPLE:
PAPER_COMM10E 
VALUE:
(298.0, 683.0)

TUPLE:
PAPER_DLE 
VALUE:
(312.0, 624.0)

TUPLE:
PAPER_EXECUTIVE 
VALUE:
(542.0, 720.0)

TUPLE:
PAPER_FOLIO 
VALUE:
(595.0, 935.0)

TUPLE:
PAPER_LEDGER 
VALUE:
(1224.0, 792.0)

TUPLE:
PAPER_LEGAL 
VALUE:
(612.0, 1008.0)

TUPLE:
PAPER_LETTER 
VALUE:
(612.0, 792.0)

TUPLE:
PAPER_TABLOID 
VALUE:
(792.0, 1224.0)

FUNCTION:
PDFfile

SYNTAX:
Exporting PDF

Class PDFfile() provides the PDF exporting
for Python scripting as you know it from Save as PDF
menu. 
Example:
pdf = PDFfile()
pdf.thumbnails = 1 # generate thumbnails too
pdf.file = 'mypdf.pdf' 
pdf.save()

CONSTANT:
PORTRAIT 
VALUE: integer
0

FUNCTION:
Printer

SYNTAX:
Printing

Class Printer() provides printing for Python scripting.

Example:
p = Printer()
p.print()

CONSTANT:
SATURATION 
VALUE: integer
13

CONSTANT:
SCREEN 
VALUE: integer
4

CONSTANT:
SOFT_LIGHT 
VALUE: integer
7

CONSTANT:
UNIT_C 
VALUE: integer
5

CONSTANT:
UNIT_CENTIMETRES 
VALUE: integer
4

CONSTANT:
UNIT_CICERO 
VALUE: integer
5

CONSTANT:
UNIT_CM 
VALUE: integer
4

CONSTANT:
UNIT_IN 
VALUE: integer
2

CONSTANT:
UNIT_INCHES 
VALUE: integer
2

CONSTANT:
UNIT_MILLIMETERS 
VALUE: integer
1

CONSTANT:
UNIT_MM 
VALUE: integer
1

CONSTANT:
UNIT_P 
VALUE: integer
3

CONSTANT:
UNIT_PICAS 
VALUE: integer
3

CONSTANT:
UNIT_POINTS 
VALUE: integer
0

CONSTANT:
UNIT_PT 
VALUE: integer
0

STRING:
__name__ 
VALUE:
'__main__'

FUNCTION:
applyMasterPage

SYNTAX:
applyMasterPage(masterPageName, pageNumber)

Apply master page masterPageName on page pageNumber. 

CONSTANT:
c 
VALUE: float
0.0781865642238

FUNCTION:
changeColor

SYNTAX:
changeColor("name", c, m, y, k)

Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255. Note : deprecated, use changeColorCMYK() instead.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
changeColorCMYK

SYNTAX:
changeColorCMYK("name", c, m, y, k)

Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
changeColorCMYKFloat

SYNTAX:
changeColorCMYKFloat("name", c, m, y, k)

Changes the color "name" to the specified CMYK value. The color value is defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black. Color components are floating point values between 0 and 100.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
changeColorLab

SYNTAX:
changeColorLab("name", r, g, b)

Changes the color "name" to the specified CIELab values. The color value is defined via three components: L = luminosity, a = green/red, b = blue/yellow. Color components are floating point values with L between 0 and 100, a and b between -128 and 128.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
changeColorRGB

SYNTAX:
changeColorRGB("name", r, g, b)

Changes the color "name" to the specified RGB value. The color value is defined via three components r = red, g = green, b = blue. Color components should be in the range from 0 to 255.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
changeColorRGBFloat

SYNTAX:
changeColorRGBFloat("name", r, g, b)

Changes the color "name" to the specified RGB value. The color value is defined via three components r = red, g = green, b = blue. Color components are floating point values between 0 and 255.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
closeDoc

SYNTAX:
closeDoc()

Closes the current document without prompting to save.

May throw NoDocOpenError if there is no document to close 

FUNCTION:
closeMasterPage

SYNTAX:
closeMasterPage()

Closes the currently active master page, if any, and returns editing to normal. Begin editing with editMasterPage(). 

CONSTANT:
cm 
VALUE: float
0.0352777777778

FUNCTION:
copyObject

SYNTAX:
copyObject(["name"]) -> string

copies the selected Object (or Selection Group). 

FUNCTION:
createBezierLine

SYNTAX:
createBezierLine(list, ["name"]) -> string

Creates a new bezier curve and returns its name. The points for the bezier curve are stored in the list "list" in the following order: [x1, y1, kx1, ky1, x2, y2, kx2, ky2...xn. yn, kxn. kyn] In the points list, x and y mean the x and y coordinates of the point and kx and ky meaning the control point for the curve.  The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers. 

FUNCTION:
createCharStyle

SYNTAX:
createCharStyle(...)

Creates a character style. This function takes the following keyword parameters:

"name" [required] -> name of the char style to create

"font" [optional] -> name of the font to use

fontsize [optional] -> font size to set (double)

"features" [optional] -> nearer typographic details can be defined by a string that might contain the following phrases comma-seperated (without spaces!):

-> inherit

-> bold

-> italic

-> underline

-> underlinewords

-> strike

-> superscript

-> subscript

-> outline

-> shadowed

-> allcaps

-> smallcaps

"fillcolor" [optional], "fillshade" [optional] -> specify fill options

"strokecolor" [optional], "strokeshade" [optional] -> specify stroke options

baselineoffset [optional] -> offset of the baseline

shadowxoffset [optional], shadowyoffset [optional] -> offset of the shadow if used

outlinewidth [optional] -> width of the outline if used

underlineoffset [optional], underlinewidth [optional] -> underline options if used

strikethruoffset [optional], strikethruwidth [optional] -> strikethru options if used

scaleh [optional], scalev [optional] -> scale of the chars

tracking [optional] -> tracking of the text

"language" [optional] -> language code



FUNCTION:
createCustomLineStyle

SYNTAX:
createCustomLineStyle(styleName, style)

Creates the custom line style 'styleName'.

styleName -> name of the custom line style to create

This function takes list of dictionary as parameter for "style". Each dictionary represent one subline within style. Dictionary can have those keys:

	Color [optional] -> name of the color to use (string)

	Dash [optional] -> type of line to use (integer)

	LineEnd [optional] -> type of LineEnd to use (integer)

	LineJoin [optional] -> type of LineJoin to use (integer)

	Shade [optional] -> opacity of line (integer)

	Width [optional] -> width of line (double) 

FUNCTION:
createEllipse

SYNTAX:
createEllipse(x, y, width, height, ["name"]) -> string

Creates a new ellipse on the current page and returns its name. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. 

FUNCTION:
createImage

SYNTAX:
createImage(x, y, width, height, ["name"]) -> string

Creates a new picture frame on the current page and returns its name. The coordinates are given in the current measurement units of the document. "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. 

FUNCTION:
createLayer

SYNTAX:
createLayer(layer)

Creates a new layer with the name "name".

May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
createLine

SYNTAX:
createLine(x1, y1, x2, y2, ["name"]) -> string

Creates a new line from the point(x1, y1) to the point(x2, y2) and returns its name. The coordinates are given in the current measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. 

FUNCTION:
createMasterPage

SYNTAX:
createMasterPage(pageName)

Creates a new master page named pageName and opens it for editing. 

FUNCTION:
createParagraphStyle

SYNTAX:
createParagraphStyle(...)

Creates a paragraph style. This function takes the following keyword parameters:

"name" [required] -> specifies the name of the paragraphstyle to create

linespacingmode [optional] -> specifies the linespacing mode; possible modes are:

fixed linespacing:          0

automatic linespacing:      1

baseline grid linespacing:  2

linespacing [optional] -> specifies the linespacing if using fixed linespacing

alignment [optional] -> specifies the alignment of the paragraph

-> left:     0

-> center:   1

-> right:    2

-> justify:  3

-> extend:   4

leftmargin [optional], rightmargin [optional] -> specify the margin

gapbefore [optional], gapafter [optional] -> specify the gaps to the heading and following paragraphs

firstindent [optional] -> the indent of the first line

hasdropcap [optional] -> specifies if there are caps (1 = yes, 0 = no)

dropcaplines [optional] -> height (in lines) of the caps if used

dropcapoffset [optional] -> offset of the caps if used

"charstyle" [optional] -> char style to use



FUNCTION:
createPathText

SYNTAX:
createPathText(x, y, "textbox", "beziercurve", ["name"]) -> string

Creates a new pathText by merging the two objects "textbox" and "beziercurve" and returns its name. The coordinates are given in the current measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. May raise NotFoundError if one or both of the named base object don't exist. 

FUNCTION:
createPdfAnnotation

SYNTAX:
createPdfAnnotation(which,x,y,w,h,["name"])

Creates a pdf annotation.

Arguments: "which" is one of the following: (0 PDFBUTTON, 1 PDFRADIOBUTTON, 2 PDFTEXTFIELD, 3 PDFCHECKBOX, 4 PDFCOMBOBOX, 5 PDFLISTBOX, 6 PDFTEXTANNOTATION, 7 PDFLINKANNOTATION, 8 PDF3DANNOTATION) "x" and "y" are the coordinates where it will be placed. "w" is its width. "h" is its height. On systems without OSG installed a runtime error will be raised. "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.

Returns: The name of the newly created annotation.

May raise NameExistsError if you explicitly pass a name that's already used.



FUNCTION:
createPolyLine

SYNTAX:
createPolyLine(list, ["name"]) -> string

Creates a new polyline and returns its name. The points for the polyline are stored in the list "list" in the following order: [x1, y1, x2, y2...xn. yn]. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers. 

FUNCTION:
createPolygon

SYNTAX:
createPolygon(list, ["name"]) -> string

Creates a new polygon and returns its name. The points for the polygon are stored in the list "list" in the following order: [x1, y1, x2, y2...xn. yn]. At least three points are required. There is no need to repeat the first point to close the polygon. The polygon is automatically closed by connecting the first and the last point.  The coordinates are given in the current measurement units of the document (see UNIT constants).  "name" should be a unique identifier for the object because you need this name for further access to that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of points is passed or if the number of values passed don't group into points without leftovers. 

FUNCTION:
createRect

SYNTAX:
createRect(x, y, width, height, ["name"]) -> string

Creates a new rectangle on the current page and returns its name. The coordinates are given in the current measurement units of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name to reference that object in future. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. 

FUNCTION:
createTable

SYNTAX:
createTable(x, y, width, height, numRows, numColumns, ["name"]) -> string

Creates a new table with the given number of rows and columns on the actual page and returns its name. The coordinates are given in the actual measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. May raise ValueError if an insufficient number of rows or columns is passed. 

FUNCTION:
createText

SYNTAX:
createText(x, y, width, height, ["name"]) -> string

Creates a new text frame on the actual page and returns its name. The coordinates are given in the actual measurement unit of the document (see UNIT constants). "name" should be a unique identifier for the object because you need this name for further referencing of that object. If "name" is not given Scribus will create one for you.

May raise NameExistsError if you explicitly pass a name that's already used. 

FUNCTION:
currentPage

SYNTAX:
currentPage() -> integer

Returns the number of the current working page. Page numbers are counted from 1 upwards, no matter what the displayed first page number of your document is. 

FUNCTION:
defineColor

SYNTAX:
defineColor("name", c, m, y, k)

Defines a new color "name". The color Value is defined via four components: c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255. Note : deprecated, use defineColorCMYK() instead.

May raise ValueError if an invalid color name is specified. 

FUNCTION:
defineColorCMYK

SYNTAX:
defineColorCMYK("name", c, m, y, k)

Defines a new color "name". The color Value is defined via four components: c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in the range from 0 to 255.

May raise ValueError if an invalid color name is specified. 

FUNCTION:
defineColorCMYKFloat

SYNTAX:
defineColorCMYKFloat("name", c, m, y, k)

Defines a new color "name". The color Value is defined via four components: c = Cyan, m = Magenta, y = Yellow and k = Black. Color components are floating point values between 0 and 100.

May raise ValueError if an invalid color name is specified. 

FUNCTION:
defineColorLab

SYNTAX:
defineColorLab("name", r, g, b)

Defines a new color "name" using CIELab values. The color value is defined via three components: L = luminosity, a = green/red, b = blue/yellow. Color components are floating point values with L between 0 and 100, a and b between -128 and 128.

May raise ValueError if an invalid color name is specified. 

FUNCTION:
defineColorRGB

SYNTAX:
defineColorRGB("name", r, g, b)

Defines a new color "name". The color Value is defined via three components: r = red, g = green, b = blue. Color components should be in the range from 0 to 255.

May raise ValueError if an invalid color name is specified. 

FUNCTION:
defineColorRGBFloat

SYNTAX:
defineColorRGBFloat("name", r, g, b)

Defines a new color "name". The color Value is defined via three components: r = red, g = green, b = blue. Color components are floating point values between 0 and 255.

May raise ValueError if an invalid color name is specified. 

FUNCTION:
dehyphenateText

SYNTAX:
dehyphenateText(["name"]) -> bool

Does dehyphenation on text frame "name". If "name" is not given the currently selected item is used.

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
deleteColor

SYNTAX:
deleteColor("name", "replace")

Deletes the color "name". Every occurrence of that color is replaced by the color "replace". If not specified, "replace" defaults to the color "None" - transparent.

deleteColor works on the default document colors if there is no document open. In that case, "replace", if specified, has no effect.

May raise NotFoundError if a named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
deleteLayer

SYNTAX:
deleteLayer("layer")

Deletes the layer with the name "layer". Nothing happens if the layer doesn't exists or if it's the only layer in the document.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
deleteMasterPage

SYNTAX:
deleteMasterPage(pageName)

Delete the named master page. 

FUNCTION:
deleteObject

SYNTAX:
deleteObject(["name"])

Deletes the item with the name "name". If "name" is not given the currently selected item is deleted. 

FUNCTION:
deletePage

SYNTAX:
deletePage(nr)

Deletes the given page. Does nothing if the document contains only one page. Page numbers are counted from 1 upwards, no matter what the displayed first page number is.

May raise IndexError if the page number is out of range 

FUNCTION:
deleteText

SYNTAX:
deleteText(["name"])

Deletes any text in the text frame "name". If there is some text selected, only the selected text will be deleted. If "name" is not given the currently selected item is used. 

FUNCTION:
deselectAll

SYNTAX:
deselectAll()

Deselects all objects in the whole document. 

FUNCTION:
docChanged

SYNTAX:
docChanged(bool)

Enable/disable save icon in the Scribus icon bar and the Save menu item. It's useful to call this procedure when you're changing the document, because Scribus won't automatically notice when you change the document using a script. 

FUNCTION:
duplicateObject

SYNTAX:
duplicateObject(["name"]) -> string

creates a Duplicate of the selected Object (or Selection Group). 

FUNCTION:
editMasterPage

SYNTAX:
editMasterPage(pageName)

Enables master page editing and opens the named master page for editing. Finish editing with closeMasterPage(). 

FUNCTION:
exceptions

SYNTAX:
Python's standard exception class hierarchy.

Exceptions found here are defined both in the exceptions module and the
built-in namespace.  It is recommended that user-defined exceptions
inherit from Exception.  See the documentation for the exception
inheritance hierarchy.


FUNCTION:
fileDialog

SYNTAX:
fileDialog("caption", ["filter", "defaultname", haspreview, issave, isdir]) -> string with filename

Shows a File Open dialog box with the caption "caption". Files are filtered with the filter string "filter". A default filename or file path can also supplied, leave this string empty when you don't want to use it.  A value of True for haspreview enables a small preview widget in the FileSelect box.  When the issave parameter is set to True the dialog acts like a "Save As" dialog otherwise it acts like a "File Open Dialog". When the isdir parameter is True the dialog shows and returns only directories. The default for all of the optional parameters is False.

The filter, if specified, takes the form 'comment (*.type *.type2 ...)'. For example 'Images (*.png *.xpm *.jpg)'.

Refer to the Qt-Documentation for QFileDialog for details on filters.

Example: fileDialog('Open input', 'CSV files (*.csv)') Example: fileDialog('Save report', defaultname='report.txt', issave=True) 

FUNCTION:
fileQuit

SYNTAX:
fileQuit()

Quit Scribus. 

FUNCTION:
flipObject

SYNTAX:
flipObject(H,V,["name"])

Toggle the object "name" horizontal and/or vertical flip. If "name" is not given the currently selected item is used. 

FUNCTION:
getActiveLayer

SYNTAX:
getActiveLayer() -> string

Returns the name of the current active layer. 

FUNCTION:
getAllObjects

SYNTAX:
getAllObjects(["page"]) -> list

Returns a list containing the names of all objects on the current page. Takes an optional keyword argument that changes the page from which the objects are returned The page index starts at 0 and goes to the total number of pages - 1. 

FUNCTION:
getAllStyles

SYNTAX:
getAllStyles() -> list

Return a list of the names of all paragraph styles in the current document. 

FUNCTION:
getAllText

SYNTAX:
getAllText(["name"]) -> string

Returns the text of the text frame "name" and of all text frames which are linked with this frame. If this textframe has some text selected, the selected text is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getCellColumnSpan

SYNTAX:
getCellColumnSpan(row, column, ["name"]) -> int

Returns the column span of the cell at "row", "column" in the table "name" or -1 if the cell does not exist. If the cell is covered by another spanning cell, the column span of the spanning cell is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getCellFillColor

SYNTAX:
getCellFillColor(row, column, ["name"]) -> string

Returns the fill color of the cell at "row", "column" in the table "name" If "name" is not given the currently selected item is used. 

FUNCTION:
getCellRowSpan

SYNTAX:
getCellRowSpan(row, column, ["name"]) -> int

Returns the row span of the cell at "row", "column" in the table "name" or -1 if the cell does not exist. If the cell is covered by another spanning cell, the row span of the spanning cell is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getCellStyle

SYNTAX:
getCellStyle(row, column, ["name"]) -> string

Returns the named style of the cell at "row", "column" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if the cell does not exist. 

FUNCTION:
getCharStyles

SYNTAX:
getCharStyles() -> list

Return a list of the names of all character styles in the current document. 

FUNCTION:
getColor

SYNTAX:
getColor("name") -> tuple

Returns a tuple (C, M, Y, K) containing the four color components of the color "name" from the current document. If no document is open, returns the value of the named color from the default document colors.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
getColorAsRGB

SYNTAX:
getColorAsRGB("name") -> tuple

Returns a tuple (R,G,B) containing the three color components of the color "name" from the current document, converted to the RGB color space. If no document is open, returns the value of the named color from the default document colors.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
getColorAsRGBFloat

SYNTAX:
getColorAsRGBFloat("name") -> tuple

Returns a tuple (R,G,B) containing the three color components of the color "name" from the current document, converted to the RGB color space. Color components are floating point values between 0 and 255. If no document is open, returns the value of the named color from the default document colors.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
getColorFloat

SYNTAX:
getColorFloat("name") -> tuple

Returns a tuple (C, M, Y, K) containing the four color components of the color "name" from the current document. Color components are floating point values between 0 and 100. If no document is open, returns the value of the named color from the default document colors.

May raise NotFoundError if the named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
getColorNames

SYNTAX:
getColorNames() -> list

Returns a list containing the names of all defined colors in the document. If no document is open, returns a list of the default document colors. 

FUNCTION:
getColumnGap

SYNTAX:
getColumnGap(["name"]) -> float

Returns the column gap size of the text frame "name" expressed in points. If "name" is not given the currently selected item is used. 

FUNCTION:
getColumns

SYNTAX:
getColumns(["name"]) -> integer

Gets the number of columns of the text frame "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getCornerRadius

SYNTAX:
getCornerRadius(["name"]) -> integer

Returns the corner radius of the object "name". The radius is expressed in points. If "name" is not given the currently selected item is used. 

FUNCTION:
getCustomLineStyle

SYNTAX:
getCustomLineStyle(["name"]) -> string

Returns the styleName of custom line style for the object. If object's "name" is not given the currently selected item is used. 

FUNCTION:
getDocName

SYNTAX:
getDocName() -> string

Returns the name the document was saved under. If the document was not saved before the name is empty. 

FUNCTION:
getFillBlendmode

SYNTAX:
getFillBlendmode(["name"]) -> integer

Returns the fill blendmode of the object "name". If "name" is not given the currently selected Item is used. 

FUNCTION:
getFillColor

SYNTAX:
getFillColor(["name"]) -> string

Returns the name of the fill color of the object "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getFillShade

SYNTAX:
getFillShade(["name"]) -> integer

Returns the shading value of the fill color of the object "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getFillTransparency

SYNTAX:
getFillTransparency(["name"]) -> float

Returns the fill transparency of the object "name". If "name" is not given the currently selected Item is used. 

FUNCTION:
getFont

SYNTAX:
getFont(["name"]) -> string

Returns the font name for the text frame "name". If this text frame has some text selected the value assigned to the first character of the selection is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getFontFeatures

SYNTAX:
getFontFeatures(["name"]) -> string

Returns the font features for the text frame "name". If this text frame has some text selected the value assigned to the first character of the selection is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getFontNames

SYNTAX:
getFontNames() -> list

Returns a list with the names of all available fonts. 

FUNCTION:
getFontSize

SYNTAX:
getFontSize(["name"]) -> float

Returns the font size in points for the text frame "name". If this text frame has some text selected the value assigned to the first character of the selection is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getGuiLanguage

SYNTAX:
getGuiLanguage() -> string

Returns a string with the -lang value. 

FUNCTION:
getHGuides

SYNTAX:
getHGuides() -> list

Returns a list containing positions of the horizontal guides. Values are in the document's current units - see UNIT_<type> constants. 

FUNCTION:
getImageFile

SYNTAX:
getImageFile(["name"]) -> string

Returns the filename for the image in the image frame. If "name" is not given the currently selected item is used. 

FUNCTION:
getImageScale

SYNTAX:
getImageScale(["name"]) -> (x,y)

Returns a (x, y) tuple containing the scaling values of the image frame "name".  If "name" is not given the currently selected item is used. 

FUNCTION:
getLayerBlendmode

SYNTAX:
getLayerBlendmode("layer") -> int

Returns the "layer" layer blendmode,

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
getLayerTransparency

SYNTAX:
getLayerTransparency("layer") -> float

Returns the "layer" layer transparency,

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
getLayers

SYNTAX:
getLayers() -> list

Returns a list with the names of all defined layers. 

FUNCTION:
getLineBlendmode

SYNTAX:
getLineBlendmode(["name"]) -> integer

Returns the line blendmode of the object "name". If "name" is not given the currently selected Item is used. 

FUNCTION:
getLineCap

SYNTAX:
getLineCap(["name"]) -> integer (see constants)

Returns the line cap style of the object "name". If "name" is not given the currently selected item is used. The cap types are: CAP_FLAT, CAP_ROUND, CAP_SQUARE 

FUNCTION:
getLineColor

SYNTAX:
getLineColor(["name"]) -> string

Returns the name of the line color of the object "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getLineJoin

SYNTAX:
getLineJoin(["name"]) -> integer (see constants)

Returns the line join style of the object "name". If "name" is not given the currently selected item is used.  The join types are: JOIN_BEVEL, JOIN_MITTER, JOIN_ROUND 

FUNCTION:
getLineShade

SYNTAX:
getLineShade(["name"]) -> integer

Returns the shading value of the line color of the object "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getLineSpacing

SYNTAX:
getLineSpacing(["name"]) -> float

Returns the line spacing ("leading") of the text frame "name" expressed in points. If "name" is not given the currently selected item is used. 

FUNCTION:
getLineStyle

SYNTAX:
getLineStyle(["name"]) -> integer (see constants)

Returns the line style of the object "name". If "name" is not given the currently selected item is used. Line style constants are: LINE_DASH, LINE_DASHDOT, LINE_DASHDOTDOT, LINE_DOT, LINE_SOLID 

FUNCTION:
getLineTransparency

SYNTAX:
getLineTransparency(["name"]) -> float

Returns the line transparency of the object "name". If "name" is not given the currently selected Item is used. 

FUNCTION:
getLineWidth

SYNTAX:
getLineWidth(["name"]) -> integer

Returns the line width of the object "name". If "name" is not given the currently selected Item is used. 

FUNCTION:
getMasterPage

SYNTAX:
getMasterPage(nr)

Get Master Page of the page "nr".

May raise IndexError if the page number is out of range. 

FUNCTION:
getObjectAttributes

SYNTAX:
getObjectAttributes(["name"]) -> list Returns a list containing all attributes of object "name". 

FUNCTION:
getObjectType

SYNTAX:
getObjectType(["name"]) -> string

Get type of object "name" as a string. 

FUNCTION:
getPageItems

SYNTAX:
getPageItems() -> list

Returns a list of tuples with items on the current page. The tuple is: (name, objectType, order) E.g. [('Text1', 4, 0), ('Image1', 2, 1)] means that object named 'Text1' is a text frame (type 4) and is the first at the page... 

FUNCTION:
getPageMargins

SYNTAX:
getPageMargins()

Returns the document page margins as a (top, left, right, bottom) tuple in the document's current units. See UNIT_<type> constants and getPageSize(). 

FUNCTION:
getPageNMargins

SYNTAX:
getPageNMargins(nr) -> tuple

Returns a tuple with a particular page's margins measured in the document's current units. See UNIT_<type> constants and getPageMargins() 

FUNCTION:
getPageNSize

SYNTAX:
getPageNSize(nr) -> tuple

Returns a tuple with a particular page's size measured in the document's current units. See UNIT_<type> constants and getPageMargins() 

FUNCTION:
getPageSize

SYNTAX:
getPageSize() -> tuple

Returns a tuple with document page dimensions measured in the document's current units. See UNIT_<type> constants and getPageMargins() 

FUNCTION:
getPageType

SYNTAX:
getPageType() -> integer

Returns the type of the Page, 0 means left Page, 1 is a middle Page and 2 is a right Page 

FUNCTION:
getPosition

SYNTAX:
getPosition(["name"]) -> (x,y)

Returns a (x, y) tuple with the position of the object "name". If "name" is not given the currently selected item is used. The position is expressed in the actual measurement unit of the document - see UNIT_<type> for reference. 

FUNCTION:
getProperty

SYNTAX:
getProperty(object, property)

Return the value of the property `property' of the passed `object'.

The `object' argument may be a string, in which case the named PageItem is searched for. It may also be a PyCObject, which may point to any C++ QObject instance.

The `property' argument must be a string, and is the name of the property to look up on `object'.

The return value varies depending on the type of the property. 

FUNCTION:
getPropertyCType

SYNTAX:
getPropertyCType(object, property, includesuper=True)

Returns the name of the C type of `property' of `object'. See getProperty() for details of arguments.

If `includesuper' is true, search inherited properties too. 

FUNCTION:
getPropertyNames

SYNTAX:
getPropertyNames(object, includesuper=True)

Return a list of property names supported by `object'. If `includesuper' is true, return properties supported by parent classes as well. 

FUNCTION:
getRotation

SYNTAX:
getRotation(["name"]) -> integer

Returns the rotation of the object "name". The value is expressed in degrees, and clockwise is positive. If "name" is not given the currently selected item is used. 

FUNCTION:
getSelectedObject

SYNTAX:
getSelectedObject([nr]) -> string

Returns the name of the selected object. "nr" if given indicates the number of the selected object, e.g. 0 means the first selected object, 1 means the second selected Object and so on. 

FUNCTION:
getSize

SYNTAX:
getSize(["name"]) -> (width,height)

Returns a (width, height) tuple with the size of the object "name". If "name" is not given the currently selected item is used. The size is expressed in the current measurement unit of the document - see UNIT_<type> for reference. 

FUNCTION:
getTableColumnWidth

SYNTAX:
getTableColumnWidth(column, ["name"]) -> float

Returns the column width of "column" in the table "name" expressed in points, or 0.0 if the column does not exist. If "name" is not given the currently selected item is used. 

FUNCTION:
getTableColumns

SYNTAX:
getTableColumns(["name"]) -> integer

Gets the number of columns in the table "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getTableFillColor

SYNTAX:
getTableFillColor(["name"]) -> string

Returns the fill color of the table "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getTableRowHeight

SYNTAX:
getTableRowHeight(row, ["name"]) -> float

Returns the row height of "row" in the table "name" expressed in points, or 0.0 if the row does not exist. If "name" is not given the currently selected item is used. 

FUNCTION:
getTableRows

SYNTAX:
getTableRows(["name"]) -> integer

Gets the number of rows in the table "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getTableStyle

SYNTAX:
getTableStyle(["name"]) -> string

Returns the named style of the table "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getText

SYNTAX:
getText(["name"]) -> string

Returns the text of the text frame "name". If this text frame has some text selected, the selected text is returned. All text in the frame, not just currently visible text, is returned. If "name" is not given the currently selected item is used. 

FUNCTION:
getTextColor

SYNTAX:
getLineColor(["name"]) -> string

Returns the name of the line color of the object "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getTextDistances

SYNTAX:
getTextDistances(["name"]) -> tuple

Returns the text distances of the text frame "name" expressed in points. The distances are returned as a tuple like (left, right, top, bottom). If "name" is not given the currently selected item is used. 

FUNCTION:
getTextLength

SYNTAX:
getTextLength(["name"]) -> integer

Returns the length of the text in the text frame "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getTextLines

SYNTAX:
getTextLines(["name"]) -> integer

Returns the number of lines of the text in the text frame "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getTextShade

SYNTAX:
getLineShade(["name"]) -> integer

Returns the shading value of the line color of the object "name". If "name" is not given the currently selected item is used. 

FUNCTION:
getUnit

SYNTAX:
getUnit() -> integer (Scribus unit constant)

Returns the measurement units of the document. The returned value will be one of the UNIT_* constants: UNIT_INCHES, UNIT_MILLIMETERS, UNIT_PICAS, UNIT_POINTS. 

FUNCTION:
getVGuides

SYNTAX:
getVGuides()

See getHGuides. 

FUNCTION:
getXFontNames

SYNTAX:
getXFontNames() -> list of tuples

Returns a larger font info. It's a list of the tuples with: [ (Scribus name, Family, Real name, subset (1|0), embed PS (1|0), font file), (...), ... ] 

FUNCTION:
getval

SYNTAX:
Scribus internal.

FUNCTION:
gotoPage

SYNTAX:
gotoPage(nr)

Moves to the page "nr" (that is, makes the current page "nr"). Note that gotoPage doesn't (currently) change the page the user's view is displaying, it just sets the page that script commands will operates on.

May raise IndexError if the page number is out of range. 

FUNCTION:
groupObjects

SYNTAX:
groupObjects(list) -> string

Groups the objects named in "list" together. "list" must contain the names of the objects to be grouped. If "list" is not given the currently selected items are used. Returns the group name for further referencing. 

FUNCTION:
haveDoc

SYNTAX:
haveDoc() -> int

Returns the quantity of open documents: 0 if none are opened. 

FUNCTION:
hyphenateText

SYNTAX:
hyphenateText(["name"]) -> bool

Does hyphenation on text frame "name". If "name" is not given the currently selected item is used.

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
importPage

SYNTAX:
importPage("fromDoc", (pageList), [create, imortwhere, importwherePage])

Imports a set of pages (given as a tuple) from an existing document (the file name must be given). This functions maps the "Page->Import" dropdown menu function. fromDoc: string; the filename of the document to import pages from pageList: tuple with page numbers of pages to import create: number; 0 to replace existing pages, 1 (default) to insert new pages importWhere: number; the page number (of the current document) at which import the pages importWherePage: number; used if create==1; 0 to create pages before selected page; 1 to create pages after selected page; 2 (default) to create pages at the end of the document 

CONSTANT:
inch 
VALUE: float
0.0138888888889

FUNCTION:
insertHtmlText

SYNTAX:
insertHTMLText("file", ["name"])

Inserts the text from "file" into the text frame "name". Text must be UTF encoded (see setText() as reference). If "name" is not given the currently selected Item is used. 

FUNCTION:
insertTableColumns

SYNTAX:
insertTableColumns(index, numColumns, ["name"])

Inserts "numColumns" columns before the column at "index" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if number of columns is not at least one or index is out of bounds. 

FUNCTION:
insertTableRows

SYNTAX:
insertTableRows(index, numRows, ["name"])

Inserts "numRows" rows before the row at "index" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if number of rows is not at least one or index is out of bounds. 

FUNCTION:
insertText

SYNTAX:
insertText("text", pos, ["name"])

Inserts the text "text" at the position "pos" into the text frame "name". Text must be UTF encoded (see setText() as reference) The first character has an index of 0. Inserting text at position -1 appends it to the frame. If "name" is not given the currently selected Item is used.

May throw IndexError for an insertion out of bounds. 

FUNCTION:
isAnnotated

SYNTAX:
isAnnotated(["name"],["deannotate=False"])

Queries the item to see if it has a Pdf annotation.

Arguments: "name" uses the currently selected item if not given.

Keyword Arguments: "deannotate" if set to True will turn off the annotation flag

Returns: A tuple with a string at 0 that indicates what type of pdf annotation it is.  A dictionary is in index 1 that contains data the function was able to gather. If the item is not a pdf annotation returns None. Passing the keyword parameter deannotate=True returns None.

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
isLayerFlow

SYNTAX:
isLayerFlow("layer") -> bool

Returns whether text flows around objects on layer "layer", a value of True means that text flows around, a value of False means that the text does not flow around.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
isLayerLocked

SYNTAX:
isLayerLocked("layer") -> bool

Returns whether the layer "layer" is locked or not, a value of True means that the layer "layer" is editable, a value of False means that the layer "layer" is locked.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
isLayerOutlined

SYNTAX:
isLayerOutlined("layer") -> bool

Returns whether the layer "layer" is outlined or not, a value of True means that the layer "layer" is outlined, a value of False means that the layer "layer" is normal.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
isLayerPrintable

SYNTAX:
isLayerPrintable("layer") -> bool

Returns whether the layer "layer" is printable or not, a value of True means that the layer "layer" can be printed, a value of False means that printing the layer "layer" is disabled.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
isLayerVisible

SYNTAX:
isLayerVisible("layer") -> bool

Returns whether the layer "layer" is visible or not, a value of True means that the layer "layer" is visible, a value of False means that the layer "layer" is invisible.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
isLocked

SYNTAX:
isLocked(["name"]) -> bool

Returns true if is the object "name" locked.  If "name" is not given the currently selected item is used. 

FUNCTION:
isPDFBookmark

SYNTAX:
isPDFBookmark(["name"]) -> bool

Returns true if the text frame "name" is a PDF bookmark. If "name" is not given the currently selected item is used.

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
isSpotColor

SYNTAX:
isSpotColor("name") -> bool

Returns True if the color "name" is a spot color. See also setSpotColor()

May raise NotFoundError if a named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
linkTextFrames

SYNTAX:
linkTextFrames("fromname", "toname")

Link two text frames. The frame named "fromname" is linked to the frame named "toname". The target frame must be an empty text frame and must not link to or be linked from any other frames already.

May throw ScribusException if linking rules are violated. 

FUNCTION:
loadImage

SYNTAX:
loadImage("filename" [, "name"])

Loads the picture "picture" into the image frame "name". If "name" is not given the currently selected item is used.

May raise WrongFrameTypeError if the target frame is not an image frame 

FUNCTION:
loadStylesFromFile

SYNTAX:
loadStylesFromFile("filename")

Loads paragraph styles from the Scribus document at "filename" into the current document. 

FUNCTION:
lockObject

SYNTAX:
lockObject(["name"]) -> bool

Locks the object "name" if it's unlocked or unlock it if it's locked. If "name" is not given the currently selected item is used. Returns true if locked. 

FUNCTION:
masterPageNames

SYNTAX:
masterPageNames()

Returns a list of the names of all master pages in the document. 

FUNCTION:
mergeTableCells

SYNTAX:
mergeTableCells(row, column, numRows, numColumns, ["name"])

Merges the cell at the specified "row" and "column" with the adjacent cells into one cell.

May throw ValueError if number if numRows or numColumns is less than 1 or the specified area is out of bounds. 

FUNCTION:
messageBox

SYNTAX:
messageBox("caption", "message",     icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,     button2=BUTTON_NONE, button3=BUTTON_NONE) -> integer

Displays a message box with the title "caption", the message "message", and an icon "icon" and up to 3 buttons. By default no icon is used and a single button, OK, is displayed. Only the caption and message arguments are required, though setting an icon and appropriate button(s) is strongly recommended. The message text may contain simple HTML-like markup.

Returns the number of the button the user pressed. Button numbers start at 1.

For the icon and the button parameters there are predefined constants available with the same names as in the Qt Documentation. These are the BUTTON_* and ICON_* constants defined in the module. There are also two extra constants that can be binary-ORed with button constants:     BUTTONOPT_DEFAULT   Pressing enter presses this button.     BUTTONOPT_ESCAPE    Pressing escape presses this button.

Usage examples: result = messageBox('Script failed',                     'This script only works when you have a text frame selected.',                     ICON_ERROR) result = messageBox('Monkeys!', 'Something went ook! <i>Was it a monkey?</i>',                     ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,                     BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)

Defined button and icon constants: BUTTON_NONE, BUTTON_ABORT, BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, BUTTON_YES, BUTTON_YESALL, ICON_NONE, ICON_INFORMATION, ICON_WARNING, ICON_CRITICAL. 

FUNCTION:
messagebarText

SYNTAX:
messagebarText("string")

Writes the "string" into the Scribus message bar (status line). The text must be UTF8 encoded or 'unicode' string(recommended). 

CONSTANT:
mm 
VALUE: float
0.352777777778

FUNCTION:
moveObject

SYNTAX:
moveObject(dx, dy [, "name"])

Moves the object "name" by dx and dy relative to its current position. The distances are expressed in the current measurement unit of the document (see UNIT constants). If "name" is not given the currently selected item is used. If the object "name" belongs to a group, the whole group is moved. 

FUNCTION:
moveObjectAbs

SYNTAX:
moveObjectAbs(x, y [, "name"])

Moves the object "name" to a new location. The coordinates are expressed in the current measurement unit of the document (see UNIT constants).  If "name" is not given the currently selected item is used.  If the object "name" belongs to a group, the whole group is moved. 

FUNCTION:
moveSelectionToBack

SYNTAX:
moveSelectionToBack()

Moves current selection to back. 

FUNCTION:
moveSelectionToFront

SYNTAX:
moveSelectionToFront()

Moves current selection to front. 

FUNCTION:
newDoc

SYNTAX:
newDoc(size, margins, orientation, firstPageNumber,                    unit, facingPages, firstSideLeft) -> bool

WARNING: Obsolete procedure! Use newDocument instead.

Creates a new document and returns true if successful. The parameters have the following meaning:

    size = A tuple (width, height) describing the size of the document. You can     use predefined constants named PAPER_<paper_type> e.g. PAPER_A4 etc.

    margins = A tuple (left, right, top, bottom) describing the document     margins

    orientation = the page orientation - constants PORTRAIT, LANDSCAPE

    firstPageNumer = is the number of the first page in the document used for     pagenumbering. While you'll usually want 1, it's useful to have higher     numbers if you're creating a document in several parts.

    unit: this value sets the measurement units used by the document. Use a     predefined constant for this, one of: UNIT_INCHES, UNIT_MILLIMETERS,     UNIT_PICAS, UNIT_POINTS.

    facingPages = FACINGPAGES, NOFACINGPAGES

    firstSideLeft = FIRSTPAGELEFT, FIRSTPAGERIGHT

The values for width, height and the margins are expressed in the given unit for the document. PAPER_* constants are expressed in points. If your document is not in points, make sure to account for this.

example: newDoc(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 1, UNIT_POINTS,                 FACINGPAGES, FIRSTPAGERIGHT) 

FUNCTION:
newDocDialog

SYNTAX:
newDocDialog() -> bool

Displays the "New Document" dialog box. Creates a new document if the user accepts the settings. Does not create a document if the user presses cancel. Returns true if a new document was created. 

FUNCTION:
newDocument

SYNTAX:
newDocument(size, margins, orientation, firstPageNumber,                         unit, pagesType, firstPageOrder, numPages) -> bool

Creates a new document and returns true if successful. The parameters have the following meaning:

size = A tuple (width, height) describing the size of the document. You can use predefined constants named PAPER_<paper_type> e.g. PAPER_A4 etc.

margins = A tuple (left, right, top, bottom) describing the document margins

orientation = the page orientation - constants PORTRAIT, LANDSCAPE

firstPageNumer = is the number of the first page in the document used for pagenumbering. While you'll usually want 1, it's useful to have higher numbers if you're creating a document in several parts.

unit: this value sets the measurement units used by the document. Use a predefined constant for this, one of: UNIT_INCHES, UNIT_MILLIMETERS, UNIT_PICAS, UNIT_POINTS.

pagesType = One of the predefined constants PAGE_n. PAGE_1 is single page, PAGE_2 is for facing pages documents, PAGE_3 is for 3 pages fold and PAGE_4 is 4-fold.

firstPageOrder = What is position of first page in the document. Indexed from 0 (0 = first).

numPage = Number of pages to be created.

The values for width, height and the margins are expressed in the given unit for the document. PAPER_* constants are expressed in points. If your document is not in points, make sure to account for this.

example: newDocument(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 7, UNIT_POINTS, PAGE_4, 3, 1)

May raise ScribusError if is firstPageOrder bigger than allowed by pagesType. 

FUNCTION:
newPage

SYNTAX:
newPage(where [,"masterpage"])

Creates a new page. If "where" is -1 the new Page is appended to the document, otherwise the new page is inserted before "where". Page numbers are counted from 1 upwards, no matter what the displayed first page number of your document is. The optional parameter "masterpage" specifies the name of the master page for the new page.

May raise IndexError if the page number is out of range 

FUNCTION:
newStyleDialog

SYNTAX:
newStyleDialog() -> string

Shows 'Create new paragraph style' dialog. Function returns real style name or None when user cancels the dialog. 

FUNCTION:
objectExists

SYNTAX:
objectExists(["name"]) -> bool

Test if an object with specified name really exists in the document. The optional parameter is the object name. When no object name is given, returns True if there is something selected. 

FUNCTION:
openDoc

SYNTAX:
openDoc("name")

Opens the document "name".

May raise ScribusError if the document could not be opened. 

CONSTANT:
p 
VALUE: float
1.0

FUNCTION:
pageCount

SYNTAX:
pageCount() -> integer

Returns the number of pages in the document. 

FUNCTION:
pageDimension

SYNTAX:
Obsolete function. Don't use it.

FUNCTION:
pasteObject

SYNTAX:
pasteObject(["name"]) -> string

pastes a Duplicate of the selected Object (or Selection Group). 

FUNCTION:
placeEPS

SYNTAX:
placeEPS("filename", x, y)

Places the EPS "filename" onto the current page, x and y specify the coordinate of the topleft corner of the EPS placed on the page

If loading was successful, the selection contains the imported EPS 

FUNCTION:
placeODG

SYNTAX:
placeODG("filename", x, y)

Places the ODG "filename" onto the current page, x and y specify the coordinate of the topleft corner of the ODG placed on the page

If loading was successful, the selection contains the imported ODG 

FUNCTION:
placeSVG

SYNTAX:
placeSVG("filename", x, y)

Places the SVG "filename" onto the current page, x and y specify the coordinate of the topleft corner of the SVG placed on the page

If loading was successful, the selection contains the imported SVG 

FUNCTION:
placeSXD

SYNTAX:
placeSXD("filename", x, y)

Places the SXD "filename" onto the current page, x and y specify the coordinate of the topleft corner of the SXD placed on the page

If loading was successful, the selection contains the imported SXD 

FUNCTION:
placeVectorFile

SYNTAX:
placeVectorFile("filename", x, y)

Places the vector graphic "filename" onto the current page, x and y specify the coordinate of the topleft corner of the graphic placed on the page

If loading was successful, the selection contains the imported graphic 

FUNCTION:
progressReset

SYNTAX:
progressReset()

Cleans up the Scribus progress bar previous settings. It is called before the new progress bar use. See progressSet. 

FUNCTION:
progressSet

SYNTAX:
progressSet(nr)

Set the progress bar position to "nr", a value relative to the previously set progressTotal. The progress bar uses the concept of steps; you give it the total number of steps and the number of steps completed so far and it will display the percentage of steps that have been completed. You can specify the total number of steps with progressTotal(). The current number of steps is set with progressSet(). The progress bar can be rewound to the beginning with progressReset(). [based on info taken from Trolltech's Qt docs] 

FUNCTION:
progressTotal

SYNTAX:
progressTotal(max)

Sets the progress bar's maximum steps value to the specified number. See progressSet. 

CONSTANT:
pt 
VALUE: float
1.0

FUNCTION:
readPDFOptions

SYNTAX:
readPDFOptions(fileName)

Read PDF options from fileName. 

FUNCTION:
redrawAll

SYNTAX:
redrawAll()

Redraws all pages. 

FUNCTION:
removeTableColumns

SYNTAX:
removeTableColumns(index, numColumns, ["name"])

Removes "numColumns" columns from the table "name" starting with the column at "index". If "name" is not given the currently selected item is used.

May throw ValueError if number of columns is not at least one or the range to be deleted is out of bounds. 

FUNCTION:
removeTableRows

SYNTAX:
removeTableRows(index, numRows, ["name"])

Removes "numRows" rows from the table "name" starting with the row at "index". If "name" is not given the currently selected item is used.

May throw ValueError if number of rows is not at least one or the range to be deleted is out of bounds. 

FUNCTION:
renderFont

SYNTAX:
renderFont("name", "filename", "sample", size, format="PPM") -> bool

Creates an image preview of font "name" with given text "sample" and size. If "filename" is not "", image is saved into "filename". Otherwise image data is returned as a string. The optional "format" argument specifies the image format to generate, and supports any format allowed by QPixmap.save(). Common formats are PPM, JPEG, PNG and XPM.

May raise NotFoundError if the specified font can't be found. May raise ValueError if an empty sample or filename is passed. 

FUNCTION:
replaceColor

SYNTAX:
replaceColor("name", "replace")

Every occurence of the color "name" is replaced by the color "replace".

May raise NotFoundError if a named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
resizeTableColumn

SYNTAX:
resizeTableColumn(column, width, ["name"])

Resizes "column" to "width" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if the width is less than 0 or the column does not exist. 

FUNCTION:
resizeTableRow

SYNTAX:
resizeTableRow(row, height, ["name"])

Resizes "row" to "height" in the table "name". If "name" is not given the currently selected item is used.

May throw ValueError if the height is less than 0 or the row does not exist. 

FUNCTION:
retval

SYNTAX:
Scribus internal.

FUNCTION:
rotateObject

SYNTAX:
rotateObject(rot [, "name"])

Rotates the object "name" by "rot" degrees relatively. The object is rotated by the vertex that is currently selected as the rotation point - by default, the top left vertex at zero rotation. Positive values mean counter clockwise rotation when the default rotation point is used. If "name" is not given the currently selected item is used. 

FUNCTION:
rotateObjectAbs

SYNTAX:
rotateObjectAbs(rot [, "name"])

Sets the rotation of the object "name" to "rot". Positive values mean counter clockwise rotation. If "name" is not given the currently selected item is used. 

FUNCTION:
saveDoc

SYNTAX:
saveDoc()

Saves the current document with its current name, returns true if successful. If the document has not already been saved, this may bring up an interactive save file dialog.

If the save fails, there is currently no way to tell. 

FUNCTION:
saveDocAs

SYNTAX:
saveDocAs("name")

Saves the current document under the new name "name" (which may be a full or relative path).

May raise ScribusError if the save fails. 

FUNCTION:
savePDFOptions

SYNTAX:
savePDFOptions(fileName)

Save PDF options to fileName. 

FUNCTION:
savePageAsEPS

SYNTAX:
savePageAsEPS("name")

Saves the current page as an EPS to the file "name".

May raise ScribusError if the save failed. 

FUNCTION:
scaleGroup

SYNTAX:
scaleGroup(factor [,"name"])

Scales the group the object "name" belongs to. Values greater than 1 enlarge the group, values smaller than 1 make the group smaller e.g a value of 0.5 scales the group to 50 % of its original size, a value of 1.5 scales the group to 150 % of its original size.  The value for "factor" must be greater than 0. If "name" is not given the currently selected item is used.

May raise ValueError if an invalid scale factor is passed. 

FUNCTION:
scaleImage

SYNTAX:
scaleImage(x, y [, "name"])

Sets the internal scaling factors of the picture in the image frame "name". If "name" is not given the currently selected item is used. A number of 1 means 100 %. Internal scaling factors are different from the values shown on  properties palette. Note : deprecated, use setImageScale() instead.

May raise WrongFrameTypeError if the target frame is not an image frame 

STRING:
scribus_version 
VALUE:
'1.5.5.svn'

TUPLE:
scribus_version_info 
VALUE:
(1, 5, 5, '.svn', 0)

FUNCTION:
scrollDocument

SYNTAX:
scrollDocument(x,y)

Scroll the document in main GUI window by x and y. 

FUNCTION:
selectObject

SYNTAX:
selectObject("name")

Selects the object with the given "name". 

FUNCTION:
selectText

SYNTAX:
selectText(start, count, ["name"])

Selects "count" characters of text in the text frame "name" starting from the character "start". Character counting starts at 0. If "count" is zero, any text selection will be cleared.  If "name" is not given the currently selected item is used.

May throw IndexError if the selection is outside the bounds of the text. 

FUNCTION:
selectionCount

SYNTAX:
selectionCount() -> integer

Returns the number of selected objects. 

FUNCTION:
sentToLayer

SYNTAX:
sentToLayer("layer" [, "name"])

Sends the object "name" to the layer "layer". The layer must exist. If "name" is not given the currently selected item is used.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setActiveLayer

SYNTAX:
setActiveLayer("name")

Sets the active layer to the layer named "name".

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setBaseLine

SYNTAX:
setBaseLine(grid, offset)

Sets the base line settings of the document, grid spacing(grid), grid offset(offset). Values are given in the measurement units of the document - see UNIT_<type> constants. 

FUNCTION:
setCellBottomBorder

SYNTAX:
setCellBottomBorder(row, column, borderLines, ["name"])

Sets the bottom border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format. 

FUNCTION:
setCellBottomPadding

SYNTAX:
setCellBottomPadding(row, column, padding, ["name"])

Sets the bottom padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" is less than 0. 

FUNCTION:
setCellFillColor

SYNTAX:
setCellFillColor(row, column, color, ["name"])

Sets the fill color of the cell at "row", "column" in the table "name" to "color". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist. 

FUNCTION:
setCellLeftBorder

SYNTAX:
setCellLeftBorder(row, column, borderLines, ["name"])

Sets the left border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format. 

FUNCTION:
setCellLeftPadding

SYNTAX:
setCellLeftPadding(row, column, padding, ["name"])

Sets the left padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" less than 0. 

FUNCTION:
setCellRightBorder

SYNTAX:
setCellRightBorder(row, column, borderLines, ["name"])

Sets the right border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format. 

FUNCTION:
setCellRightPadding

SYNTAX:
setCellRightPadding(row, column, padding, ["name"])

Sets the right padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" less than 0. 

FUNCTION:
setCellStyle

SYNTAX:
setCellStyle(row, column, style, ["name"])

Sets the named style of the cell at "row", "column" in the table "name" to "style". If "name" is not given the currently selected item is used.

May throw ValueError if the cell does not exist. 

FUNCTION:
setCellText

SYNTAX:
setCellText(row, column, text, ["name"])

Sets the text of the cell at "row", "column" in the table "name" to "text". If "name" is not given the currently selected item is used.

May throw ValueError if the cell does not exist. 

FUNCTION:
setCellTopBorder

SYNTAX:
setCellTopBorder(row, column, borderLines, ["name"])

Sets the top border of the cell at "row", "column" in the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "borderLines" is of the wrong format. 

FUNCTION:
setCellTopPadding

SYNTAX:
setCellTopPadding(row, column, padding, ["name"])

Sets the top padding of the cell at "row", "column" in the table "name" to "padding". If "name" is not given the currently selected item is used.

May throw ValueError the cell does not exist or if "padding" is less than 0. 

FUNCTION:
setCharacterStyle

SYNTAX:
setCharacterStyle("style" [, "name"])

Apply the named character "style" to the object named "name". If object name is given, style is applied to the current text selection in object "name". If no object name is given, style is applied on selected object. 

FUNCTION:
setColumnGap

SYNTAX:
setColumnGap(size, ["name"])

Sets the column gap of the text frame "name" to the value "size". If "name" is not given the currently selected item is used.

May throw ValueError if the column gap is out of bounds (must be positive). 

FUNCTION:
setColumns

SYNTAX:
setColumns(nr, ["name"])

Sets the number of columns of the text frame "name" to the integer "nr". If "name" is not given the currently selected item is used.

May throw ValueError if number of columns is not at least one. 

FUNCTION:
setCornerRadius

SYNTAX:
setCornerRadius(radius, ["name"])

Sets the corner radius of the object "name". The radius is expressed in points. If "name" is not given the currently selected item is used.

May raise ValueError if the corner radius is negative. 

FUNCTION:
setCursor

SYNTAX:
setCursor()

[UNSUPPORTED!] This might break things, so steer clear for now. 

FUNCTION:
setCustomLineStyle

SYNTAX:
setCustomLineStyle("styleName", ["name"])

Sets the custom line style of the object "name" to "styleName" Argument "styleName" is the name of line style as seen in Style Manager If "name" is not given the currently selected item is used. 

FUNCTION:
setDocType

SYNTAX:
setDocType(facingPages, firstPageLeft)

Sets the document type. To get facing pages set the first parameter to FACINGPAGES, to switch facingPages off use NOFACINGPAGES instead.  If you want to be the first page a left side set the second parameter to FIRSTPAGELEFT, for a right page use FIRSTPAGERIGHT. 

FUNCTION:
setFileAnnotation

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

Turns a text frame into a absolute or relative link annotation. Arguments: "path" is the absolute or relative path to the file. "page" is the page that it links to. "x" and "y" are the x and y coordinates of the page. "name" uses the currently selected item if not given.

Keyword arguments: "absolute" if set to False will make this a relative path. True is its default.

Returns: None

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
setFillBlendmode

SYNTAX:
setFillBlendmode(blendmode, ["name"])

Sets the fill blendmode of the object "name" to blendmode If "name" is not given the currently selected item is used. 

FUNCTION:
setFillColor

SYNTAX:
setFillColor("color", ["name"])

Sets the fill color of the object "name" to the color "color". "color" is the name of one of the defined colors. If "name" is not given the currently selected item is used. 

FUNCTION:
setFillShade

SYNTAX:
setFillShade(shade, ["name"])

Sets the shading of the fill color of the object "name" to "shade". "shade" must be an integer value in the range from 0 (lightest) to 100 (full Color intensity). If "name" is not given the currently selected Item is used.

May raise ValueError if the fill shade is out of bounds. 

FUNCTION:
setFillTransparency

SYNTAX:
setFillTransparency(transparency, ["name"])

Sets the fill transparency of the object "name" to transparency If "name" is not given the currently selected item is used. 

FUNCTION:
setFont

SYNTAX:
setFont("font", ["name"])

Sets the font of the text frame "name" to "font". If there is some text selected only the selected text is changed.  If "name" is not given the currently selected item is used.

May throw ValueError if the font cannot be found. 

FUNCTION:
setFontFeatures

SYNTAX:
setFontFeatures("fontfeature", ["name"])

Sets the font features of the text frame "name" to "fontfeature". If there is some text selected only the selected text is changed.  If "name" is not given the currently selected item is used.

May throw ValueError if the font cannot be found. 

FUNCTION:
setFontSize

SYNTAX:
setFontSize(size, ["name"])

Sets the font size of the text frame "name" to "size". "size" is treated as a value in points. If there is some text selected only the selected text is changed. "size" must be in the range 1 to 512. If "name" is not given the currently selected item is used.

May throw ValueError for a font size that's out of bounds. 

FUNCTION:
setGradientFill

SYNTAX:
setGradientFill(type, "color1", shade1, "color2", shade2, ["name"])

Sets the gradient fill of the object "name" to type. Color descriptions are the same as for setFillColor() and setFillShade(). See the constants for available types (FILL_<type>). 

FUNCTION:
setGradientStop

SYNTAX:
setGradientStop("color", shade, opacity, ramppoint, ["name"])

Set or add a gradient stop to the gradient fill of the object "name" at position ramppoint. Color descriptions are the same as for setFillColor() and setFillShade(). setGradientFill() must have been called previously for the gradient fill to be visible. 

FUNCTION:
setHGuides

SYNTAX:
setHGuides(list)

Sets horizontal guides. Input parameter must be a list of guide positions measured in the current document units - see UNIT_<type> constants.

Example: setHGuides(getHGuides() + [200.0, 210.0] # add new guides without any lost          setHGuides([90,250]) # replace current guides entirely 

FUNCTION:
setImageBrightness

SYNTAX:
setImageBrightness(n [, "name"])

Set image brightness effect of the picture in the image frame "name". If "name" is not given the currently selected item is used. A number of 1 means 100 %. Brightness factor is equal to the value shown on properties palette.

May raise WrongFrameTypeError if the target frame is not an image frame 

FUNCTION:
setImageGrayscale

SYNTAX:
setImageGrayscale(["name"])

Set image grayscale effect of the picture in the image frame "name". If "name" is not given the currently selected item is used.

May raise WrongFrameTypeError if the target frame is not an image frame 

FUNCTION:
setImageOffset

SYNTAX:
setImageOffset(x, y [, "name"])

Sets the position of the picture in the image frame "name". If "name" is not given the currently selected item is used. The specified offset values are equal to the values shown on  properties palette when point unit is used.

May raise WrongFrameTypeError if the target frame is not an image frame 

FUNCTION:
setImageScale

SYNTAX:
setImageScale(x, y [, "name"])

Sets the scaling factors of the picture in the image frame "name". If "name" is not given the currently selected item is used. A number of 1 means 100 %. Scaling factors are equal to the values shown on properties palette.

May raise WrongFrameTypeError if the target frame is not an image frame 

FUNCTION:
setInfo

SYNTAX:
setInfo("author", "info", "description") -> bool

Sets the document information. "Author", "Info", "Description" are strings. 

FUNCTION:
setLayerBlendmode

SYNTAX:
setLayerBlendmode("layer", blend)

Sets the layers "layer"  blendmode to blend.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLayerFlow

SYNTAX:
setLayerFlow("layer", flow)

Sets the layers "layer"  flowcontrol to flow. If flow is set to true text in layers above this one will flow around objects on this layer.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLayerLocked

SYNTAX:
setLayerLocked("layer", locked)

Sets the layer "layer" to be locked or not. If locked is set to true the layer will be locked.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLayerOutlined

SYNTAX:
setLayerOutlined("layer", outline)

Sets the layer "layer" to be locked or not. If outline is set to true the layer will be displayed outlined.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLayerPrintable

SYNTAX:
setLayerPrintable("layer", printable)

Sets the layer "layer" to be printable or not. If is the printable set to false the layer won't be printed.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLayerTransparency

SYNTAX:
setLayerTransparency("layer", trans)

Sets the layers "layer"  transparency to trans.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLayerVisible

SYNTAX:
setLayerVisible("layer", visible)

Sets the layer "layer" to be visible or not. If is the visible set to false the layer is invisible.

May raise NotFoundError if the layer can't be found. May raise ValueError if the layer name isn't acceptable. 

FUNCTION:
setLineBlendmode

SYNTAX:
setLineBlendmode(blendmode, ["name"])

Sets the line blendmode of the object "name" to blendmode If "name" is not given the currently selected item is used. 

FUNCTION:
setLineCap

SYNTAX:
setLineCap(endtype, ["name"])

Sets the line cap style of the object "name" to the style "cap". If "name" is not given the currently selected item is used. There are predefined constants for "cap" - CAP_<type>. 

FUNCTION:
setLineColor

SYNTAX:
setLineColor("color", ["name"])

Sets the line color of the object "name" to the color "color". If "name" is not given the currently selected item is used. 

FUNCTION:
setLineJoin

SYNTAX:
setLineJoin(join, ["name"])

Sets the line join style of the object "name" to the style "join". If "name" is not given the currently selected item is used. There are predefined constants for join - JOIN_<type>. 

FUNCTION:
setLineShade

SYNTAX:
setLineShade(shade, ["name"])

Sets the shading of the line color of the object "name" to "shade". "shade" must be an integer value in the range from 0 (lightest) to 100 (full color intensity). If "name" is not given the currently selected item is used.

May raise ValueError if the line shade is out of bounds. 

FUNCTION:
setLineSpacing

SYNTAX:
setLineSpacing(size, ["name"])

Sets the line spacing ("leading") of the text frame "name" to "size". "size" is a value in points. If "name" is not given the currently selected item is used.

May throw ValueError if the line spacing is out of bounds. 

FUNCTION:
setLineSpacingMode

SYNTAX:
setLineSpacingMode(mode, ["name"])

Sets the line spacing mode of the text frame "name" to "mode". If "name" is not given the currently selected item is used. Mode values are the same as in createParagraphStyle.

May throw ValueError if the mode is out of bounds. 

FUNCTION:
setLineStyle

SYNTAX:
setLineStyle(style, ["name"])

Sets the line style of the object "name" to the style "style". If "name" is not given the currently selected item is used. Argument for this function is number - value from 1 to 37 There are few predefined constants for "style" - LINE_<style>. In Property Palette this feature is selected in box named 'Type of line' 

FUNCTION:
setLineTransparency

SYNTAX:
setLineTransparency(transparency, ["name"])

Sets the line transparency of the object "name" to transparency If "name" is not given the currently selected item is used. 

FUNCTION:
setLineWidth

SYNTAX:
setLineWidth(width, ["name"])

Sets line width of the object "name" to "width". "width" must be in the range from 0.0 to 12.0 inclusive, and is measured in points. If "name" is not given the currently selected item is used.

May raise ValueError if the line width is out of bounds. 

FUNCTION:
setLinkAnnotation

SYNTAX:
setLinkAnnotation(page,x,y,["name"])

Turns a text fame into a link that gotos a page in the document.

Arguments: "page" is the page the link will take you to. Must be 1 and cannot be greater than the number of pages in the document. "x" and "y" are the x and y coordinates of the page. "name" uses the currently selected item if not given.

Returns: None

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
setMargins

SYNTAX:
setMargins(lr, rr, tr, br)

Sets the margins of the document, Left(lr), Right(rr), Top(tr) and Bottom(br) margins are given in the measurement units of the document - see UNIT_<type> constants. 

FUNCTION:
setMultiLine

SYNTAX:
setMultiLine("namedStyle", ["name"])

Sets the line style of the object "name" to the named style "namedStyle". If "name" is not given the currently selected item is used.

May raise NotFoundError if the line style doesn't exist. 

FUNCTION:
setNewName

SYNTAX:
setNewName(newname, ["name"])

Sets the new name of the object "name" to the newname. If "name" is not given the currently selected item is used.

May raise NotFoundError if the line style doesn't exist. 

FUNCTION:
setObjectAttributes

SYNTAX:
setObjectAttributes(attributes, ["name"])

Sets attributes of the object "name". If "name" is not given the currently selected item is used.

attributes is list of dictionary. Each dictionary must have those keys: Name, Type, Value, Parameter, Relationship, RelationshipTo, AutoAddTo All values must be strings.

May raise NotFoundError if the object doesn't exist. 

FUNCTION:
setPDFBookmark

SYNTAX:
setPDFBookmark("toggle", ["name"])

Sets whether (toggle = 1) the text frame "name" is a bookmark nor not. If "name" is not given the currently selected item is used.

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
setProperty

SYNTAX:
setProperty(object, property, value)

Set `property' of `object' to `value'. If `value' cannot be converted to a type compatible with the type of `property', an exception is raised. An exception may also be raised if the underlying setter fails.

See getProperty() for more information. 

FUNCTION:
setRedraw

SYNTAX:
setRedraw(bool)

Disables page redraw when bool = False, otherwise redrawing is enabled. This change will persist even after the script exits, so make sure to call setRedraw(True) in a finally: clause at the top level of your script. 

FUNCTION:
setScaleFrameToImage

SYNTAX:
setScaleFrameToImage([name])

Set frame size on the selected or specified image frame to image size.

May raise WrongFrameTypeError. 

FUNCTION:
setScaleImageToFrame

SYNTAX:
setScaleImageToFrame(scaletoframe, proportional=None, name=<selection>)

Sets the scale to frame on the selected or specified image frame to `scaletoframe'. If `proportional' is specified, set fixed aspect ratio scaling to `proportional'. Both `scaletoframe' and `proportional' are boolean.

May raise WrongFrameTypeError. 

FUNCTION:
setSpotColor

SYNTAX:
setSpotColor("name", spot)

Set the color "name" as a spot color if spot parameter is True. See also isSpotColor()

May raise NotFoundError if a named color wasn't found. May raise ValueError if an invalid color name is specified. 

FUNCTION:
setStyle

SYNTAX:
setStyle("style" [, "name"])

Apply the named "style" to the object named "name". If object name is given, style is applied to the current text selection in object "name". If no object name is given, style is applied on selected object. 

FUNCTION:
setTableBottomBorder

SYNTAX:
setTableBottomBorder(borderLines, ["name"])

Sets the bottom border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format. 

FUNCTION:
setTableFillColor

SYNTAX:
setTableFillColor(color, ["name"])

Sets the fill color of the table "name" to "color". If "name" is not given the currently selected item is used.

May throw ValueError the table does not exist. 

FUNCTION:
setTableLeftBorder

SYNTAX:
setTableLeftBorder(borderLines, ["name"])

Sets the left border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format. 

FUNCTION:
setTableRightBorder

SYNTAX:
setTableRightBorder(borderLines, ["name"])

Sets the right border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format. 

FUNCTION:
setTableStyle

SYNTAX:
setTableStyle(style, ["name"])

Sets the named style of the table "name" to "style". If "name" is not given the currently selected item is used. 

FUNCTION:
setTableTopBorder

SYNTAX:
setTableTopBorder(borderLines, ["name"])

Sets the top border of the table "name". The border is specified as a list of "(width, style, color)" tuples. "style" is one of the LINE_* constants. If "name" is not given the currently selected item is used.

May throw ValueError if "borderLines" is of the wrong format. 

FUNCTION:
setText

SYNTAX:
setText("text", ["name"])

Sets the text of the text frame "name" to the text of the string "text". Text must be UTF8 encoded - use e.g. unicode(text, 'iso-8859-2'). See the FAQ for more details. If "name" is not given the currently selected item is used. 

FUNCTION:
setTextAlignment

SYNTAX:
setTextAlignment(align, ["name"])

Sets the text alignment of the text frame "name" to the specified alignment. If "name" is not given the currently selected item is used. "align" should be one of the ALIGN_ constants defined in this module - see dir(scribus).

May throw ValueError for an invalid alignment constant. 

FUNCTION:
setTextAnnotation

SYNTAX:
setTextAnnotation(icon,isopen,["name"])

Turns a text fame into a text annotation.

Arguments: "icon" must be 0-8.  The values correspond to:( 0 "Note", 1 "Comment", 2 "Key", 3 "Help", 4 "NewParagraph", 5 "Paragraph", 6 "Insert",7 "Cross", 8 "Circle")n"isopen" is True or False. "name" uses the currently selected item if not given.

Returns: None

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
setTextColor

SYNTAX:
setTextColor("color", ["name"])

Sets the text color of the text frame "name" to the color "color". If there is some text selected only the selected text is changed. If "name" is not given the currently selected item is used. 

FUNCTION:
setTextDirection

SYNTAX:
setTextDirection(direction, ["name"])

Sets the text direction of the text frame "name" to the specified direction. If "name" is not given the currently selected item is used. "direction" should be one of the DIRECTION_ constants defined in this module - see dir(scribus).

May throw ValueError for an invalid direction constant. 

FUNCTION:
setTextDistances

SYNTAX:
setTextDistances(left, right, top, bottom, ["name"])

Sets the text distances of the text frame "name" to the values "left" "right", "top" and "bottom". If "name" is not given the currently selected item is used.

May throw ValueError if any of the distances are out of bounds (must be positive). 

FUNCTION:
setTextScalingH

SYNTAX:
setTextScalingH(scale, ["name"])

Sets the horizontal character scaling of the object "name" to "scale" in percent. If "name" is not given the currently selected item is used. 

FUNCTION:
setTextScalingV

SYNTAX:
setTextScalingV(scale, ["name"])

Sets the vertical character scaling of the object "name" to "scale" in percent. If "name" is not given the currently selected item is used. 

FUNCTION:
setTextShade

SYNTAX:
setTextShade(shade, ["name"])

Sets the shading of the text color of the object "name" to "shade". If there is some text selected only the selected text is changed. "shade" must be an integer value in the range from 0 (lightest) to 100 (full color intensity). If "name" is not given the currently selected item is used. 

FUNCTION:
setTextStroke

SYNTAX:
setTextStroke("color", ["name"])

Set "color" of the text stroke. If "name" is not given the currently selected item is used. 

FUNCTION:
setURIAnnotation

SYNTAX:
setURIAnnotation(uri,["name"])

Turns a text fame into a uri link that gotos the uri specified.

Arguments: "uri" is the uri that the link will be set to. "name" uses the currently selected item if not given.

Returns: None

May raise WrongFrameTypeError if the target frame is not a text frame 

FUNCTION:
setUnit

SYNTAX:
setUnit(type)

Changes the measurement unit of the document. Possible values for "unit" are defined as constants UNIT_<type>.

May raise ValueError if an invalid unit is passed. 

FUNCTION:
setVGuides

SYNTAX:
setVGuides()

See setHGuides. 

FUNCTION:
sizeObject

SYNTAX:
sizeObject(width, height [, "name"])

Resizes the object "name" to the given width and height. If "name" is not given the currently selected item is used. 

FUNCTION:
statusMessage

SYNTAX:
messagebarText("string")

Writes the "string" into the Scribus message bar (status line). The text must be UTF8 encoded or 'unicode' string(recommended). 

FUNCTION:
textFlowMode

SYNTAX:
textFlowMode("name" [, state])

Enables/disables "Text Flows Around Frame" feature for object "name". Called with parameters string name and optional int "state" (0 <= state <= 3). Setting "state" to 0 will disable text flow. Setting "state" to 1 will make text flow around object frame. Setting "state" to 2 will make text flow around bounding box. Setting "state" to 3 will make text flow around contour line. If "state" is not passed, text flow is toggled. 

FUNCTION:
textOverflows

SYNTAX:
textOverflows(["name", nolinks]) -> integer

Returns 1 if there are overflowing characters in text frame "name", 0 if not. If is nolinks set to non zero value it takes only one frame - it doesn't use text frame linking. Without this parameter it search all linking chain.

May raise WrongFrameTypeError if the target frame is not an text frame 

FUNCTION:
traceText

SYNTAX:
traceText(["name"])

Convert the text frame "name" to outlines. If "name" is not given the currently selected item is used.

FUNCTION:
unGroupObject

SYNTAX:
unGroupObjects("name")

Destructs the group the object "name" belongs to.If "name" is not given the currently selected item is used.

FUNCTION:
unlinkTextFrames

SYNTAX:
unlinkTextFrames("name")

Remove the specified (named) object from the text frame flow/linkage. If the frame was in the middle of a chain, the previous and next frames will be connected, eg 'a->b->c' becomes 'a->c' when you unlinkTextFrames(b)'

May throw ScribusException if linking rules are violated. 

FUNCTION:
valueDialog

SYNTAX:
valueDialog(caption, message [,defaultvalue]) -> string

Shows the common 'Ask for string' dialog and returns its value as a string Parameters: window title, text in the window and optional 'default' value.

Example: valueDialog('title', 'text in the window', 'optional') 

FUNCTION:
warnings

SYNTAX:
Python part of the warnings subsystem.

FUNCTION:
zoomDocument

SYNTAX:
zoomDocument(double)

Zoom the document in main GUI window. Actions have whole number values like 20.0, 100.0, etc. Zoom to Fit uses -100 as a marker.