Class ITextUtil
- java.lang.Object
-
- org.apache.maven.doxia.module.itext.ITextUtil
-
public class ITextUtil extends java.lang.Object
A set of util methods for theiText
framework- 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.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)
Returntrue
if the page size is supported byPageSize
class,false
otherwise.static void
writeHtml(java.io.InputStream is, java.io.OutputStream os)
Parse an iText XML from the specifiedInputStream
, writing an html document specifiedOutputStream
.static void
writePdf(java.io.InputStream is, java.io.OutputStream os)
Parse an iText XML from the specifiedInputStream
, writing an Pdf document specifiedOutputStream
.static void
writeRtf(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)
Returntrue
if the page size is supported byPageSize
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 specifiedInputStream
, writing an Pdf document specifiedOutputStream
.- Parameters:
is
- theInputStream
from which the XML is read.os
- theOutputStream
to 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
- theInputStream
from which the XML is read.os
- theOutputStream
to 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
- theInputStream
from which the XML is read.os
- theOutputStream
to which the result as Html is written.- See Also:
XmlToHtml
-
-