|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.fop.render.PrintRenderer | +--org.apache.fop.render.pdf.PDFRenderer
Renderer that renders areas to PDF Modified by Mark Lillywhite, mark-fop@inomial.com to use the new Renderer interface. The PDF renderer is by far the trickiest renderer and the best supported by FOP. It also required some reworking in the way that Pages, Catalogs and the Root object were written to the stream. The output document should now still be a 100% compatible PDF document, but hte order of the document writing is significantly different. See also the changes to PDFPage, PDFPages and PDFRoot.
Inner Class Summary | |
protected class |
PDFRenderer.MUserAgent
|
Field Summary | |
protected java.util.Hashtable |
options
options |
protected PDFDocument |
pdfDoc
the PDF Document being created |
protected PDFResources |
pdfResources
the /Resources object of the PDF document being created |
Constructor Summary | |
PDFRenderer()
create the PDF renderer |
Method Summary | |
protected void |
addFilledRect(int x,
int y,
int w,
int h,
PDFPathPaint fill)
add a filled rectangle to the current stream |
protected void |
addLine(int x1,
int y1,
int x2,
int y2,
int th,
int rs,
PDFPathPaint stroke)
add a line to the current stream |
protected void |
addLine(int x1,
int y1,
int x2,
int y2,
int th,
PDFPathPaint stroke)
add a line to the current stream |
protected void |
addRect(int x,
int y,
int w,
int h,
PDFPathPaint stroke)
add a rectangle to the current stream |
protected void |
addRect(int x,
int y,
int w,
int h,
PDFPathPaint stroke,
PDFPathPaint fill)
add a filled rectangle to the current stream |
org.apache.batik.gvt.GraphicsNodeRenderContext |
getRenderContext(FontState fs)
|
void |
render(Page page,
java.io.OutputStream outputStream)
render the given area tree to the given stream |
void |
renderForeignObjectArea(ForeignObjectArea area)
render a foreign object area |
void |
renderImageArea(ImageArea area)
render image area to PDF |
void |
renderPage(Page page)
render page into PDF |
protected void |
renderRootExtensions(Page page)
|
void |
renderSVGArea(SVGArea area)
render SVG area to PDF |
protected void |
renderSVGDocument(org.w3c.dom.Document doc,
int x,
int y,
FontState fs)
|
void |
renderWordArea(WordArea area)
render inline area to PDF |
void |
setOptions(java.util.Hashtable options)
set up renderer options |
void |
setProducer(java.lang.String producer)
set the PDF document's producer |
void |
startRenderer(java.io.OutputStream stream)
Default start renderer method. |
void |
stopRenderer(java.io.OutputStream stream)
|
Methods inherited from class org.apache.fop.render.PrintRenderer |
addWordLines, renderAreaContainer, renderBlockArea, renderBodyAreaContainer, renderDisplaySpace, renderInlineSpace, renderLeaderArea, renderLineArea, renderSpanArea, setupFontInfo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PDFDocument pdfDoc
protected PDFResources pdfResources
protected java.util.Hashtable options
Constructor Detail |
public PDFRenderer()
Method Detail |
public void setOptions(java.util.Hashtable options)
public void setProducer(java.lang.String producer)
setProducer
in class PrintRenderer
producer
- string indicating application producing PDFpublic void startRenderer(java.io.OutputStream stream) throws java.io.IOException
PrintRenderer
startRenderer
in class PrintRenderer
public void stopRenderer(java.io.OutputStream stream) throws java.io.IOException
protected void addLine(int x1, int y1, int x2, int y2, int th, PDFPathPaint stroke)
addLine
in class PrintRenderer
x1
- the start x location in millipointsy1
- the start y location in millipointsx2
- the end x location in millipointsy2
- the end y location in millipointsth
- the thickness in millipointsr
- the red componentg
- the green componentb
- the blue componentprotected void addLine(int x1, int y1, int x2, int y2, int th, int rs, PDFPathPaint stroke)
addLine
in class PrintRenderer
x1
- the start x location in millipointsy1
- the start y location in millipointsx2
- the end x location in millipointsy2
- the end y location in millipointsth
- the thickness in millipointsrs
- the rule styler
- the red componentg
- the green componentb
- the blue componentprotected void addRect(int x, int y, int w, int h, PDFPathPaint stroke)
addRect
in class PrintRenderer
x
- the x position of left edge in millipointsy
- the y position of top edge in millipointsw
- the width in millipointsh
- the height in millipointsstroke
- the stroke color/gradientprotected void addRect(int x, int y, int w, int h, PDFPathPaint stroke, PDFPathPaint fill)
addRect
in class PrintRenderer
x
- the x position of left edge in millipointsy
- the y position of top edge in millipointsw
- the width in millipointsh
- the height in millipointsfill
- the fill color/gradientstroke
- the stroke color/gradientprotected void addFilledRect(int x, int y, int w, int h, PDFPathPaint fill)
addFilledRect
in class PrintRenderer
x
- the x position of left edge in millipointsy
- the y position of top edge in millipointsw
- the width in millipointsh
- the height in millipointsfill
- the fill color/gradientpublic void renderImageArea(ImageArea area)
renderImageArea
in class PrintRenderer
area
- the image area to renderpublic void renderForeignObjectArea(ForeignObjectArea area)
renderForeignObjectArea
in class PrintRenderer
public void renderSVGArea(SVGArea area)
renderSVGArea
in class PrintRenderer
area
- the SVG area to renderprotected void renderSVGDocument(org.w3c.dom.Document doc, int x, int y, FontState fs)
public org.apache.batik.gvt.GraphicsNodeRenderContext getRenderContext(FontState fs)
public void renderWordArea(WordArea area)
renderWordArea
in class PrintRenderer
area
- inline area to renderpublic void render(Page page, java.io.OutputStream outputStream) throws FOPException, java.io.IOException
Renderer
public void renderPage(Page page)
renderPage
in class PrintRenderer
page
- page to renderprotected void renderRootExtensions(Page page)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |