[scribus-dev] scribus python scripting manual

Sivahari Nandakumar sivaharivkm at gmail.com
Wed Sep 5 08:38:05 UTC 2012


thank you Stefan. I will reply back in this thread after referring the
links.

--Sivahari

2012/9/5 Stefan <stmstmstmster at gmail.com>

>
>
> 2012/9/5 Sivahari Nandakumar <sivaharivkm at gmail.com>
>
>>
>> Hai List,
>>
>> 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?
>>
>
> Here is some http://wiki.scribus.net/canvas/Category:Scripts
>
> The reference manual can be viewed by selecting Help->Scripter Manual from
> the Scribus menu.
>
> or via Websvn
>
>
> http://scribus.net/websvn/listing.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fdoc%2Fen%2F&#af20fbfeebfcfd73863fd3438754d4fed
>
> -> scripter html files
>
> you may want to look at
>
>
> http://scribus.net/websvn/filedetails.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fdoc%2Fen%2Fscripterapi-doc.html
>
> ->
>
> newDocument(size, margins, orientation, firstPageNumber,
>                         unit, pagesType, firstPageOrder, numPages) ->
>  bool</code <http://december.com/html/4/element/code.html>>
> <p <http://december.com/html/4/element/p.html>>Creates a new document and
> returns true if successful. The parameters have the
> following meaning:
> <ul <http://december.com/html/4/element/ul.html>>
> <li <http://december.com/html/4/element/li.html>>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.
> </li <http://december.com/html/4/element/li.html>>
> <li <http://december.com/html/4/element/li.html>>margins = A tuple (left,
> right, top, bottom) describing the document
> margins</li <http://december.com/html/4/element/li.html>>
> <li <http://december.com/html/4/element/li.html>>orientation = the page
> orientation - constants PORTRAIT, LANDSCAPE</li<http://december.com/html/4/element/li.html>
> >
> <li <http://december.com/html/4/element/li.html>>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.</li<http://december.com/html/4/element/li.html>
> >
> <li <http://december.com/html/4/element/li.html>>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.</li <http://december.com/html/4/element/li.html>>
> <li <http://december.com/html/4/element/li.html>>pagesType = One of the
> predefined constants PAGE_n. PAGE_1 is single page,
> PAGE_2 is for double sided documents, PAGE_3 is for 3 pages fold and
> PAGE_4 is 4-fold.</li <http://december.com/html/4/element/li.html>>
> <li <http://december.com/html/4/element/li.html>>firstPageOrder = What is
> position of first page in the document.
> Indexed from 0 (0 = first).</li<http://december.com/html/4/element/li.html>
> >
> <li <http://december.com/html/4/element/li.html>>numPage = Number of
> pages to be created.</li <http://december.com/html/4/element/li.html>>
> </ul <http://december.com/html/4/element/ul.html>>
> <p <http://december.com/html/4/element/p.html>>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.</p<http://december.com/html/4/element/p.html>
> >
> <p <http://december.com/html/4/element/p.html>>example:
> newDocument(PAPER_A4, (10, 10, 20, 20), LANDSCAPE, 7, UNIT_POINTS,
> PAGE_4, 3, 1)</p <http://december.com/html/4/element/p.html>>
> <p <http://december.com/html/4/element/p.html>>May raise ScribusError if
> is firstPageOrder bigger than allowed by pagesType.
>
>
>
>>
>> Thank you
>> Sivahari
>>
>> --
>> with warm regards
>> Sivahari Nandakumar
>> Appropriate Technology Promotion Society
>> Eroor, Vyttila 09446582917
>> http://sivaharicec.blogspot.com
>> --------------------------------------------------------
>>       fighting for knowledge freedom
>>
>> _______________________________________________
>> scribus-dev mailing list
>> scribus-dev at lists.scribus.net
>> http://lists.scribus.net/mailman/listinfo/scribus-dev
>>
>>
>
> _______________________________________________
> scribus-dev mailing list
> scribus-dev at lists.scribus.net
> http://lists.scribus.net/mailman/listinfo/scribus-dev
>
>


-- 
with warm regards
Sivahari Nandakumar
Appropriate Technology Promotion Society
Eroor, Vyttila 09446582917
http://sivaharicec.blogspot.com
--------------------------------------------------------
      fighting for knowledge freedom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20120905/be7bd211/attachment-0001.html>


More information about the scribus-dev mailing list