[scribus] saving as EPS automatically

hw hw at gc-24.de
Fri Apr 1 10:41:53 UTC 2016


is there a way to save (the first page of) a document as EPS

I've been trying the script below with the 1.5.1 appimage,
and it crashes when trying to save as EPS.  Saving as PDF works
fine --- however, I'd prefer to save as EPS because that gives
much better quality when printing.


We need this to automatically print labels on Sato CL408e label
printers.  The idea is to create a template with Scribus and to
use perl scripts to replace placeholders in the template with
data from a mysql database, and then have scribus create an EPS
file from the modified template.  The EPS file can then be printed
with cups.

So far, we have been printing labels by creating PDF files with
LaTeX.  Unfortunately, there are some rather complicated labels
which are overly tedious to create with LaTeX, so we're looking
for better solutions.  Scribus would seem to be a good option.
Of course, we're open for other suggestions as well.

BTW, is it possible to run Scribus to do the conversion to EPS
(or PDF) on the server without Scribus failing because there's no
X session?  Can it be compiled as some sort of conversion filter
without GUI support?

Here's the script I tried:

import os, sys
import scribus

def main(argv):

     if scribus.haveDoc() :
         # pagecount = scribus.pageCount()
         # if pagecount > 1 :
         #     print("too many pages");
         # else :
         #     filename = os.path.splitext(scribus.getDocName())[0]
         #     epsfile = filename + ".eps"

         #     scribus.deselectAll()
         #     scribus.gotoPage(1)
         #     scribus.savePageAsEPS(epsfile)

         pdf = scribus.PDFfile()
         filename = os.path.splitext(scribus.getDocName())[0]
         pdf.file = filename + ".pdf"

         # scribus.gotoPage(1)
         scribus.savePageAsEPS(filename + ".eps")

     else :
         print("no file open")

if __name__ == '__main__':

More information about the scribus mailing list