[scribus] a new script for exporting pages using ImageExport()

ZASKE Martin zm at revue-gugu.org
Wed Oct 5 17:11:26 UTC 2016

Hi again,

in July and December 2015 this list has helped us getting our workflow
ready for our weekly distribution of decorated proverbs via WhatsApp and
a web page.

Ever since 2015 we are manually using

File > Export > Save as Image ... >

and then we click on several options and set file type etc.

Since all our proverbs include at least one SVG vector illustration,
typically from Openclipart.org (and since some of those SVG have
technical issues), we have found those bitmap-exports a great help. We
know that "normally" Scribus output should be PDF for "real
publications" (not the point here).

As our proverbs are becoming a success, we are also pasting them up on
paper in the villages and are also making printed tarps (rather big
PVC-sheets for hanging outdoors) with collections of many proverbs.

So we are now generating four different exports each week in different
file types and different resolutions and qualities, ranging from
lightweight jpeg-thumbnails in 150x150 px to printer-ready PNG in much
higher resolution. That is a lot of clicking and mistakes are happening
with options or with file-names.

Now I am trying to create a Python script to help our team with all the
exporting (so that the work is less tedious but also for having less
human error in the process).

I have a script with "import scribus"

and I get an error message like

NameError: global name 'ImageExport' is not defined

I found

class ImageExport(object)

in the Scribus help under Scripter API.

Obviously I am missing something but I looked at the wiki and tried
searching this mail archive. I came up with this detail from Christoph:

On 7/30/2015 8:27 AM, "Christoph Schäfer" wrote:
> There's not much to be maintained in Scribus itself here (other than correctly setting up CMake for every platform), since export to these formats is handled by Qt, not Scribus.

What would it mean for a script just sending the entire page of a
one-page-Scribus-document to the ImageExport() please?

Do I need something like "import Qt" or does it get much more
complicated? Are there any examples at all, where I could spy on
ImageExport() or on any other stuff that involves Qt?

Sorry if this is an annoying newbie questions, I am indeed still a
newbie with the scripting, but I believe this is doable with the right

Thank you,


ZASKE Martin
responsable GʊGʊ
BP 50 - Bassila - Bénin
tel GʊGʊ
tel pers

More information about the scribus mailing list