Adding 'DRAFT' to a document

A script to place a light grey watermark 'DRAFT' on a new layer. Requires an existing document, but can be modified to create a new document if it does not exist.

Note that this script can be run on a Master Page, which allows you to apply this to as many pages as you wish, without needing to run the script again.

If it doesn't work for you, it may have something to do with your default font.



Save the following code as [ draft.py]

A note on style
The favored way to use a python script in Scribus is to use the command instead of The reason for this is that the latter method imports all of the Scribus python API into the interpreter, rather unnecessary. However, if you use this preferred method, then your Scribus commands need to use a prefix, for example This also applies to Scribus constants, for example scribus.UNIT_MILLIMETERS. If you're wondering which commands are those which belong to Scribus, generally speaking anything not highlighted in color above is a Scribus command, so from, import, and len are all basic python commands.