Hello Juraj,<div><br></div><div>Thank you for your reply. This would be an excellent starting point for me.</div><div><div>Except for the reading from a (unix) port it does everything I need.</div></div><div><br></div><div>
Could you tell me where I can get the code of your patch?</div><div>I could start cleaning it up.</div><div><br></div><div>Farid<br><br><div class="gmail_quote">On Sun, Sep 5, 2010 at 4:19 PM, Juraj Fedel <span dir="ltr"><<a href="mailto:wtxnh-scribus@yahoo.com.au">wtxnh-scribus@yahoo.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sat, Aug 28, 2010 at 07:45:26PM +0200, Farid Elyahyaoui wrote:<br>
> I saw that there is a long standing feature request for a command line<br>
> version of Scribus to be able to create pdf's in a batch mode<br>
> (<a href="http://bugs.scribus.net/view.php?id=238" target="_blank">http://bugs.scribus.net/view.php?id=238</a>). Our company now has a student that<br>
> could invest a couple of months development time in such a feature.<br>
</div>...<br>
<div class="im">> Additionally we could add a "--no-interface" option to stop the gui from<br>
> being shown and also switch of rendering of the document to speed up things.<br>
> (An alternative would be to start scribus with the display set to a virtual<br>
> display using Xvfb.)<br>
<br>
</div>Hi,<br>
I just wanted to share some of myexperience with this issue even if am<br>
not in the scribus development team.<br>
<br>
Back in year 2006 I implemmented batch mode for scribus. What I was<br>
able to do is:<br>
- load and save PDF options from scripter into/from xml file<br>
- export pdf from command line<br>
scribus --to-pdf exported.pdf --pdf-options options.xml document.sla<br>
- run python script<br>
scribus --script program.py [arg1 [arg2 ...]]<br>
<br>
As I was using this I preffered to run puthon script and from there export<br>
PDF file (you can also export PS file from scripter if you need to) instead<br>
of using --to-pdf option.<br>
Something like:<br>
<br>
openDoc('document.sla')<br>
pdf = PDFOptions()<br>
pdf.loadPDFOptions('options.xml')<br>
pdf.filename = 'exported.pdf'<br>
pdf.embedList = getUsedFontNames()<br>
pdf.savePDF()<br>
p = Printer()<br>
p.filename = '<a href="http://exported.ps" target="_blank">exported.ps</a>'<br>
p.printer = 'File'<br>
p.savePS()<br>
closeDoc()<br>
<br>
This worked and satisfied my needs perfectly. It was able to work<br>
without rendering any window on the desktop but it needed X server<br>
nevertheless. Problem with it is that I was using scribus 1.3.2 at the<br>
time and did not upgraded since then. It also was really just a fast<br>
ugly hack and when I passed the patch to developers it must have been<br>
dificult for them to us it. Instead of creating clean patch for each<br>
feature I mixed it all together also with some code cleaning at random<br>
places, fixing some bugs and who know what not. Anyway developers<br>
stated that they will try to adapt the patch and include it in 1.3.4<br>
version. Considering what mess I send them it is no wonder if<br>
developers could not use it at all - my bad :(<br>
<br>
So the task is not impossible it just need more attention to do it<br>
right.<br>
<br>
Good luck<br>
<font color="#888888">Juraj Fedel<br>
<br>
</font></blockquote></div><br></div>