I've done this, but in a slightly different way.

I was going to clean up the code I've written and send it to the list as a
possible alternative to the current AWTViewer, and will, when I'm not
ashamed of it and have put internationalization support back in.

Broadly, you pass a FOP file to a SwingHandler (or something) which formats
it using the AWT formatter and returns a Component which you can then embed
in whatever you want.  This component includes a menubar which allows you to
print (the handler renders the FOP file using the PrintRenderer) or save as
pdf (a FileChooser dialog is invoked, etc etc)

The advantage of this is that you're not stuck with pdf, and as more
renderers become available for FOP you can offer your users a broader choice
of what format to save the document in, and you're not limited to the
intersection of pdf & fo features in printing & previewing.

Alistair

ps - what I'd really like now is a/ to get round to disentangling FOP from
Batik to reduce the download size and b/ a nice, lightweight API for
building simple FOP files on the fly - maybe building on ECS - without the
overhead / size of Xalan

-----Original Message-----
From: Paul Kowlessar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 09, 2001 3:36 PM
To: [EMAIL PROTECTED]
Subject: pdf viewer


Hi,

I want to pass the pdf file created by fop to a java pdf viewer within
an application.  Can anyone recommend a viewer that can be embedded in a
java app.

Cheers...Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to