You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by paul womack <pw...@papermule.co.uk> on 2008/05/09 11:09:42 UTC

generating EPSF (with preview)?

I note that fop can generate printable PostScript
(the -ps flag in the command line version).

My requirment is to generate EPSF; I am making
"fragments" for makeup into a large page
by an external (interactive) application.

The postscript generated is most definitely
NOT epsf, or even close. In particular there *IS*
is a call to a global device operator - setpagedevice.

q1) are there any plans to generate EPSF?
I suspect I know enough to use perl (or similar) to transform
the present PostScript into EPSF, but I'd rather not...

An epsf file, to be useful in an interactive environment
needs a rendered preview. Given that fop can also
generate a number of raster formats, I was hoping
to use this facility to generate EPSF and a raster
preview from the same xsl/data. However, given
some helpful advice from Andreas, it appears
that choice of renderer influences layout decisions.

q2) Is it possible to (somehow) use the same layout
for two renderers? in my particular circumstances
induividual character appearance is a moderately low
priority; whiat I do require is that line wrapping
and general layout is the same between the EPSF and
the preview.

If the AT file specified the exact placement of each character
my purpose would be well served.

   BugBear

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: generating EPSF (with preview)?

Posted by Andreas Delmelle <an...@telenet.be>.
On May 9, 2008, at 11:09, paul womack wrote:

Hi Paul

> q1) are there any plans to generate EPSF?
> I suspect I know enough to use perl (or similar) to transform
> the present PostScript into EPSF, but I'd rather not...

To my knowledge, this is not on the planning yet.

> An epsf file, to be useful in an interactive environment
> needs a rendered preview. Given that fop can also
> generate a number of raster formats, I was hoping
> to use this facility to generate EPSF and a raster
> preview from the same xsl/data. However, given
> some helpful advice from Andreas, it appears
> that choice of renderer influences layout decisions.
>
> q2) Is it possible to (somehow) use the same layout
> for two renderers?

See the link Jeremias provided yesterday. I indeed pointed out that  
you should specify the eventual target format.
If you were to use one area tree, with 'application/pdf' as target,  
you can render that same file to PDF and to TIFF.
The differences between the two should then be restricted to a  
minimum (while the TIFF output will be different from the result you  
would get when rendering to TIFF directly).


HTH!


Cheers

Andreas




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: generating EPSF (with preview)?

Posted by paul womack <pw...@papermule.co.uk>.
Jeremias Maerki wrote:
> Which is why I wrote "closely resembling output". 

Ah! Damn this English language; one man's "closely"
is another man's "not close enough" :-)

 > There's no (efficient) way
> we can do any better with the current design. If it's a problem in your
> case, you're out of luck, I'm afraid.

That's OK - I was just attempting to confirm
facts before wasting effort.

>> I may have to use ghostscript to render the postscript to get
>> a preview, sadly. I'd rather have stayed in one "world".
> 
> So help us improve FOP. Some time ago we started investigating a new
> intermediate format. What we've started outlining there would allow
> exact character placing:
> http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml/NewDesign

With my "general experience" hat on;

Sadly, this exchanges one problem for another. "proper" strings
are rather desirable when generating PDF and/or postscript,
since they facilitate compact (even elegant) representations,
*and* text searching or extraction later (should that be relevant).

It would (I freely admit) help my case greatly ;-)

    BugBear

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: generating EPSF (with preview)?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 09.05.2008 12:05:13 paul womack wrote:
> Jeremias Maerki wrote:
> >>
> >> q2) Is it possible to (somehow) use the same layout
> >> for two renderers? in my particular circumstances
> >> induividual character appearance is a moderately low
> >> priority; whiat I do require is that line wrapping
> >> and general layout is the same between the EPSF and
> >> the preview.
> >>
> >> If the AT file specified the exact placement of each character
> >> my purpose would be well served.
> > 
> > The AT does that. Not with absolute coordinates for each glyph but the
> > renderers will produce closely resembling output.
> 
> I'm afraid not; since "whole lines" are commonly passed to  the renderers
> small changes in the character width can accumulate; this is
> (sadly) more than enough to drive words (or at least parts of words)
> off the right hand edge, or conversely to make justified
> text extremely (intolerably) ragged.

Which is why I wrote "closely resembling output". There's no (efficient) way
we can do any better with the current design. If it's a problem in your
case, you're out of luck, I'm afraid.

> I may have to use ghostscript to render the postscript to get
> a preview, sadly. I'd rather have stayed in one "world".

So help us improve FOP. Some time ago we started investigating a new
intermediate format. What we've started outlining there would allow
exact character placing:
http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml/NewDesign

Just don't ask the "when" question. ;-) We've started the process but
it's currently not active. We'll get back to it eventually, I think.

>    BugBear




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: generating EPSF (with preview)?

Posted by paul womack <pw...@papermule.co.uk>.
Jeremias Maerki wrote:
>>
>> q2) Is it possible to (somehow) use the same layout
>> for two renderers? in my particular circumstances
>> induividual character appearance is a moderately low
>> priority; whiat I do require is that line wrapping
>> and general layout is the same between the EPSF and
>> the preview.
>>
>> If the AT file specified the exact placement of each character
>> my purpose would be well served.
> 
> The AT does that. Not with absolute coordinates for each glyph but the
> renderers will produce closely resembling output.

I'm afraid not; since "whole lines" are commonly passed to  the renderers
small changes in the character width can accumulate; this is
(sadly) more than enough to drive words (or at least parts of words)
off the right hand edge, or conversely to make justified
text extremely (intolerably) ragged.

I may have to use ghostscript to render the postscript to get
a preview, sadly. I'd rather have stayed in one "world".

   BugBear

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: generating EPSF (with preview)?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 09.05.2008 11:09:42 paul womack wrote:
> I note that fop can generate printable PostScript
> (the -ps flag in the command line version).
> 
> My requirment is to generate EPSF; I am making
> "fragments" for makeup into a large page
> by an external (interactive) application.
> 
> The postscript generated is most definitely
> NOT epsf, or even close. In particular there *IS*
> is a call to a global device operator - setpagedevice.
> 
> q1) are there any plans to generate EPSF?

Not that I know of.

> I suspect I know enough to use perl (or similar) to transform
> the present PostScript into EPSF, but I'd rather not...

May not be that easy. The PostScript renderer currently generates
PostScript level 3. But most applications that deal with EPS can only
process PostScript level 1.

GhostScript should be able to transform PS Level 3 into EPS level 1.

> An epsf file, to be useful in an interactive environment
> needs a rendered preview. Given that fop can also
> generate a number of raster formats, I was hoping
> to use this facility to generate EPSF and a raster
> preview from the same xsl/data. However, given
> some helpful advice from Andreas, it appears
> that choice of renderer influences layout decisions.
> 
> q2) Is it possible to (somehow) use the same layout
> for two renderers? in my particular circumstances
> induividual character appearance is a moderately low
> priority; whiat I do require is that line wrapping
> and general layout is the same between the EPSF and
> the preview.
> 
> If the AT file specified the exact placement of each character
> my purpose would be well served.

The AT does that. Not with absolute coordinates for each glyph but the
renderers will produce closely resembling output.

>    BugBear
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org