PDF generation with fop script from Apache-Fop


The Fop-1.1 distribution contains a multifuntional script to execute FOP from the command-line (fop / Unix, fop.bat / Windows).

  1. Generate pdf from XML-FO file :
    sh /Path/To/.../fop-1.1/fop -fo  Menu.fo.xml -pdf Menu.pdf

  2. Generate XML-FO from source XML and XSLT transform :
    sh /Path/To/.../fop-1.1/fop -xml  Menu.xml -xsl Menu2FO.xsl  -foout Menu.fo.xml
    (same as xsltproc Menu2FO.xsl Menu.xml > Menu.fo.xml)

  3. Directly generate pdf from source XML and XSLT transform :
    sh /Path/To/.../fop-1.1/fop -xml  Menu.xml -xsl Menu2FO.xsl  -pdf Menu.pdf