org.apache.maven.doxia.module.itext

Class ITextUtil

public class ITextUtil extends 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

Method Summary
static RectanglegetDefaultPageSize()
Set the default page size for the document depending the user's country.
static StringgetPageSize(Rectangle rect)
Return a page size as String.
static booleanisPageSizeSupported(String aPageSize)
Return true if the page size is supported by PageSize class, false otherwise
static voidwriteHtml(InputStream is, OutputStream os)
Parse an iText XML from the specified InputStream, writing an html document specified OutputStream.
static voidwritePdf(InputStream is, OutputStream os)
Parse an iText XML from the specified InputStream, writing an Pdf document specified OutputStream.
static voidwriteRtf(InputStream is, OutputStream os)
Parse an iText XML from the specified InputStream, writing an rtf document specified OutputStream.

Method Detail

getDefaultPageSize

public static 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: com.lowagie.text.PageSize

getPageSize

public static String getPageSize(Rectangle rect)
Return a page size as String.

Parameters: rect a Rectangle

Returns: a page size as String

See Also: com.lowagie.text.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: com.lowagie.text.PageSize

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.

Throws: RuntimeException if any

See Also: com.lowagie.text.xml.XmlToHtml

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.

Throws: RuntimeException if any

See Also: com.lowagie.text.xml.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.

Throws: RuntimeException if any

See Also: com.lowagie.text.xml.XmlToRtf

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