devxlogo

Using the FOP-to-AWT Viewer

Using the FOP-to-AWT Viewer

When you want to use the FOP-to-AWT Viewer from a Java application, you can use the ExampleAWTViewer.java. This application is available in the fop-0.20.5examplesembeddingjavaembedding directory. Using this class, you don’t have to develop the application from scratch.

Just copy the application, rename it, and make the following replacements:

//code to be replaced...//Setup directoriesFile baseDir = new File(".");...//Setup input and output filesFile fofile=new File(baseDir, "xml/fo/helloworld.fo");...//code for replacement...//Setup directoriesFile baseDir = new File("YOUR_DIRECTORY");...//Setup input and output filesFile fofile=new File(baseDir, "YOUR FO FILE");...
See also  Does It Make Sense to Splurge on a Laptop?
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist