[scribus] Using scribus to create PDFs from the commandline

William Bader williambader at hotmail.com
Mon Jul 28 23:54:19 UTC 2014


On Sun Jul 27 17:32:02 UTC 2014, Juraj Fedel wtxnh-scribus at yahoo.com.au wrote:   > On Sun, Jul 20, 2014 at 07:26:28PM +0200, Marc Balmer wrote:> > Or, in other words, are there ways to automate Scribus without user> > interaction, i.e. from the commandline?>> Let me try once more to present my solution to this problem! At the> bottom of the mail is small patch that enables exactly what Marc is> asking for.>> You can create template scribus document 'mydoc.sla' with two text> frames and this small python script 'data.py' in the same directory:>> import scribus> scribus.openDoc('mydoc.sla')> scribus.setText('Name', 'Text1') # get 'Name' and 'Address' from database> scribus.setText('Address', 'Text2')> pdf = scribus.PDFfile()> pdf.file = 'output1.pdf'> pdf.save()>> Then run scribus as folow:> scribus --python-script data.py>> and you have your output1.pdf file created!...> PS:> I have been posting this or similar solution since 2006 (and Scribus> version 1.2 I was using at that time). I would be glad if at least one> person try to compile scribus with this patch and confirm that it works> on some other computer than mine! If you find it useful it would be> extra bonus.
Thank you for posting the patch!  I had also been looking for a way to run Scribus without user interaction.
The patch needed only a small change to work with the current 1.5.0svn under Fedora 20.  The example worked except for some font issues in the generated PDF which I think are unrelated to the patch.
I have attached an updated version of the patch.
Regards,William

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20140728/f4262110/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scribus-cmd-wb-28jul14.pat
Type: application/octet-stream
Size: 6294 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20140728/f4262110/attachment.obj>


More information about the scribus mailing list