Re: Adding PPD support when rendering PS

2004-02-05 Thread Chris Bowditch
Alex wrote:

Hi, 
I've been looking at this for a couple of days, and figured I'd do best
to post and see what other folks think about this. 
Thanks for speaking up.

I have to implement PPD when generating PS for the project (FOP embedded
app) that I'm working on - I need to be able to force printer tray
selection/stapling etc. 
I also have had to do this. I wrote a java program to post process the 
postscript. But the tray can only be switched for physical pages, and 
not according to when a page master changes. To switch tray on logical 
pages, a change needs to be made to FOP. An extension element as a child 
of simple page master is one way of achieving this.

As such, I have "butchered" the version of FOP (0.20.5) that were using
in development here and have managed to get a rough and ready version of
what we need. If anyone is interested or has had a play with area,
please feel free to drop me a line. 

I'd be really interested if the group as a whole had any thoughts/ideas
which I could look at implementing and/or contributing back to the
project (if you'll take 'em of course!). 
Patches are most welcome, but as Jeremias pointed out they are unlikely 
to make it into 0.20.5 because that is a frozen code base. We are 
focused on HEAD development.

Thanks,

Chris




Re: Adding PPD support when rendering PS

2004-02-04 Thread Jeremias Maerki

On 04.02.2004 16:22:03 Alex wrote:
> I've been looking at this for a couple of days, and figured I'd do best
> to post and see what other folks think about this. 

Good idea. :-)

> I have to implement PPD when generating PS for the project (FOP embedded
> app) that I'm working on - I need to be able to force printer tray
> selection/stapling etc. 
> 
> As such, I have "butchered" the version of FOP (0.20.5) that were using
> in development here and have managed to get a rough and ready version of
> what we need. If anyone is interested or has had a play with area,
> please feel free to drop me a line. 

Being the PS renderer's original author I still have PPD support on my
list as a long-term goal. When I was still actively using FOP at work I
took another approach however: I've patched the generated PostScript
files using home-written Java classes. I also had to add things like OMR
marks or embedded fonts so doing the tray selection in the same way was
easy.

Although I'm not really active in the development right now, I'm
certainly keeping an eye on this issue.

> I'd be really interested if the group as a whole had any thoughts/ideas
> which I could look at implementing and/or contributing back to the
> project (if you'll take 'em of course!). 

Contributions are always welcome. Just keep in mind that patches for FOP
0.20.5 (or the maintenance branch) will have a very high probability of
not making it into our codebase since that branch is frozen. We're
concentrating on the new codebase (HEAD, redesign). It shouldn't be a
big problem to avoid writing all of the code twice if you need PPD
support for 0.20.5 (as the 1.0 release is still a few months in the
future).

It's important to have a good separate PPD parser and then all you need
is to include the right sequences in the right places. Well, the latter
won't be so easy in the end since you have to have some kind of
communication from the XSL-FO file (using custom tags or attributes) to
the renderer to map page masters to a tray etc. There's probably an
easier way if you provide the mapping information directly to the
renderer in Java code but in the long term I believe the mapping should
be done in XSL-FO.

Anyway, as a long-term investment it would be cool if you wrote the code
for the HEAD in parallel with the one for 0.20.5.

I'll assist you with (hopefully) good advice and maybe more, as time
permits.

Jeremias Maerki