|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext
public class HtmlPipelineContext
The CustomContext object for the HtmlPipeline.
Use this to configure your HtmlPipeline.
| Field Summary | |
|---|---|
static String |
BOOKMARK_TREE
Key for the memory, used to store bookmark nodes |
static String |
LAST_MARGIN_BOTTOM
Key for the memory, used in Html TagProcessing |
| Constructor Summary | |
|---|---|
HtmlPipelineContext(CssAppliers cssAppliers)
Construct a new HtmlPipelineContext object |
|
| Method Summary | |
|---|---|
boolean |
acceptUnknown()
|
protected void |
addFirst(StackKeeper stackKeeper)
Add a StackKeeper to the top of the stack list. |
boolean |
autoBookmark()
|
HtmlPipelineContext |
autoBookmark(boolean autoBookmark)
Set to true to enable the automatic creation of bookmarks on <h1> to <h6> tags. |
Charset |
charSet()
|
HtmlPipelineContext |
charSet(Charset cSet)
Set a Charset to use. |
HtmlPipelineContext |
clone()
Create a clone of this HtmlPipelineContext, the clone only contains the initial values, not the internal values. |
protected List<Element> |
currentContent()
|
CssAppliers |
getCssAppliers()
|
ImageProvider |
getImageProvider()
|
Float |
getLastMarginBottom()
|
LinkProvider |
getLinkProvider()
Returns the LinkProvider, used to prepend e.g. |
Map<String,Object> |
getMemory()
|
Rectangle |
getPageSize()
Returns a Rectangle |
List<String> |
getRootTags()
|
protected boolean |
isEmpty()
|
protected StackKeeper |
peek()
Retrieves, but does not remove, the head (first element) of this list. |
protected StackKeeper |
poll()
Retrieves and removes the top of the stack. |
protected TagProcessor |
resolveProcessor(String tag,
String nameSpace)
|
HtmlPipelineContext |
setAcceptUnknown(boolean acceptUnknown)
Set to true to allow the HtmlPipeline to accept tags it does not find in the given TagProcessorFactory |
HtmlPipelineContext |
setCssApplier(CssAppliers cssAppliers)
Fluent variant of setCssAppliers(CssAppliers) |
void |
setCssAppliers(CssAppliers cssAppliers)
|
HtmlPipelineContext |
setImageProvider(ImageProvider imageProvider)
An ImageProvider can be provided and works in conjunction with Image and ListStyleTypeCssApplier for List Images. |
void |
setLastMarginBottom(Float lmb)
Set the last margin bottom. |
HtmlPipelineContext |
setLinkProvider(LinkProvider linkprovider)
Set the LinkProvider to use if any. |
HtmlPipelineContext |
setPageSize(Rectangle pageSize)
If no pageSize is set, the default value A4 is used. |
HtmlPipelineContext |
setRootTags(List<String> roottags)
Set the root-tags, this matters for margins. |
HtmlPipelineContext |
setTagFactory(TagProcessorFactory tagFactory)
Set the TagProcessorFactory to be used. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BOOKMARK_TREE
public static final String LAST_MARGIN_BOTTOM
| Constructor Detail |
|---|
public HtmlPipelineContext(CssAppliers cssAppliers)
| Method Detail |
|---|
protected TagProcessor resolveProcessor(String tag,
String nameSpace)
tag - the tag to find a TagProcessor fornameSpace - the namespace.
protected void addFirst(StackKeeper stackKeeper)
StackKeeper to the top of the stack list.
stackKeeper - the StackKeeper
protected StackKeeper peek()
throws NoStackException
NoStackException - if there are no elements on the stackprotected List<Element> currentContent()
public boolean acceptUnknown()
protected boolean isEmpty()
protected StackKeeper poll()
throws NoStackException
NoStackException - if there are no elements on the stackpublic boolean autoBookmark()
public Map<String,Object> getMemory()
public ImageProvider getImageProvider()
throws NoImageProviderException
NoImageProviderException - if there is no ImageProvider@Experimental public HtmlPipelineContext charSet(Charset cSet)
Charset to use.
cSet - the charset.
HtmlPipelineContextpublic Charset charSet()
Charset to use, or null if none configured.public Rectangle getPageSize()
Rectangle
getPageSize in interface PageSizeContainablepublic List<String> getRootTags()
getRootTags in interface MarginMemorypublic LinkProvider getLinkProvider()
public HtmlPipelineContext setPageSize(Rectangle pageSize)
pageSize - the pageSize to set
HtmlPipelineContext
public HtmlPipelineContext clone()
throws CloneNotSupportedException
AbstractImageProvider with same ImageRootPath) ,
TagProcessorFactory (same object), acceptUnknown (primitive), charset
(Charset.forName to get a new charset), autobookmark (primitive) are
copied.
clone in class ObjectCloneNotSupportedExceptionpublic HtmlPipelineContext setAcceptUnknown(boolean acceptUnknown)
TagProcessorFactory
acceptUnknown - true or false
HtmlPipelineContextpublic HtmlPipelineContext setTagFactory(TagProcessorFactory tagFactory)
TagProcessorFactory to be used. For HTML use Tags.getHtmlTagProcessorFactory()
tagFactory - the TagProcessorFactory that should be used
HtmlPipelineContextpublic HtmlPipelineContext autoBookmark(boolean autoBookmark)
Header.
autoBookmark - true or false
HtmlPipelineContextpublic HtmlPipelineContext setRootTags(List<String> roottags)
roottags - the root tags
HtmlPipelineContextpublic HtmlPipelineContext setImageProvider(ImageProvider imageProvider)
Image and ListStyleTypeCssApplier for List Images.
imageProvider - the ImageProvider to use.
HtmlPipelineContextpublic HtmlPipelineContext setLinkProvider(LinkProvider linkprovider)
linkprovider - the LinkProvider (@see
getLinkProvider()
HtmlPipelineContext
public Float getLastMarginBottom()
throws NoDataException
getLastMarginBottom in interface MarginMemoryNoDataException - if there is no LastMarginBottom setpublic void setLastMarginBottom(Float lmb)
MarginMemory
setLastMarginBottom in interface MarginMemorylmb - set the float for lmbpublic void setCssAppliers(CssAppliers cssAppliers)
setCssAppliers in interface CssAppliersAwarecssAppliers - the CssApplierspublic CssAppliers getCssAppliers()
getCssAppliers in interface CssAppliersAwarepublic HtmlPipelineContext setCssApplier(CssAppliers cssAppliers)
setCssAppliers(CssAppliers)
cssAppliers - the cssAppliers
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||