<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">
<br clear="all">Hai List,<br>
<br>
I have to write a python script to create a document with specific
height,width,bleed,fontsize etc. I think i can use scribus.newDoc
function for it. But i didnt find any documents about its its syntax in
scribus documentation. From where i get the manual for python scribus
scripting?<br></blockquote><div><br></div><div>Here is some <a href="http://wiki.scribus.net/canvas/Category:Scripts">http://wiki.scribus.net/canvas/Category:Scripts</a></div><div><br></div><div><span style="font-family:sans-serif;font-size:13px;line-height:19.200000762939453px;background-color:rgb(255,255,255)">The reference manual can be viewed by selecting Help->Scripter Manual from the Scribus menu.</span></div>
<div><span style="font-family:sans-serif;font-size:13px;line-height:19.200000762939453px;background-color:rgb(255,255,255)"><br></span></div><div><span style="font-family:sans-serif;font-size:13px;line-height:19.200000762939453px;background-color:rgb(255,255,255)">or via Websvn</span></div>
<div><span style="font-family:sans-serif;font-size:13px;line-height:19.200000762939453px;background-color:rgb(255,255,255)"><br></span></div><div><a href="http://scribus.net/websvn/listing.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fdoc%2Fen%2F&#af20fbfeebfcfd73863fd3438754d4fed">http://scribus.net/websvn/listing.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fdoc%2Fen%2F&#af20fbfeebfcfd73863fd3438754d4fed</a>
</div><div><br></div><div>-> scripter html files</div><div><br></div><div>you may want to look at</div><div><br></div><div><a href="http://scribus.net/websvn/filedetails.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fdoc%2Fen%2Fscripterapi-doc.html">http://scribus.net/websvn/filedetails.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fdoc%2Fen%2Fscripterapi-doc.html</a>
</div><div><br></div><div>-></div><div><br></div><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)">newDocument(size, margins, orientation, firstPageNumber,</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, 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><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you<span class="HOEnZb"><font color="#888888"><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>
</font></span><br>_______________________________________________<br>
scribus-dev mailing list<br>
<a href="mailto:scribus-dev@lists.scribus.net">scribus-dev@lists.scribus.net</a><br>
<a href="http://lists.scribus.net/mailman/listinfo/scribus-dev" target="_blank">http://lists.scribus.net/mailman/listinfo/scribus-dev</a><br>
<br></blockquote></div><br>