15 PyDoc_STRVAR(scribus_newdocument__doc__,
16 QT_TR_NOOP(
"newDocument(size, margins, orientation, firstPageNumber,\n\
17 unit, pagesType, firstPageOrder, numPages) -> bool\n\
19 Creates a new document and returns true if successful. The parameters have the\n\
22 size = A tuple (width, height) describing the size of the document. You can\n\
23 use predefined constants named PAPER_<paper_type> e.g. PAPER_A4 etc.\n\
25 margins = A tuple (left, right, top, bottom) describing the document\n\
28 orientation = the page orientation - constants PORTRAIT, LANDSCAPE\n\
30 firstPageNumer = is the number of the first page in the document used for\n\
31 pagenumbering. While you'll usually want 1, it's useful to have higher\n\
32 numbers if you're creating a document in several parts.\n\
34 unit: this value sets the measurement units used by the document. Use a\n\
35 predefined constant for this, one of: UNIT_INCHES, UNIT_MILLIMETERS,\n\
36 UNIT_PICAS, UNIT_POINTS.\n\
38 pagesType = One of the predefined constants PAGE_n. PAGE_1 is single page,\n\
39 PAGE_2 is for double sided documents, PAGE_3 is for 3 pages fold and\n\
42 firstPageOrder = What is position of first page in the document.\n\
43 Indexed from 0 (0 = first).\n\
45 numPage = Number of pages to be created.\n\
47 The values for width, height and the margins are expressed in the given unit\n\
48 for the document. PAPER_* constants are expressed in points. If your document\n\
49 is not in points, make sure to account for this.\n\
51 example: newDocument(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 7, UNIT_POINTS,\n\
54 May raise ScribusError if is firstPageOrder bigger than allowed by pagesType.\n\
58 PyObject *scribus_newdocument(PyObject * , PyObject* args);
61 PyDoc_STRVAR(scribus_newdoc__doc__,
62 QT_TR_NOOP(
"newDoc(size, margins, orientation, firstPageNumber,\n\
63 unit, facingPages, firstSideLeft) -> bool\n\
65 WARNING: Obsolete procedure! Use newDocument instead.\n\
67 Creates a new document and returns true if successful. The parameters have the\n\
70 size = A tuple (width, height) describing the size of the document. You can\n\
71 use predefined constants named PAPER_<paper_type> e.g. PAPER_A4 etc.\n\
73 margins = A tuple (left, right, top, bottom) describing the document\n\
76 orientation = the page orientation - constants PORTRAIT, LANDSCAPE\n\
78 firstPageNumer = is the number of the first page in the document used for\n\
79 pagenumbering. While you'll usually want 1, it's useful to have higher\n\
80 numbers if you're creating a document in several parts.\n\
82 unit: this value sets the measurement units used by the document. Use a\n\
83 predefined constant for this, one of: UNIT_INCHES, UNIT_MILLIMETERS,\n\
84 UNIT_PICAS, UNIT_POINTS.\n\
86 facingPages = FACINGPAGES, NOFACINGPAGES\n\
88 firstSideLeft = FIRSTPAGELEFT, FIRSTPAGERIGHT\n\
90 The values for width, height and the margins are expressed in the given unit\n\
91 for the document. PAPER_* constants are expressed in points. If your document\n\
92 is not in points, make sure to account for this.\n\
94 example: newDoc(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 1, UNIT_POINTS,\n\
95 FACINGPAGES, FIRSTPAGERIGHT)\n\
99 PyObject *scribus_newdoc(PyObject * , PyObject* args);
102 PyDoc_STRVAR(scribus_closedoc__doc__,
103 QT_TR_NOOP(
"closeDoc()\n\
105 Closes the current document without prompting to save.\n\
107 May throw NoDocOpenError if there is no document to close\n\
110 PyObject *scribus_closedoc(PyObject * );
113 PyDoc_STRVAR(scribus_havedoc__doc__,
114 QT_TR_NOOP(
"haveDoc() -> int\n\
116 Returns the quantity of open documents: 0 if none are opened.\n\
119 PyObject *scribus_havedoc(PyObject * );
122 PyDoc_STRVAR(scribus_opendoc__doc__,
123 QT_TR_NOOP(
"openDoc(\"name\")\n\
125 Opens the document \"name\".\n\
127 May raise ScribusError if the document could not be opened.\n\
130 PyObject *scribus_opendoc(PyObject * , PyObject* args);
133 PyDoc_STRVAR(scribus_savedoc__doc__,
134 QT_TR_NOOP(
"saveDoc()\n\
136 Saves the current document with its current name, returns true if successful.\n\
137 If the document has not already been saved, this may bring up an interactive\n\
140 If the save fails, there is currently no way to tell.\n\
142 PyObject *scribus_savedoc(PyObject * );
145 PyDoc_STRVAR(scribus_getdocname__doc__,
146 QT_TR_NOOP(
"getDocName() -> string\n\
148 Returns the name the document was saved under.\n\
149 If the document was not saved before the name is empty.\n\
152 PyObject *scribus_getdocname(PyObject * );
155 PyDoc_STRVAR(scribus_savedocas__doc__,
156 QT_TR_NOOP(
"saveDocAs(\"name\")\n\
158 Saves the current document under the new name \"name\" (which may be a full or\n\
161 May raise ScribusError if the save fails.\n\
164 PyObject *scribus_savedocas(PyObject * , PyObject* args);
167 PyDoc_STRVAR(scribus_setinfo__doc__,
168 QT_TR_NOOP(
"setInfo(\"author\", \"info\", \"description\") -> bool\n\
170 Sets the document information. \"Author\", \"Info\", \"Description\" are\n\
174 PyObject *scribus_setinfo(PyObject * , PyObject* args);
177 PyDoc_STRVAR(scribus_setmargins__doc__,
178 QT_TR_NOOP(
"setMargins(lr, rr, tr, br)\n\
180 Sets the margins of the document, Left(lr), Right(rr), Top(tr) and Bottom(br)\n\
181 margins are given in the measurement units of the document - see UNIT_<type>\n\
185 PyObject *scribus_setmargins(PyObject * , PyObject* args);
188 PyDoc_STRVAR(scribus_setbaseline__doc__,
189 QT_TR_NOOP(
"setBaseLine(grid, offset)\n\
191 Sets the base line settings of the document, grid spacing(grid), grid offset(offset).\n\
192 Values are given in the measurement units of the document - see UNIT_<type>\n\
196 PyObject *scribus_setbaseline(PyObject * , PyObject* args);
199 PyDoc_STRVAR(scribus_setunit__doc__,
200 QT_TR_NOOP(
"setUnit(type)\n\
202 Changes the measurement unit of the document. Possible values for \"unit\" are\n\
203 defined as constants UNIT_<type>.\n\
205 May raise ValueError if an invalid unit is passed.\n\
208 PyObject *scribus_setunit(PyObject * , PyObject* args);
211 PyDoc_STRVAR(scribus_getunit__doc__,
212 QT_TR_NOOP(
"getUnit() -> integer (Scribus unit constant)\n\
214 Returns the measurement units of the document. The returned value will be one\n\
215 of the UNIT_* constants:\n\
216 UNIT_INCHES, UNIT_MILLIMETERS, UNIT_PICAS, UNIT_POINTS.\n\
219 PyObject *scribus_getunit(PyObject * );
222 PyDoc_STRVAR(scribus_loadstylesfromfile__doc__,
223 QT_TR_NOOP(
"loadStylesFromFile(\"filename\")\n\
225 Loads paragraph styles from the Scribus document at \"filename\" into the\n\
229 PyObject *scribus_loadstylesfromfile(PyObject * , PyObject *args);
232 PyDoc_STRVAR(scribus_setdoctype__doc__,
233 QT_TR_NOOP(
"setDocType(facingPages, firstPageLeft)\n\
235 Sets the document type. To get facing pages set the first parameter to\n\
236 FACINGPAGES, to switch facingPages off use NOFACINGPAGES instead. If you want\n\
237 to be the first page a left side set the second parameter to FIRSTPAGELEFT, for\n\
238 a right page use FIRSTPAGERIGHT.\n\
240 PyObject *scribus_setdoctype(PyObject * , PyObject* args);
242 PyDoc_STRVAR(scribus_closemasterpage__doc__,
243 QT_TR_NOOP(
"closeMasterPage()\n\
245 Closes the currently active master page, if any, and returns editing\n\
246 to normal. Begin editing with editMasterPage().\n\
248 PyObject* scribus_closemasterpage(PyObject*
self);
250 PyDoc_STRVAR(scribus_masterpagenames__doc__,
251 QT_TR_NOOP(
"masterPageNames()\n\
253 Returns a list of the names of all master pages in the document.\n\
255 PyObject* scribus_masterpagenames(PyObject*
self);
257 PyDoc_STRVAR(scribus_editmasterpage__doc__,
258 QT_TR_NOOP(
"editMasterPage(pageName)\n\
260 Enables master page editing and opens the named master page\n\
261 for editing. Finish editing with closeMasterPage().\n\
263 PyObject* scribus_editmasterpage(PyObject*
self, PyObject* args);
265 PyDoc_STRVAR(scribus_createmasterpage__doc__,
266 QT_TR_NOOP(
"createMasterPage(pageName)\n\
268 Creates a new master page named pageName and opens it for\n\
271 PyObject* scribus_createmasterpage(PyObject*
self, PyObject* args);
273 PyDoc_STRVAR(scribus_deletemasterpage__doc__,
274 QT_TR_NOOP(
"deleteMasterPage(pageName)\n\
276 Delete the named master page.\n\
278 PyObject* scribus_deletemasterpage(PyObject*
self, PyObject* args);
280 PyDoc_STRVAR(scribus_applymasterpage__doc__,
281 QT_TR_NOOP(
"applyMasterPage(masterPageName, pageNumber)\n\
283 Apply master page masterPageName on page pageNumber.\n\
285 PyObject* scribus_applymasterpage(PyObject*
self, PyObject* args);