public class PdfWriterPipeline extends AbstractPipeline<MapContext>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTINUOUS
The key for the a boolean in the
MapContext used as CustomContext. |
static String |
DOCUMENT
|
static String |
WRITER
|
| Constructor and Description |
|---|
PdfWriterPipeline() |
PdfWriterPipeline(Document doc,
PdfWriter writer) |
PdfWriterPipeline(Pipeline<?> next) |
| Modifier and Type | Method and Description |
|---|---|
Pipeline<?> |
close(WorkerContext context,
Tag t,
ProcessObject po)
Just calls getNext.
Override this to get notified on encountered closing tags. |
Pipeline<?> |
content(WorkerContext context,
Tag currentTag,
String text,
ProcessObject po)
Just calls getNext.
Override this to get notified on encountered content. |
Pipeline<?> |
init(WorkerContext context)
The init method allows implementation to initialize the pipeline.
|
Pipeline<?> |
open(WorkerContext context,
Tag t,
ProcessObject po)
Just calls getNext.
Override this to get notified on encountered opening tags. |
void |
setDocument(Document document)
The document to write to.
|
void |
setWriter(PdfWriter writer)
The writer used to write to the document.
|
getContextKey, getLocalContext, getNext, setNextpublic static final String DOCUMENT
public static final String WRITER
public static final String CONTINUOUS
MapContext used as CustomContext. Setting to true enables swallowing of DocumentExceptionspublic PdfWriterPipeline()
public PdfWriterPipeline(Pipeline<?> next)
next - the next pipeline if any.public Pipeline<?> init(WorkerContext context) throws PipelineException
PipelineWorkerContext.put(String, CustomContext).init in interface Pipeline<MapContext>init in class AbstractPipeline<MapContext>context - the WorkerContextPipelineException - can be thrown to indicate that something went wrong.public Pipeline<?> open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipelineopen in interface Pipeline<MapContext>open in class AbstractPipeline<MapContext>context - the WorkerContextt - the Tagpo - a processObject to put Writables inPipelineException - can be thrown to indicate that something went wrong.public Pipeline<?> content(WorkerContext context, Tag currentTag, String text, ProcessObject po) throws PipelineException
AbstractPipelinecontent in interface Pipeline<MapContext>content in class AbstractPipeline<MapContext>context - the WorkerContextcurrentTag - the Tagtext - the contentpo - a processObject to put Writables inPipelineException - can be thrown to indicate that something went wrong.public Pipeline<?> close(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipelineclose in interface Pipeline<MapContext>close in class AbstractPipeline<MapContext>context - the WorkerContextt - the Tagpo - a processObject to put Writables inPipelineException - can be thrown to indicate that something went wrong.public void setDocument(Document document)
document - the Documentpublic void setWriter(PdfWriter writer)
writer - the writer.Copyright © 2020. All rights reserved.