[scribus] Automating PDF process

Gregory Pittman gregp_ky at yahoo.com
Sat Apr 3 17:10:08 CEST 2010


On 04/02/2010 11:12 PM, srikrishnan wrote:
> Submitted on 04/03/2010
> Submitted by anonymous user: [10.1.6.26]
>
> Submitted values are:
>
>     Your contact information:
>       Name: srikrishnan
>       Email Address: srikrishnan2003 at yahoo.co.in
>     Your request content:
>       Subject: Automating PDF process
>       Message:
> Hi,
>
> I am new to Scribus, I want to create PDF for the set of images (which
> contains both EPS and TIFF) in a folder. I have a format for this process, in
> that format I want to place all the images one by one in a PDF (no constraint
> for number of pages).
>
> My idea is, I want to create sla file outside Scribus with the help of perl
> and open it in Scribus automatically and make PDF from that file.
>
> If Possible, please share with me the possibilities, ideas and methods. It
> would be very much helpful for me
>
> Thanks,
> Srikrishnan
>
>     About your Scribus program:
>       Version: 1.3.5
>       Prebuilt/Compiled: Prebuilt
>       Build Date:
>     Your operating system and CPU:
>       Type: Windows
>       Version: WinXP
>       CPU type:

Years ago I did more or less this same thing. All it takes is that you 
create a minimal (one or two page) Scribus file manually, then go to the 
SLA file to create the content of the strings with which you will 
assemble your file, then get a list of file names from your directory to 
plug into the PAGEOBJECT tags as your perl program builds the file.

An advantage of this is that it is extremely fast, but does require 
taking the time to analyze an SLA file to see how they are constructed 
and which tags do what.

A disadvantage is that you are stuck in time with the file format, which 
continues to evolve. If you ever tried to use an older version of 
Scribus to load such a file, it would not work.

Eventually, I worked with Scripter to accomplish the same thing inside 
Scribus, and while I haven't used it in a while, when I have done so 
over the years, I find that the script continues to work as new Scribus 
versions have been released (with occasional minor tweaks). You might 
check my end result here:

http://wiki.scribus.net/index.php/Automatic_import_of_images:_Versions_not_requiring_Tkinter

I've used this quite a bit for my own purposes, but consider these 
versions proof of concept, with some variations, such as Henry Hartley's 
version made to his liking. The important customizations include how 
many and where you want your image frames, the paper size, and whether 
you want any other embellishments such as text frames.

If you already know perl but not python, you should find little 
difficulty learning some python once you see the differences in syntax.

My approach to using Scripter or even outside helper scripts is that you 
should use these other methods for the tedium, but leave the things that 
Scribus does very well with greatest flexibility to your polishing and 
editing of the document afterward with Scribus itself.

Greg





More information about the scribus mailing list