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

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

public class ITextUtil
extends Object

A set of util methods for the iText framework

Version:
$Id: ITextUtil.java 1003453 2010-10-01 09:45:16Z ltheussl $
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 String getPageSize(com.lowagie.text.Rectangle rect)
          Return a page size as String.
static boolean isPageSizeSupported(String aPageSize)
          Return true if the page size is supported by PageSize class, false otherwise.
static void writeHtml(InputStream is, OutputStream os)
          Parse an iText XML from the specified InputStream, writing an html document specified OutputStream.
static void writePdf(InputStream is, OutputStream os)
          Parse an iText XML from the specified InputStream, writing an Pdf document specified OutputStream.
static void writeRtf(InputStream is, 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 String getPageSize(com.lowagie.text.Rectangle rect)
Return a page size as String.

Parameters:
rect - a Rectangle defined in PageSize.
Returns:
a page size as String or A4 if not found.
See Also:
PageSize

isPageSizeSupported

public static boolean isPageSizeSupported(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(InputStream is,
                            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.
See Also:
XmlToPdf

writeRtf

public static void writeRtf(InputStream is,
                            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.
See Also:
XmlToRtf

writeHtml

public static void writeHtml(InputStream is,
                             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.
See Also:
XmlToHtml


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.