On Wed, 01 Aug 2012 02:53:49 -0700, jdaw1 wrote:
> On Wednesday, August 1, 2012 9:15:37 AM UTC+1, Chris wrote:
<SNIP>
> Yes, that would have the effect you say. But the example output contains
> twenty-two copies of several complicated graphics. Using execform and
> Adobe Distiller causes the PDF to hold only two copies of each graphic
> (should be one, but it’s two), the third and subsequent instances being
> replaced with a pointer to the second. That greatly lightens the PDF,
> and might speed printing. If it is possible to dodge the Preview failure
> to render transfers without losing that lightness, that would be
> preferred.
Preview may be displaying the cached form data - it *should* re-execute
the PaintProc because the transfer function is changed, but it might not
be.
Have you checked whether Preview applies transfer functions at all? Even
without the form involved?
Basically, what you're doing is *not* what forms are designed for, so
it's likely to be problematic.
Here's a thought: what about, before the first call to execform, doing:
<</MaxFormItem 0>> setuserparams
That should disable the form cache, on any compliant interpreter. Then
you should be able to use the redefining setgray trick mentioned earlier.
Make sure the PaintProc isn't bound, though.
> Also, no need to modify PaintProc. It can just be called differently:
> “dup /PaintProc get exec” rather than “execform”, which can be done by
> re-def’ing execform.
That assumes that the PaintProc never paints outside the form bounding
box, and that the form matrix is an identity matrix. You can, of course,
manually set all that up before execing the PaintProc, but if you're not
using the form cache, why bother faffing about with a form dictionary.
Chris