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 "Lawford, Mark : Enable" <ma...@barclays.co.uk> on 2004/12/23 13:22:43 UTC

FOP Preview Dialog

Hi guys,

I've been playing around with XSLT and FO for a couple of months, learning
the various syntaxes and such. I've only just realised however that there is
a PreviewDialog class included in the FOP code.

I hven't worked out how to use this thing however.

As a minimum "PreviewDialog(AWTRenderer aRenderer, Translator aRes)" appears
to build the dialog but how do I get it to that stage?

I can guess the renderer but what of the Translator?

If I have a source XML file and an XSLT stylesheet that produces FO content,
how do I preview the transformation from my Java code?


Mark Lawford
Analyst Programmer

Enable ISS - Hastings
Mid Range Services
Cavendish House,
Castle Street,
Hastings, East Sussex
TN34 3DY

* 01424 4533018/ (7) 4274 3018 
*      07957 280 811
* mark.lawford@barclays.co.uk
* Mail Van E


Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group.  Replies to this email may be monitored by the Barclays Group
for operational or business reasons.

Barclays Bank PLC.  Authorised and regulated by the Financial Services
Authority.

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


Re: FOP Preview Dialog

Posted by Jeremias Maerki <de...@greenmail.ch>.
Stupid of me. I wrote an example last year and didn't even remember.
Maybe that's a better starting point. Sorry.

http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleAWTViewer.java?hideattic=0&rev=1.1&view=log

Also note, that Translator is a class, not an interface. Make sure you
have the right imports (meaning you use the right class and not some
other interface).

On 23.12.2004 14:20:16 Lawford, Mark : Enable wrote:
> Okay, thanks for that.
> 
> I did notice the following though:
> 
> translator = new Translator(Locale.getDefault());
> 
> The same line in my code complains as Translator is an interface.
> 
> "The type org.apache.fop.viewer.Translator is not a valid type"


Jeremias Maerki


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


Re: FOP Preview Dialog

Posted by Jeremias Maerki <de...@greenmail.ch>.
Have a look at the AWTStarter which itself instantiates and uses the
preview dialog. AWTStarter is used when FOP is started from the
command-line.

http://cvs.apache.org/viewcvs.cgi/xml-fop/src/org/apache/fop/apps/AWTStarter.java?hideattic=0&rev=1.19&view=auto

HTH

On 23.12.2004 13:22:43 Lawford, Mark : Enable wrote:
> I've been playing around with XSLT and FO for a couple of months, learning
> the various syntaxes and such. I've only just realised however that there is
> a PreviewDialog class included in the FOP code.
> 
> I hven't worked out how to use this thing however.
> 
> As a minimum "PreviewDialog(AWTRenderer aRenderer, Translator aRes)" appears
> to build the dialog but how do I get it to that stage?
> 
> I can guess the renderer but what of the Translator?
> 
> If I have a source XML file and an XSLT stylesheet that produces FO content,
> how do I preview the transformation from my Java code?

Jeremias Maerki


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