org.apache.maven.doxia.module.itext
Class ITextUtil

java.lang.Object
  extended by org.apache.maven.doxia.module.itext.ITextUtil

public class ITextUtil
extends java.lang.Object

A set of util methods for the iText framework

Version:
$Id: ITextUtil.java 496703 2007-01-16 14:27:31Z vsiveton $
Author:
Vincent Siveton

Constructor Summary
ITextUtil()
           
 
Method Summary
static com.lowagie.text.Rectangle getDefaultPageSize()
          Set the default page size for the document depending the user's country.
static java.lang.String getPageSize(com.lowagie.text.Rectangle rect)
          Return a page size as String.
static boolean isPageSizeSupported(java.lang.String aPageSize)
          Return true if the page size is supported by PageSize class, false otherwise
static void writeHtml(java.io.InputStream is, java.io.OutputStream os)
          Parse an iText XML from the specified InputStream, writing an html document specified OutputStream.
static void writePdf(java.io.InputStream is, java.io.OutputStream os)
          Parse an iText XML from the specified InputStream, writing an Pdf document specified OutputStream.
static void writeRtf(java.io.InputStream is, java.io.OutputStream os)
          Parse an iText XML from the specified InputStream, writing an rtf document specified OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITextUtil

public ITextUtil()
Method Detail

getDefaultPageSize

public static com.lowagie.text.Rectangle getDefaultPageSize()
Set the default page size for the document depending the user's country. TODO Maybe more generic?

Returns:
the page size
See Also:
PageSize

getPageSize

public static java.lang.String getPageSize(com.lowagie.text.Rectangle rect)
Return a page size as String.

Parameters:
rect - a Rectangle
Returns:
a page size as String
See Also:
PageSize

isPageSizeSupported

public static boolean isPageSizeSupported(java.lang.String aPageSize)
Return true if the page size is supported by PageSize class, false otherwise

Parameters:
aPageSize - a page size
Returns:
true if the page size is supported, false otherwise
See Also:
PageSize

writePdf

public static void writePdf(java.io.InputStream is,
                            java.io.OutputStream os)
Parse an iText XML from the specified InputStream, writing an Pdf document specified OutputStream.

Parameters:
is - the InputStream from which the XML is read.
os - the OutputStream to which the result as Pdf is written.
Throws:
java.lang.RuntimeException - if any
See Also:
XmlToPdf

writeRtf

public static void writeRtf(java.io.InputStream is,
                            java.io.OutputStream os)
Parse an iText XML from the specified InputStream, writing an rtf document specified OutputStream.

Parameters:
is - the InputStream from which the XML is read.
os - the OutputStream to which the result as RTF is written.
Throws:
java.lang.RuntimeException - if any
See Also:
XmlToRtf

writeHtml

public static void writeHtml(java.io.InputStream is,
                             java.io.OutputStream os)
Parse an iText XML from the specified InputStream, writing an html document specified OutputStream.

Parameters:
is - the InputStream from which the XML is read.
os - the OutputStream to which the result as Html is written.
Throws:
java.lang.RuntimeException - if any
See Also:
XmlToHtml


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.