<br><br><div class="gmail_quote">2012/9/5 Sivahari Nandakumar <span dir="ltr"><<a href="mailto:sivaharivkm@gmail.com" target="_blank">sivaharivkm@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hai List,<br>
<br>
I have to write a python script to create a document with specific<br>
height,width,bleed,fontsize etc. I think i can use scribus.newDoc function<br>
for it. But i didnt find any documents about its its syntax in scribus<br>
documentation. From where i get the manual for python scribus scripting?<br></blockquote><div><br></div><div>its inside your scribus copy. Just look in the docs folder -> Files starting with scripter.</div><div><br></div>
<div>newDoc is obsolete, use <span style="background-color:rgb(248,248,248);color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">newDocument(size, margins, orientation, firstPageNumber,</span></div>
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)"> unit, pagesType, firstPageOrder, numPages) -</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(221,187,0)">></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)"> bool</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/code.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">code</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/p.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">p</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">Creates a new document and returns true if successful. The parameters have the</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">following meaning:</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/ul.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">ul</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">size = A tuple (width, height) describing the size of the document. You can</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">use predefined constants named PAPER_</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(221,187,0)"><</span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">paper_type</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(221,187,0)">></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)"> e.g. PAPER_A4 etc.</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">margins = A tuple (left, right, top, bottom) describing the document</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">margins</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">orientation = the page orientation - constants PORTRAIT, LANDSCAPE</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">firstPageNumer = is the number of the first page in the document used for</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">pagenumbering. While you'll usually want 1, it's useful to have higher</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">numbers if you're creating a document in several parts.</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">unit: this value sets the measurement units used by the document. Use a</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">predefined constant for this, one of: UNIT_INCHES, UNIT_MILLIMETERS,</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">UNIT_PICAS, UNIT_POINTS.</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">pagesType = One of the predefined constants PAGE_n. PAGE_1 is single page,</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">PAGE_2 is for double sided documents, PAGE_3 is for 3 pages fold and</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">PAGE_4 is 4-fold.</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">firstPageOrder = What is position of first page in the document.</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">Indexed from 0 (0 = first).</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">numPage = Number of pages to be created.</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/li.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">li</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/ul.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">ul</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/p.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">p</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">The values for width, height and the margins are expressed in the given unit</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">for the document. PAPER_* constants are expressed in points. If your document</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">is not in points, make sure to account for this.</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/p.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">p</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/p.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">p</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">example: newDocument(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 7, UNIT_POINTS,</span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">PAGE_4, 3, 1)</span><span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<span style="color:rgb(102,204,102)">/</span><a href="http://december.com/html/4/element/p.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">p</span></a>></span><br style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px">
<span style="font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;color:rgb(0,153,0)"><<a href="http://december.com/html/4/element/p.html" style="color:rgb(0,0,0);text-decoration:none;outline:none!important"><span style="font-weight:bold">p</span></a>></span><span style="color:rgb(128,128,128);font-family:Consolas,monospace;font-size:13px;line-height:16.883333206176758px;background-color:rgb(248,248,248)">May raise ScribusError if is firstPageOrder bigger than allowed by pagesType.</span><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you<br>
Sivahari<br>
<br>
--<br>
with warm regards<br>
Sivahari Nandakumar<br>
Appropriate Technology Promotion Society<br>
Eroor, Vyttila 09446582917<br>
<a href="http://sivaharicec.blogspot.com" target="_blank">http://sivaharicec.blogspot.com</a><br>
--------------------------------------------------------<br>
fighting for knowledge freedom<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.scribus.net/pipermail/scribus/attachments/20120905/572e4914/attachment.html" target="_blank">http://lists.scribus.net/pipermail/scribus/attachments/20120905/572e4914/attachment.html</a>><br>
___<br>
Scribus Mailing List: <a href="mailto:scribus@lists.scribus.net">scribus@lists.scribus.net</a><br>
Edit your options or unsubscribe:<br>
<a href="http://lists.scribus.net/mailman/listinfo/scribus" target="_blank">http://lists.scribus.net/mailman/listinfo/scribus</a><br>
See also:<br>
<a href="http://wiki.scribus.net" target="_blank">http://wiki.scribus.net</a><br>
<a href="http://forums.scribus.net" target="_blank">http://forums.scribus.net</a><br>
</blockquote></div><br>