[scribus] batch mode option for scribus a la gimp script-fu-server

Farid Elyahyaoui frietfriet at gmail.com
Mon Sep 6 14:37:29 CEST 2010

Hello Juraj,

Thank you for your reply. This would be an excellent starting point for me.
Except for the reading from a (unix) port it does everything I need.

Could you tell me where I can get the code of your patch?
I could start cleaning it up.


On Sun, Sep 5, 2010 at 4:19 PM, Juraj Fedel <wtxnh-scribus at yahoo.com.au>wrote:

> On Sat, Aug 28, 2010 at 07:45:26PM +0200, Farid Elyahyaoui wrote:
> > I saw that there is a long standing feature request for a command line
> > version of Scribus to be able to create pdf's in a batch mode
> > (http://bugs.scribus.net/view.php?id=238). Our company now has a student
> that
> > could invest a couple of months development time in such a feature.
> ...
> > Additionally we could add a "--no-interface" option to stop the gui from
> > being shown and also switch of rendering of the document to speed up
> things.
> > (An alternative would be to start scribus with the display set to a
> virtual
> > display using Xvfb.)
> Hi,
> I just wanted to share some of myexperience with this issue even if am
> not in the scribus development team.
> Back in year 2006 I implemmented batch mode for scribus. What I was
> able to do is:
> - load and save PDF options from scripter into/from xml file
> - export pdf from command line
>      scribus --to-pdf exported.pdf --pdf-options options.xml document.sla
> - run python script
>      scribus --script program.py [arg1 [arg2 ...]]
> As I was using this I preffered to run puthon script and from there export
> PDF file (you can also export PS file from scripter if you need to) instead
> of using --to-pdf option.
> Something like:
> openDoc('document.sla')
> pdf = PDFOptions()
> pdf.loadPDFOptions('options.xml')
> pdf.filename = 'exported.pdf'
> pdf.embedList = getUsedFontNames()
> pdf.savePDF()
> p = Printer()
> p.filename = 'exported.ps'
> p.printer = 'File'
> p.savePS()
> closeDoc()
> This worked and satisfied my needs perfectly. It was able to work
> without rendering any window on the desktop but it needed X server
> nevertheless. Problem with it is that I was using scribus 1.3.2 at the
> time and did not upgraded since then. It also was really just a fast
> ugly hack and when I passed the patch to developers it must have been
> dificult for them to us it. Instead of creating clean patch for each
> feature I mixed it all together also with some code cleaning at random
> places, fixing some bugs and who know what not. Anyway developers
> stated that they will try to adapt the patch and include it in 1.3.4
> version. Considering what mess I send them it is no wonder if
> developers could not use it at all - my bad :(
> So the task is not impossible it just need more attention to do it
> right.
> Good luck
> Juraj Fedel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20100906/7dabcdee/attachment.htm>

More information about the scribus mailing list