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, setNext
public static final String DOCUMENT
public static final String WRITER
public static final String CONTINUOUS
MapContext
used as CustomContext
. Setting to true enables swallowing of DocumentExceptions
public PdfWriterPipeline()
public PdfWriterPipeline(Pipeline> next)
next
- the next pipeline if any.
public Pipeline> init(WorkerContext context) throws PipelineException
Pipeline
WorkerContext.put(String, CustomContext)
.
init
in interface Pipeline<MapContext>
init
in class AbstractPipeline<MapContext>
context
- the WorkerContext
PipelineException
- can be thrown to indicate that something went wrong.
public Pipeline> open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipeline
open
in interface Pipeline<MapContext>
open
in class AbstractPipeline<MapContext>
context
- the WorkerContext
t
- the Tag
po
- a processObject to put Writable
s in
PipelineException
- can be thrown to indicate that something went wrong.
public Pipeline> content(WorkerContext context, Tag currentTag, String text, ProcessObject po) throws PipelineException
AbstractPipeline
content
in interface Pipeline<MapContext>
content
in class AbstractPipeline<MapContext>
context
- the WorkerContext
currentTag
- the Tag
text
- the content
po
- a processObject to put Writable
s in
PipelineException
- can be thrown to indicate that something went wrong.
public Pipeline> close(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
AbstractPipeline
close
in interface Pipeline<MapContext>
close
in class AbstractPipeline<MapContext>
context
- the WorkerContext
t
- the Tag
po
- a processObject to put Writable
s in
PipelineException
- can be thrown to indicate that something went wrong.
public void setDocument(Document document)
document
- the Document
public void setWriter(PdfWriter writer)
writer
- the writer.
Copyright © 1998–2018. All rights reserved.