org.mapfish.print
Class PDFCustomBlocks
java.lang.Object
com.lowagie.text.pdf.PdfPageEventHelper
org.mapfish.print.PDFCustomBlocks
- All Implemented Interfaces:
- com.lowagie.text.pdf.PdfPageEvent
public class PDFCustomBlocks
- extends com.lowagie.text.pdf.PdfPageEventHelper
Listen to events from the PDF document in order to render the
custom ChunkDrawers, the header/footer and the background.
|
Field Summary |
static org.apache.log4j.Logger |
LOGGER
|
| Methods inherited from class com.lowagie.text.pdf.PdfPageEventHelper |
onChapter, onChapterEnd, onGenericTag, onOpenDocument, onParagraph, onParagraphEnd, onSection, onSectionEnd |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
public static final org.apache.log4j.Logger LOGGER
PDFCustomBlocks
public PDFCustomBlocks(com.lowagie.text.pdf.PdfWriter writer,
RenderingContext context)
onStartPage
public void onStartPage(com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.Document document)
- Specified by:
onStartPage in interface com.lowagie.text.pdf.PdfPageEvent- Overrides:
onStartPage in class com.lowagie.text.pdf.PdfPageEventHelper
onEndPage
public void onEndPage(com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.Document document)
- Specified by:
onEndPage in interface com.lowagie.text.pdf.PdfPageEvent- Overrides:
onEndPage in class com.lowagie.text.pdf.PdfPageEventHelper
onCloseDocument
public void onCloseDocument(com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.Document document)
- Specified by:
onCloseDocument in interface com.lowagie.text.pdf.PdfPageEvent- Overrides:
onCloseDocument in class com.lowagie.text.pdf.PdfPageEventHelper
addChunkDrawer
public void addChunkDrawer(ChunkDrawer chunkDrawer)
- Register a custom drawer.
blockRendered
public void blockRendered(ChunkDrawer chunkDrawer)
- Called when a custom drawer has been rendered.
addAbsoluteDrawer
public void addAbsoluteDrawer(PDFCustomBlocks.AbsoluteDrawer chunkDrawer)
throws com.lowagie.text.DocumentException
- Schedule a absolute block (like a !columns or a !map).
- Throws:
com.lowagie.text.DocumentException
setHeader
public void setHeader(HeaderFooter header,
PJsonObject params)
setFooter
public void setFooter(HeaderFooter footer,
PJsonObject params)
setBackgroundPdf
public void setBackgroundPdf(java.lang.String backgroundPdf)
addError
public void addError(java.lang.Exception e)
getOrCreateTotalPagesBlock
public com.lowagie.text.Chunk getOrCreateTotalPagesBlock(com.lowagie.text.Font font)
throws com.lowagie.text.BadElementException
- Throws:
com.lowagie.text.BadElementException
Copyright © 2009 Camptocamp SA. All Rights Reserved.