Class ITextUtil
- java.lang.Object
-
- org.apache.maven.doxia.module.itext.ITextUtil
-
public class ITextUtil extends java.lang.ObjectA set of util methods for theiTextframework- Version:
- $Id: ITextUtil.java 1003453 2010-10-01 09:45:16Z ltheussl $
- Author:
- Vincent Siveton
-
-
Constructor Summary
Constructors Constructor Description ITextUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.lowagie.text.RectanglegetDefaultPageSize()Set the default page size for the document depending the user's country.static java.lang.StringgetPageSize(com.lowagie.text.Rectangle rect)Return a page size as String.static booleanisPageSizeSupported(java.lang.String aPageSize)Returntrueif the page size is supported byPageSizeclass,falseotherwise.static voidwriteHtml(java.io.InputStream is, java.io.OutputStream os)Parse an iText XML from the specifiedInputStream, writing an html document specifiedOutputStream.static voidwritePdf(java.io.InputStream is, java.io.OutputStream os)Parse an iText XML from the specifiedInputStream, writing an Pdf document specifiedOutputStream.static voidwriteRtf(java.io.InputStream is, java.io.OutputStream os)Parse an iText XML from the specifiedInputStream, writing an rtf document specifiedOutputStream.
-
-
-
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 defined inPageSize.- Returns:
- a page size as String or A4 if not found.
- See Also:
PageSize
-
isPageSizeSupported
public static boolean isPageSizeSupported(java.lang.String aPageSize)
Returntrueif the page size is supported byPageSizeclass,falseotherwise.- Parameters:
aPageSize- a page size- Returns:
trueif the page size is supported,falseotherwise- See Also:
PageSize
-
writePdf
public static void writePdf(java.io.InputStream is, java.io.OutputStream os)Parse an iText XML from the specifiedInputStream, writing an Pdf document specifiedOutputStream.- Parameters:
is- theInputStreamfrom which the XML is read.os- theOutputStreamto which the result as Pdf is written.- See Also:
XmlToPdf
-
writeRtf
public static void writeRtf(java.io.InputStream is, java.io.OutputStream os)Parse an iText XML from the specifiedInputStream, writing an rtf document specifiedOutputStream.- Parameters:
is- theInputStreamfrom which the XML is read.os- theOutputStreamto which the result as RTF is written.- See Also:
XmlToRtf
-
writeHtml
public static void writeHtml(java.io.InputStream is, java.io.OutputStream os)Parse an iText XML from the specifiedInputStream, writing an html document specifiedOutputStream.- Parameters:
is- theInputStreamfrom which the XML is read.os- theOutputStreamto which the result as Html is written.- See Also:
XmlToHtml
-
-