On Jan 25, 2008, at 18:29, david Beer wrote:
Hi
I developing a small apllication which will use FOP to transform
and xml
file to PDF. That part is fine but it would be nice if I can show
the user a
preview first using the PreviewPanel.
I have tried to get this to dispaly in a simple fram but am not
sure how I
get my transformed document into the PreviewPanel. I mean how do I
set up
the mime typ and get the right type of preview in the panel.
Careful with this approach, as the 'preview' may differ from the PDF-
result.
AWT/Java2D is actually a separate output target, for which we use
MIME type "application/x-fop-awt-preview" (try: "fop -out list" on
the command-line to get all supported MIME types). Depending on the
platform and configuration, this output may look different than what
the PDFRenderer produces.
I have looked at the PreviewDialog and that doesn't really help me in
working out how I should process my document with FOP and then
display it.
Because it does not really work this way, IIC (haven't used AWT
output myself that often).
If you want to get the full picture, try setting up FOP in an IDE
(see http://wiki.apache.org/xmlgraphics-fop/FOPIDESetupGuide), and
debug/step through the code in a session with the arguments: "-fo
{your_fo} -awt"
HTH!
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]