Being lazy, or how not to expand control files

Eric Smith tumble-users@lists.brouhaha.com
Wed Dec 17 18:16:02 2003


Paul Williams wrote:
> I have recently been using control files with tumble and wondering how
> the language could be expanded to cover some things I would like to do,
> such as to producing proper blank pages (rather than copying a blank
> TIFF across) and compositing images.

Both are on my to-do list.  Adding blank page support should be very
easy.  Compositing is easy if the images are the same size (full-page),
but that's not too useful.  Adding syntax to the control file to
specify the image size and location on a page shouldn't be too difficult.

My main reason for wanting compositing capability is to have pages
that have both G4 compressed text and line art, and JPEG compressed
continuous-tone images, or pages with G4 bitmaps in multiple colors
(for instance, pages that are mostly black text with some red text).

Ideally I'd like to have a tool chain that takes uncompressed greyscale
or color images, and identifies the continuous-tone regions automatically.
I have some ideas for algorithms to do that.  But in the short term, it's
more likely that I'll do that by manually selecting the continous-tone
images in GIMP and using a script that saves them separately.

> For the past two hours I've been looking at the Perl module PDF::API2.

I just started using PDF::API2 for another project this week.  I've
only used it to construct PDF files; I haven't yet tried using PDF
files as input.

> I think I'll have to write up this experiment as a web page to really
> show how it's done, but I'd be happy to send some examples of using
> PDF::API2 to anyone who'd like to experiment.

That would be great!  If they're not too big, you're welcome to post
them to the mailing list.

Eric