org.mapfish.print
Class MapPrinter

java.lang.Object
  extended by org.mapfish.print.MapPrinter

public class MapPrinter
extends java.lang.Object

The main class for printing maps. Will parse the spec, create the PDF document and generate it.


Constructor Summary
MapPrinter(java.io.File config)
           
MapPrinter(java.io.InputStream instreamConfig, java.lang.String configDir)
           
MapPrinter(java.lang.String strConfig, java.lang.String configDir)
           
 
Method Summary
static PJsonObject parseSpec(java.lang.String spec)
           
 RenderingContext print(java.lang.String spec, java.io.OutputStream outFile, java.lang.String referer)
          Generate the PDF using the given spec.
 void printClientConfig(org.json.JSONWriter json)
          Use by /info.json to generate its returned content.
 void stop()
          Stop the thread pool or others.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPrinter

public MapPrinter(java.io.File config)
           throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

MapPrinter

public MapPrinter(java.io.InputStream instreamConfig,
                  java.lang.String configDir)

MapPrinter

public MapPrinter(java.lang.String strConfig,
                  java.lang.String configDir)
Method Detail

print

public RenderingContext print(java.lang.String spec,
                              java.io.OutputStream outFile,
                              java.lang.String referer)
                       throws com.lowagie.text.DocumentException
Generate the PDF using the given spec.

Returns:
The context that was used for printing.
Throws:
com.lowagie.text.DocumentException

parseSpec

public static PJsonObject parseSpec(java.lang.String spec)

printClientConfig

public void printClientConfig(org.json.JSONWriter json)
                       throws org.json.JSONException
Use by /info.json to generate its returned content.

Throws:
org.json.JSONException

stop

public void stop()
Stop the thread pool or others.



Copyright © 2009 Camptocamp SA. All Rights Reserved.