From eb970f7950a8dbea3b5ad9cd07c35898edc91737 Mon Sep 17 00:00:00 2001 From: Clay Leeds Date: Mon, 3 Mar 2008 04:44:28 +0000 Subject: [PATCH] Updated the Apache FOP Quick Start to include a 'Hello World' document and make it more geared toward newbies (thanks Jeremias!). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@632938 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/xdocs/quickstartguide.xml | 125 ++++++++++++++---- 1 file changed, 96 insertions(+), 29 deletions(-) diff --git a/src/documentation/content/xdocs/quickstartguide.xml b/src/documentation/content/xdocs/quickstartguide.xml index 469698730..ca205f5a2 100644 --- a/src/documentation/content/xdocs/quickstartguide.xml +++ b/src/documentation/content/xdocs/quickstartguide.xml @@ -24,34 +24,101 @@ $Revision: 627324 $ -

The goal of his Quick Start Guide is to help novice users get Apache FOP up and running quickly. Typically, you'll need to:

-
    -
  1. Download FOP
  2. -
  3. Build FOP
  4. -
  5. Configure FOP
  6. -
  7. Run FOP
  8. -
-

Here are some links to help you find out what FOP can do, as well as how and where to get help:

- -

The following links will help you understand what FOP supports out of the box, and how to extend FOP using your own Fonts and Hyphenation files, as well as how to extend FOP with Extensions.

- +
+ FOP Essentials +

The goal of this Quick Start Guide is to help novice users get Apache FOP up and running quickly. Typically, you'll need to:

+
    +
  1. Download FOP
  2. +
  3. Build FOP (you can skip this step if you download the binary distribution!)
  4. +
  5. Configure FOP
  6. +
  7. Run FOP
  8. +
+

Here are some links to help you find out what FOP can do, as well as how and where to get help:

+ +

+ Once you've familiarized yourself with the basics, you can get more detailed information, + in the detailed FOP product documentation. +

+
+ +
+ Hello World with FOP +

+ This section walks you through a "Hello World!" page with Apache FOP. We're assuming you + download the binary distribution and that you have a Java Runtime Environment (version 1.4 + or later) installed. +

+
    +
  1. + Unpack the downloaded binary distribution to a directory of your choice (for example, + C:\FOP if you're on Windows). Let's call that + directory <fop-home>. +
  2. +
  3. + Get a command prompt in the <fop-home> directory and write:
    + Windows: fop -fo examples/fo/basic/readme.fo -awt
    + Unix: ./fop.sh -fo examples/fo/basic/readme.fo -awt
    +
  4. +
  5. + If all went well, this should open a window showing you a "readme"-style document. + This is just to verify that FOP runs correctly. +
  6. +
  7. + Now, take your favorite XML editor and create a small XML file like the following. Replace + "Frank" with your own first name to make it a bit more personal and save it as + name.xml:
    + Frank]]> +
  8. +
  9. + To produce a PDF file from this XML file, we need an XSLT stylesheet that converts the + XML to XSL-FO. This is the first step in the processing chain. The second step will be + done by FOP when it reads the generated XSL-FO document and formats it to a PDF document. + You can copy the following minimal XSLT stylesheet, which takes your first name and + produces a "Hello World!"-style document (save it as name2fo.xsl):
    + + + + + + + + + + + + + + Hello, ! + + + + + +]]> + +
  10. +
  11. + Finally, let's put the previous two steps together: Go back to the command prompt and + enter the following command:
    + Windows: fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf
    + Unix: ./fop.sh -xml name.xml -xsl name2fo.xsl -pdf name.pdf
    +
  12. +
  13. + You've produced your first PDF with Apache FOP! Please open name.pdf + in your favorite PDF viewer. +
  14. +
+
-- 2.39.5