[Scribus] Importing multi-page pdf (2)

Craig Ringer craig
Thu Feb 9 09:31:43 CET 2006

On Fri, Feb 03, 2006 at 02:05:03AM +0100, Craig Bradney wrote:
> > > c) I'm too lazy and want Scribus to do it for me, automagically. (click,
> > > click, click.. BANG!.. done.. on your page(s))
> > >
> > > so, I'll code it if I get a chance, though I'm hacking on other things
> > > tonight.
> >
> > And this is precisely why we're here. But what if somebody figured out
> > how to run pdftk from a script, and then handed that over to Scribus...?
> > Looking at the job that pdftk does, it's not so much of a BANG! but more
> > of a rumble, rumble, rumble...yet still automagical.
> We call ghostscript to do the current work, I cant see why we can't continue 
> to use it.

gs is in fact quite capable of extracting only one page from a PDF when
processing to (eg) raster output. All that's needed are some
enhancements to Scribus to:

- Extract the number of pages in the PDF from the PDF file
  (I have a library in the works that should do that in a while,
   presuming no better solutions turn up first)
- Preview PDFs with a "page number" control
- Pass the "page number" informatino through the layers to the gs call
- Store the page number in the PageItem and its saved XML snippet

The hardest bit of that is the page count. We can actually do without
that at first, by just letting the user use a spin box and showing a "no
such page or render error" preview image when they go off the end of the

The key thing is that pdftk is *not* necessary. It just needs some
smarts in Scribus.

Craig Ringer

More information about the scribus mailing list