org.seasar.tuigwaa.cms.core.pdf
クラス PdfUtils

java.lang.Object
  拡張org.seasar.tuigwaa.cms.core.pdf.PdfUtils

public class PdfUtils
extends Object

KNOWN ISSUE 1. Japanese character is unavailable in PdfPTable During parsing, HTMLWorker uses FactoryProperties static methods. It will create the font object by FactoryProperties#getFont, and we can specify fontname as "face" style, though the encoding is fixed to "BaseFont.WINANSI", that is CP1252, Latin1. Thus, at least, we could not get the objects which can display Japanese character soon after parsing phase even if Japanese fonts are registered by FontFactory#register and its name are given to "face" style. To make matters complicated, HTMLWorker uses PdfPTable to convert <table> and wrapper class IncTable for PdfPTable, and IncCell for PdfPCell. In IncCell, it adds Element by PdfPCell#addElement methods. PdfPCell#addElement methods doesn't keep Phrase or Chunk object in its instances but directly calles ColumnText#addElement. ColumnText#addElement adds element into its protected LinkedList and it seems to be no way provided to change that added element property. => This solved by to create extended class CJKHTMLWorker and CJKFactoryProperties for HTMLWorker and FactoryProperties.

作成者:
someda

フィールドの概要
static com.lowagie.text.pdf.BaseFont BASEFONT_GOTHIC
           
static com.lowagie.text.pdf.BaseFont BASEFONT_MINCHO
           
static String DEFAULT_PDF_PAGESTYLE
           
static com.lowagie.text.Font FONT_ERROR
           
static com.lowagie.text.Font FONT_JA_GOTHIC
           
static com.lowagie.text.Font FONT_JA_MINCHO
           
 
コンストラクタの概要
PdfUtils()
           
 
メソッドの概要
static Object convertHTMLtoPDF(String s)
           
static Properties getChapterfontProperties(com.lowagie.text.Font defaultFont)
           
static Properties getDefaultfontProperties(com.lowagie.text.Font defaultFont)
           
static com.lowagie.text.Rectangle getRectangle(String style)
           
static Properties getSectionfontProperties(com.lowagie.text.Font defaultFont, int depth)
           
static String getStringResult(Object obj)
           
static boolean isSimpleStyle(String style)
           
static Object parseHTMLtoPDF(Reader reader)
           
static Object parseHTMLtoPDF(String s)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

FONT_JA_GOTHIC

public static com.lowagie.text.Font FONT_JA_GOTHIC

FONT_JA_MINCHO

public static com.lowagie.text.Font FONT_JA_MINCHO

FONT_ERROR

public static com.lowagie.text.Font FONT_ERROR

BASEFONT_GOTHIC

public static com.lowagie.text.pdf.BaseFont BASEFONT_GOTHIC

BASEFONT_MINCHO

public static com.lowagie.text.pdf.BaseFont BASEFONT_MINCHO

DEFAULT_PDF_PAGESTYLE

public static final String DEFAULT_PDF_PAGESTYLE
関連項目:
定数フィールド値
コンストラクタの詳細

PdfUtils

public PdfUtils()
メソッドの詳細

getDefaultfontProperties

public static Properties getDefaultfontProperties(com.lowagie.text.Font defaultFont)

getChapterfontProperties

public static Properties getChapterfontProperties(com.lowagie.text.Font defaultFont)

getSectionfontProperties

public static Properties getSectionfontProperties(com.lowagie.text.Font defaultFont,
                                                  int depth)

convertHTMLtoPDF

public static Object convertHTMLtoPDF(String s)

parseHTMLtoPDF

public static Object parseHTMLtoPDF(String s)

parseHTMLtoPDF

public static Object parseHTMLtoPDF(Reader reader)

getStringResult

public static String getStringResult(Object obj)

getRectangle

public static com.lowagie.text.Rectangle getRectangle(String style)

isSimpleStyle

public static boolean isSimpleStyle(String style)


Copyright © 2005-2006 The Seasar Foundation and the others.. All Rights Reserved.