fop 0.93

org.apache.fop.servlet
Class FopPrintServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.apache.fop.servlet.FopServlet
                    |
                    +--org.apache.fop.servlet.FopPrintServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class FopPrintServlet
extends FopServlet

Example servlet to generate a fop printout from a servlet. Printing goes to the default printer on host where the servlet executes. Servlet param is:

or
Example URL: http://servername/fop/servlet/FopPrintServlet?fo=readme.fo
Example URL: http://servername/fop/servlet/FopPrintServlet?xml=data.xml&xsl=format.xsl
Note: This servlet is derived from FopServlet. Most methods are inherited from the superclass. Only the differences to the base class are necessary.

Version:
$Id: FopPrintServlet.java 426576 2006-07-28 15:44:37Z jeremias $
Author:
Apache FOP Development Team
See Also:
Serialized Form

Fields inherited from class org.apache.fop.servlet.FopServlet
FO_REQUEST_PARAM, fopFactory, log, transFactory, uriResolver, XML_REQUEST_PARAM, XSLT_REQUEST_PARAM
 
Constructor Summary
FopPrintServlet()
           
 
Method Summary
protected  void render(javax.xml.transform.Source src, javax.xml.transform.Transformer transformer, javax.servlet.http.HttpServletResponse response)
          Renders an input file (XML or XSL-FO) into a PDF file.
 
Methods inherited from class org.apache.fop.servlet.FopServlet
configureFopFactory, convertString2Source, doGet, getFOUserAgent, init, renderFO, renderXML
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FopPrintServlet

public FopPrintServlet()
Method Detail

render

protected void render(javax.xml.transform.Source src,
                      javax.xml.transform.Transformer transformer,
                      javax.servlet.http.HttpServletResponse response)
               throws FOPException,
                      javax.xml.transform.TransformerException,
                      java.io.IOException
Description copied from class: FopServlet
Renders an input file (XML or XSL-FO) into a PDF file. It uses the JAXP transformer given to optionally transform the input document to XSL-FO. The transformer may be an identity transformer in which case the input must already be XSL-FO. The PDF is written to a byte array that is returned as the method's result.
Overrides:
render in class FopServlet
See Also:
FopServlet.render(javax.xml.transform.Source, javax.xml.transform.Transformer, javax.servlet.http.HttpServletResponse)

fop 0.93

Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.