jfig.utils
Class ItextPDFWriter
java.lang.Object
jfig.utils.ItextPDFWriter
- public class ItextPDFWriter
- extends java.lang.Object
convert FIG to PDF using the iText PDF library.
See www.lowagie.com/iText/ for details and docs.
Constructor Summary |
ItextPDFWriter(com.lowagie.text.Document document,
com.lowagie.text.pdf.FontMapper mapper,
java.awt.Graphics2D pdf2D)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
A4_WIDTH
public static final int A4_WIDTH
- See Also:
- Constant Field Values
A4_HEIGHT
public static final int A4_HEIGHT
- See Also:
- Constant Field Values
_72_DPI
public static final double _72_DPI
- See Also:
- Constant Field Values
_75_DPI
public static final double _75_DPI
- See Also:
- Constant Field Values
ItextPDFWriter
public ItextPDFWriter(com.lowagie.text.Document document,
com.lowagie.text.pdf.FontMapper mapper,
java.awt.Graphics2D pdf2D)
setFontMapper
public void setFontMapper(com.lowagie.text.pdf.FontMapper mapper)
setDocument
public void setDocument(com.lowagie.text.Document document)
setTrafo
public void setTrafo(FigTrafo2D trafo)
setOrigTrafo
public void setOrigTrafo(FigTrafo2D origTrafo)
setPageNumber
public void setPageNumber(int p)
setPageOffsets
public void setPageOffsets(float dx,
float dy)
- e.g., used for FigImages in 4-up mode pages...
setPageOffsets
public void setPageOffsets(float dx,
float dy,
float w,
float h)
paintOneObject
public void paintOneObject(FigObject tmp)
paintOneTextObject
public void paintOneTextObject(FigText textObject)
- paint one text object to the PDF file.
This method is based on the stuff in jfig.java2d.FigTextRenderer.
We need special handling here, because the font widths used for
on-screen rendering (e.g. Lucida fonts) might be different for the
font widths used in the PDF file (e.g. Times/Helvetica/Courier).
getStringWidthPoints
public int getStringWidthPoints(int fontIndex,
int ptSize,
java.lang.String s)
msg
public void msg(java.lang.String s)
usage
public static void usage()
main
public static void main(java.lang.String[] args)