Forum How do I...?

Image OPI

mrplough
Hi all,

Is it possible to add OPI (open prepress interface) information to an image?

Many thanks in advance.
mikeday
Is this something that Prince would need to add to the image object in the generated PDF file? If so, where should Prince get the data from, the original image file, or CSS properties?
mrplough
Hi Mikeday,

I believe they would need to be added to the PDF file as OPI comments (not sure where in the file though).

I think a CSS property would be good so that they could be easily set dynamically, especially in my specific case where I'm attempting to set up image replacement.
mikeday
The PDF 1.6 specification includes section 10.10.6 Open Prepress Interface (OPI), describing OPI dictionaries that can be associated with an image proxy, including information such as a filename field equivalent to the PostScript %ALDImageFilename comment. I guess you would need some CSS properties to specify these for a given image, something like this:
img.proxy {
    prince-pdf-opi-filename: "/path/to/big/image";
    prince-pdf-opi-id: "MyBigImage";
    ...
}

However, there are a lot of other fields, such as Position, CropRect, Tint, Overprint, etc. It's probably not practical to define CSS properties for all of these, so perhaps it would be better to have a single property that allows you to specify multiple values:
img.proxy {
    prince-pdf-opi: F "filename" ID "id" CropRect "0 0 400 200" ...
}

Does this look like the sort of interface that you would need?
mrplough
Hi Mikeday,

A single property with multiple values would certainly do the trick.