Class HtmlPipeline
java.lang.Object
com.itextpdf.tool.xml.pipeline.AbstractPipeline<HtmlPipelineContext>
com.itextpdf.tool.xml.pipeline.html.HtmlPipeline
- All Implemented Interfaces:
Pipeline<HtmlPipelineContext>
The HtmlPipeline transforms received tags and content to PDF Elements.
To configure this pipeline a
To configure this pipeline a
HtmlPipelineContext.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStackKeeper(Tag t, HtmlPipelineContext hcc, TagProcessor tp) 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 t, String text, ProcessObject po) Just calls getNext.
Override this to get notified on encountered content.This allows the descendant classes to be fetched from the context.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.Methods inherited from class com.itextpdf.tool.xml.pipeline.AbstractPipeline
getLocalContext, getNext, setNext
-
Field Details
-
hpc
-
-
Constructor Details
-
HtmlPipeline
- Parameters:
hpc- the initialHtmlPipelineContextnext- the next pipe in row
-
-
Method Details
-
getContextKey
This allows the descendant classes to be fetched from the context.- Overrides:
getContextKeyin classAbstractPipeline<HtmlPipelineContext>- Returns:
getClass().getName()as name.
-
init
Description copied from interface:PipelineThe init method allows implementation to initialize the pipeline. e.g. Initialize their CustomContext here and add it to the WorkerContext throughWorkerContext.put(String, CustomContext).- Specified by:
initin interfacePipeline<HtmlPipelineContext>- Overrides:
initin classAbstractPipeline<HtmlPipelineContext>- Parameters:
context- the WorkerContext- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
open
Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered opening tags.- Specified by:
openin interfacePipeline<HtmlPipelineContext>- Overrides:
openin classAbstractPipeline<HtmlPipelineContext>- Parameters:
context- the WorkerContextt- the Tagpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
content
public Pipeline<?> content(WorkerContext context, Tag t, String text, ProcessObject po) throws PipelineException Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered content.- Specified by:
contentin interfacePipeline<HtmlPipelineContext>- Overrides:
contentin classAbstractPipeline<HtmlPipelineContext>- Parameters:
context- the WorkerContextt- the Tagtext- the contentpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
close
Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered closing tags.- Specified by:
closein interfacePipeline<HtmlPipelineContext>- Overrides:
closein classAbstractPipeline<HtmlPipelineContext>- Parameters:
context- the WorkerContextt- the Tagpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
addStackKeeper
-