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 pedro <pe...@libero.it> on 2011/02/18 11:32:05 UTC

Fop Preview

Hi all
   i need to preview my document in a JPanel, i found the class PreviewPanel
and i try to use it but i'm not able to do it.

[code]

				File fileXml = new File("c:\\xml.xml");
					FileWriter fileWriter = new FileWriter(fileXml);
					fileWriter.write(xml);
					fileWriter.flush();
					fileWriter.close();


					File fileXsl = new File("c:\\xsl.xml");
					fileWriter = new FileWriter(fileXsl);
					fileWriter.write(xsl);
					fileWriter.flush();
					fileWriter.close();


					InputHandler inputHandler = new
AreaTreeInputHandler(fileXml,fileXsl,null);
					
				//	fOAWTRenderer = new AWTRenderer(true);
			FopFactory fopFactory = FopFactory.newInstance();

			AWTRenderer	renderer = new AWTRenderer(true);
			renderer.setPreviewDialogDisplayed(false);
			renderer.setRenderable(inputHandler);
			FOUserAgent foUserAgent = fopFactory
				.newFOUserAgent();
			renderer.setUserAgent(foUserAgent);
			foUserAgent.setRendererOverride(renderer);

			PreviewPanel previewPanel = new PreviewPanel(foUserAgent,null ,
						renderer);

[/code]


i put the panel on my frame but i can't see nothing, i try to open the
dialog and it is empty with only the toolbar.
Someone can help me?


Thanks!!
-- 
View this message in context: http://old.nabble.com/Fop-Preview-tp30957489p30957489.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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