org.xhtmlrenderer.pdf
Class ITextOutputDevice
java.lang.Object
org.xhtmlrenderer.render.AbstractOutputDevice
org.xhtmlrenderer.pdf.ITextOutputDevice
- All Implemented Interfaces:
- OutputDevice
public class ITextOutputDevice
- extends AbstractOutputDevice
- implements OutputDevice
This class is largely based on PdfGraphics2D
. See
http://sourceforge.net/projects/itext/ for license information.
Method Summary |
void |
clip(java.awt.Shape s)
|
com.lowagie.text.Rectangle |
createLocalTargetArea(RenderingContext c,
Box box)
|
com.lowagie.text.Rectangle |
createTargetArea(RenderingContext c,
Box box)
|
void |
drawBorderLine(java.awt.Rectangle bounds,
int side,
int lineWidth,
boolean solid)
|
void |
drawImage(FSImage fsImage,
int x,
int y)
|
void |
drawOval(int x,
int y,
int width,
int height)
|
void |
drawRect(int x,
int y,
int width,
int height)
|
void |
drawSelection(RenderingContext c,
InlineText inlineText)
|
void |
drawString(java.lang.String s,
float x,
float y,
JustificationInfo info)
|
void |
fill(java.awt.Shape s)
|
void |
fillOval(int x,
int y,
int width,
int height)
|
void |
fillRect(int x,
int y,
int width,
int height)
|
java.util.List |
findPagePositionsByID(CssContext c,
java.util.regex.Pattern pattern)
|
void |
finish(RenderingContext c,
Box root)
|
void |
finishPage()
|
java.awt.Shape |
getClip()
|
com.lowagie.text.pdf.PdfContentByte |
getCurrentPage()
|
float |
getDeviceLength(float length)
|
float |
getDotsPerPoint()
|
int |
getNextFormFieldIndex()
|
com.lowagie.text.pdf.PdfReader |
getReader(java.net.URL url)
|
java.lang.Object |
getRenderingHint(java.awt.RenderingHints.Key key)
|
SharedContext |
getSharedContext()
|
int |
getStartPageNo()
|
java.awt.Stroke |
getStroke()
|
com.lowagie.text.pdf.PdfWriter |
getWriter()
|
void |
initializePage(com.lowagie.text.pdf.PdfContentByte currentPage,
float height)
|
boolean |
isSupportsCMYKColors()
|
boolean |
isSupportsSelection()
|
void |
paintBackground(RenderingContext c,
Box box)
|
void |
paintReplacedElement(RenderingContext c,
BlockBox box)
|
void |
setClip(java.awt.Shape s)
|
void |
setColor(FSColor color)
|
void |
setFont(FSFont font)
|
void |
setRenderingHint(java.awt.RenderingHints.Key key,
java.lang.Object value)
|
void |
setRoot(Box root)
|
void |
setSharedContext(SharedContext sharedContext)
|
void |
setStartPageNo(int startPageNo)
|
void |
setStroke(java.awt.Stroke s)
|
void |
setWriter(com.lowagie.text.pdf.PdfWriter writer)
|
void |
start(org.w3c.dom.Document doc)
|
void |
translate(double tx,
double ty)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ITextOutputDevice
public ITextOutputDevice(float dotsPerPoint)
setWriter
public void setWriter(com.lowagie.text.pdf.PdfWriter writer)
getWriter
public com.lowagie.text.pdf.PdfWriter getWriter()
getNextFormFieldIndex
public int getNextFormFieldIndex()
initializePage
public void initializePage(com.lowagie.text.pdf.PdfContentByte currentPage,
float height)
finishPage
public void finishPage()
paintReplacedElement
public void paintReplacedElement(RenderingContext c,
BlockBox box)
- Specified by:
paintReplacedElement
in interface OutputDevice
paintBackground
public void paintBackground(RenderingContext c,
Box box)
- Specified by:
paintBackground
in interface OutputDevice
- Overrides:
paintBackground
in class AbstractOutputDevice
createLocalTargetArea
public com.lowagie.text.Rectangle createLocalTargetArea(RenderingContext c,
Box box)
createTargetArea
public com.lowagie.text.Rectangle createTargetArea(RenderingContext c,
Box box)
getDeviceLength
public float getDeviceLength(float length)
drawBorderLine
public void drawBorderLine(java.awt.Rectangle bounds,
int side,
int lineWidth,
boolean solid)
- Specified by:
drawBorderLine
in interface OutputDevice
setColor
public void setColor(FSColor color)
- Specified by:
setColor
in interface OutputDevice
drawRect
public void drawRect(int x,
int y,
int width,
int height)
- Specified by:
drawRect
in interface OutputDevice
drawOval
public void drawOval(int x,
int y,
int width,
int height)
- Specified by:
drawOval
in interface OutputDevice
fill
public void fill(java.awt.Shape s)
- Specified by:
fill
in interface OutputDevice
fillRect
public void fillRect(int x,
int y,
int width,
int height)
- Specified by:
fillRect
in interface OutputDevice
fillOval
public void fillOval(int x,
int y,
int width,
int height)
- Specified by:
fillOval
in interface OutputDevice
translate
public void translate(double tx,
double ty)
- Specified by:
translate
in interface OutputDevice
getRenderingHint
public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key key)
- Specified by:
getRenderingHint
in interface OutputDevice
setRenderingHint
public void setRenderingHint(java.awt.RenderingHints.Key key,
java.lang.Object value)
- Specified by:
setRenderingHint
in interface OutputDevice
setFont
public void setFont(FSFont font)
- Specified by:
setFont
in interface OutputDevice
drawString
public void drawString(java.lang.String s,
float x,
float y,
JustificationInfo info)
getCurrentPage
public com.lowagie.text.pdf.PdfContentByte getCurrentPage()
setStroke
public void setStroke(java.awt.Stroke s)
- Specified by:
setStroke
in interface OutputDevice
clip
public void clip(java.awt.Shape s)
- Specified by:
clip
in interface OutputDevice
getClip
public java.awt.Shape getClip()
- Specified by:
getClip
in interface OutputDevice
setClip
public void setClip(java.awt.Shape s)
- Specified by:
setClip
in interface OutputDevice
getStroke
public java.awt.Stroke getStroke()
- Specified by:
getStroke
in interface OutputDevice
drawImage
public void drawImage(FSImage fsImage,
int x,
int y)
- Specified by:
drawImage
in interface OutputDevice
getReader
public com.lowagie.text.pdf.PdfReader getReader(java.net.URL url)
throws java.io.IOException
- Throws:
java.io.IOException
getDotsPerPoint
public float getDotsPerPoint()
start
public void start(org.w3c.dom.Document doc)
finish
public void finish(RenderingContext c,
Box root)
getSharedContext
public SharedContext getSharedContext()
setSharedContext
public void setSharedContext(SharedContext sharedContext)
setRoot
public void setRoot(Box root)
getStartPageNo
public int getStartPageNo()
setStartPageNo
public void setStartPageNo(int startPageNo)
drawSelection
public void drawSelection(RenderingContext c,
InlineText inlineText)
- Specified by:
drawSelection
in interface OutputDevice
isSupportsSelection
public boolean isSupportsSelection()
- Specified by:
isSupportsSelection
in interface OutputDevice
isSupportsCMYKColors
public boolean isSupportsCMYKColors()
- Specified by:
isSupportsCMYKColors
in interface OutputDevice
findPagePositionsByID
public java.util.List findPagePositionsByID(CssContext c,
java.util.regex.Pattern pattern)
Flying Saucer Project Home