Package 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 onPdfGraphics2D. See http://sourceforge.net/projects/itext/ for license information.
-
-
Constructor Summary
Constructors Constructor Description ITextOutputDevice(float dotsPerPoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclip(java.awt.Shape s)com.lowagie.text.RectanglecreateLocalTargetArea(RenderingContext c, Box box)com.lowagie.text.RectanglecreateTargetArea(RenderingContext c, Box box)voiddrawBorderLine(java.awt.Rectangle bounds, int side, int lineWidth, boolean solid)voiddrawImage(FSImage fsImage, int x, int y)voiddrawOval(int x, int y, int width, int height)voiddrawRect(int x, int y, int width, int height)voiddrawSelection(RenderingContext c, InlineText inlineText)voiddrawString(java.lang.String s, float x, float y, JustificationInfo info)voidfill(java.awt.Shape s)voidfillOval(int x, int y, int width, int height)voidfillRect(int x, int y, int width, int height)java.util.ListfindPagePositionsByID(CssContext c, java.util.regex.Pattern pattern)voidfinish(RenderingContext c, Box root)voidfinishPage()java.awt.ShapegetClip()com.lowagie.text.pdf.PdfContentBytegetCurrentPage()floatgetDeviceLength(float length)floatgetDotsPerPoint()intgetNextFormFieldIndex()com.lowagie.text.pdf.PdfReadergetReader(java.net.URL url)java.lang.ObjectgetRenderingHint(java.awt.RenderingHints.Key key)SharedContextgetSharedContext()intgetStartPageNo()java.awt.StrokegetStroke()com.lowagie.text.pdf.PdfWritergetWriter()voidinitializePage(com.lowagie.text.pdf.PdfContentByte currentPage, float height)booleanisSupportsCMYKColors()booleanisSupportsSelection()voidpaintBackground(RenderingContext c, Box box)voidpaintReplacedElement(RenderingContext c, BlockBox box)voidsetClip(java.awt.Shape s)voidsetColor(FSColor color)voidsetFont(FSFont font)voidsetRenderingHint(java.awt.RenderingHints.Key key, java.lang.Object value)voidsetRoot(Box root)voidsetSharedContext(SharedContext sharedContext)voidsetStartPageNo(int startPageNo)voidsetStroke(java.awt.Stroke s)voidsetWriter(com.lowagie.text.pdf.PdfWriter writer)voidstart(org.w3c.dom.Document doc)voidtranslate(double tx, double ty)-
Methods inherited from class org.xhtmlrenderer.render.AbstractOutputDevice
drawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, paintBackground, paintBorder, paintBorder, paintCollapsedBorder
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xhtmlrenderer.extend.OutputDevice
drawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, paintBackground, paintBorder, paintBorder, paintCollapsedBorder
-
-
-
-
Method Detail
-
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:
paintReplacedElementin interfaceOutputDevice
-
paintBackground
public void paintBackground(RenderingContext c, Box box)
- Specified by:
paintBackgroundin interfaceOutputDevice- Overrides:
paintBackgroundin classAbstractOutputDevice
-
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:
drawBorderLinein interfaceOutputDevice
-
setColor
public void setColor(FSColor color)
- Specified by:
setColorin interfaceOutputDevice
-
drawRect
public void drawRect(int x, int y, int width, int height)- Specified by:
drawRectin interfaceOutputDevice
-
drawOval
public void drawOval(int x, int y, int width, int height)- Specified by:
drawOvalin interfaceOutputDevice
-
fill
public void fill(java.awt.Shape s)
- Specified by:
fillin interfaceOutputDevice
-
fillRect
public void fillRect(int x, int y, int width, int height)- Specified by:
fillRectin interfaceOutputDevice
-
fillOval
public void fillOval(int x, int y, int width, int height)- Specified by:
fillOvalin interfaceOutputDevice
-
translate
public void translate(double tx, double ty)- Specified by:
translatein interfaceOutputDevice
-
getRenderingHint
public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key key)
- Specified by:
getRenderingHintin interfaceOutputDevice
-
setRenderingHint
public void setRenderingHint(java.awt.RenderingHints.Key key, java.lang.Object value)- Specified by:
setRenderingHintin interfaceOutputDevice
-
setFont
public void setFont(FSFont font)
- Specified by:
setFontin interfaceOutputDevice
-
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:
setStrokein interfaceOutputDevice
-
clip
public void clip(java.awt.Shape s)
- Specified by:
clipin interfaceOutputDevice
-
getClip
public java.awt.Shape getClip()
- Specified by:
getClipin interfaceOutputDevice
-
setClip
public void setClip(java.awt.Shape s)
- Specified by:
setClipin interfaceOutputDevice
-
getStroke
public java.awt.Stroke getStroke()
- Specified by:
getStrokein interfaceOutputDevice
-
drawImage
public void drawImage(FSImage fsImage, int x, int y)
- Specified by:
drawImagein interfaceOutputDevice
-
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:
drawSelectionin interfaceOutputDevice
-
isSupportsSelection
public boolean isSupportsSelection()
- Specified by:
isSupportsSelectionin interfaceOutputDevice
-
isSupportsCMYKColors
public boolean isSupportsCMYKColors()
- Specified by:
isSupportsCMYKColorsin interfaceOutputDevice
-
findPagePositionsByID
public java.util.List findPagePositionsByID(CssContext c, java.util.regex.Pattern pattern)
-
-