[scribus] Request: Draft Script modification

Gregory Pittman gpittman at iglou.com
Mon Feb 9 01:29:13 UTC 2015

On 02/05/2015 09:05 AM, Kunda Loves Scribus wrote:
> http://wiki.scribus.net/canvas/Adding_%27DRAFT%27_to_a_document
> Would someone kindly modify the above script to add a DRAFT watermark to a
> masterpage instead of running the script separately on each page ?

The solution doesn't require changing the script.
On an individual document, run the script on a blank page.
Now, from the menu, Page > Convert to Master Page...
Give it a name like Draft.
Now you can go back to the page you ran the script and delete that page
or the object if you wish, and apply the Draft Master Page how you like.
One thing this illustrates is that Master Pages can have layers.

If you're doing this commonly, you might create a dummy document named
draft.sla, that has this Draft Master Page, then import that Master Page
to whatever document you wish, keeping in mind there is some relative
sizing for different sizes of paper.

One thing I would suggest in the original script, is to change the line

    T = createText(w/6, 6*h/10 , h, w/2)  # Create the text box

to something like

    T = createText(w/6, 6*h/10 , 2*h/3, w/5)  # Create the text box

so that you don't create a text frame that sticks way outside the page
boundaries. I tried this formula on A2, A4, A5, and Letter sizes.

Another way to approach this in 1.5.0 is to use the copyObject() and
pasteObject() commands, such as in


so that rather than using a Master Page, you copy to whatever pages you
like -- of course, you have to go to the "c" layer and select the object
before running one of the scripts. This would be useful when you have
some other Master Page that you want to use for certain pages, since you
can only choose one Master Page per document page.
(These commands are not in 1.4.5)


More information about the scribus mailing list