| java.lang.Object com.lowagie.text.pdf.events.PdfPageEventForwarder
PdfPageEventForwarder | public class PdfPageEventForwarder implements PdfPageEvent(Code) | | If you want to add more than one page event to a PdfWriter,
you have to construct a PdfPageEventForwarder, add the
different events to this object and add the forwarder to
the PdfWriter.
|
Field Summary | |
protected ArrayList | events ArrayList containing all the PageEvents that have to be executed. |
Method Summary | |
public void | addPageEvent(PdfPageEvent event) Add a page event to the forwarder. | public void | onChapter(PdfWriter writer, Document document, float paragraphPosition, Paragraph title) Called when a Chapter is written. | public void | onChapterEnd(PdfWriter writer, Document document, float position) Called when the end of a Chapter is reached. | public void | onCloseDocument(PdfWriter writer, Document document) Called when the document is closed. | public void | onEndPage(PdfWriter writer, Document document) Called when a page is finished, just before being written to the
document. | public void | onGenericTag(PdfWriter writer, Document document, Rectangle rect, String text) Called when a Chunk with a generic tag is written. | public void | onOpenDocument(PdfWriter writer, Document document) Called when the document is opened. | public void | onParagraph(PdfWriter writer, Document document, float paragraphPosition) Called when a Paragraph is written.
paragraphPosition will hold the height at which the
paragraph will be written to. | public void | onParagraphEnd(PdfWriter writer, Document document, float paragraphPosition) Called when a Paragraph is written. | public void | onSection(PdfWriter writer, Document document, float paragraphPosition, int depth, Paragraph title) Called when a Section is written. | public void | onSectionEnd(PdfWriter writer, Document document, float position) Called when the end of a Section is reached. | public void | onStartPage(PdfWriter writer, Document document) Called when a page is initialized. |
events | protected ArrayList events(Code) | | ArrayList containing all the PageEvents that have to be executed.
|
addPageEvent | public void addPageEvent(PdfPageEvent event)(Code) | | Add a page event to the forwarder.
Parameters: event - an event that has to be added to the forwarder. |
onChapter | public void onChapter(PdfWriter writer, Document document, float paragraphPosition, Paragraph title)(Code) | | Called when a Chapter is written.
position will hold the height at which the chapter will be
written to.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: paragraphPosition - the position the chapter will be written to Parameters: title - the title of the Chapter |
onChapterEnd | public void onChapterEnd(PdfWriter writer, Document document, float position)(Code) | | Called when the end of a Chapter is reached.
position will hold the height of the end of the chapter.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: position - the position of the end of the chapter. |
onCloseDocument | public void onCloseDocument(PdfWriter writer, Document document)(Code) | | Called when the document is closed.
Note that this method is called with the page number equal to the last
page plus one.
Parameters: writer - the PdfWriter for this document Parameters: document - the document |
onEndPage | public void onEndPage(PdfWriter writer, Document document)(Code) | | Called when a page is finished, just before being written to the
document.
Parameters: writer - the PdfWriter for this document Parameters: document - the document |
onGenericTag | public void onGenericTag(PdfWriter writer, Document document, Rectangle rect, String text)(Code) | | Called when a Chunk with a generic tag is written.
It is usefull to pinpoint the Chunk location to generate
bookmarks, for example.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: rect - the Rectangle containing the Chunk Parameters: text - the text of the tag |
onOpenDocument | public void onOpenDocument(PdfWriter writer, Document document)(Code) | | Called when the document is opened.
Parameters: writer - the PdfWriter for this document Parameters: document - the document |
onParagraph | public void onParagraph(PdfWriter writer, Document document, float paragraphPosition)(Code) | | Called when a Paragraph is written.
paragraphPosition will hold the height at which the
paragraph will be written to. This is useful to insert bookmarks with
more control.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: paragraphPosition - the position the paragraph will be written to |
onParagraphEnd | public void onParagraphEnd(PdfWriter writer, Document document, float paragraphPosition)(Code) | | Called when a Paragraph is written.
paragraphPosition will hold the height of the end of the
paragraph.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: paragraphPosition - the position of the end of the paragraph |
onSection | public void onSection(PdfWriter writer, Document document, float paragraphPosition, int depth, Paragraph title)(Code) | | Called when a Section is written.
position will hold the height at which the section will be
written to.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: paragraphPosition - the position the section will be written to Parameters: depth - the number depth of the Section Parameters: title - the title of the section |
onSectionEnd | public void onSectionEnd(PdfWriter writer, Document document, float position)(Code) | | Called when the end of a Section is reached.
position will hold the height of the section end.
Parameters: writer - the PdfWriter for this document Parameters: document - the document Parameters: position - the position of the end of the section |
onStartPage | public void onStartPage(PdfWriter writer, Document document)(Code) | | Called when a page is initialized.
Note that if even if a page is not written this method is still called.
It is preferable to use onEndPage to avoid infinite loops.
Parameters: writer - the PdfWriter for this document Parameters: document - the document |
|
|