public class TextInserterFilter extends AbstractTextContentInserterFilter
构造器和说明 |
---|
TextInserterFilter(java.lang.String text,
int width,
int height,
int horizontalPosition,
int verticalPosition)
Creates a new filter that will insert the specified text at the specified location while
converting a document.
|
TextInserterFilter(java.lang.String text,
int width,
int height,
java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
Creates a new filter that will insert the specified text at the specified location while
converting a document.
|
限定符和类型 | 方法和说明 |
---|---|
void |
doFilter(org.jodconverter.office.OfficeContext context,
com.sun.star.lang.XComponent document,
FilterChain chain)
The
doFilter method of the Filter is called each time a document is passed through
the chain due to a conversion request. |
applyAnchorPageNoFix, createDefaultShapeProperties, getRectSize, getShapeProperties, toOfficeSize
public TextInserterFilter(java.lang.String text, int width, int height, int horizontalPosition, int verticalPosition)
text
- The text to insert.width
- The width of the rectangle to insert (millimeters).height
- The height of the rectangle to insert (millimeters).horizontalPosition
- The horizontal position where to insert the text on the document
(millimeters).verticalPosition
- The vertical position where to insert the text on the document
(millimeters).public TextInserterFilter(java.lang.String text, int width, int height, java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
text
- The text to insert.width
- The width of the graphic to insert. The original image will be resize if required
(millimeters).height
- The height of the image. The original image will be resize if required
(millimeters).shapeProperties
- The properties to apply to the created rectangle shape.public void doFilter(org.jodconverter.office.OfficeContext context, com.sun.star.lang.XComponent document, FilterChain chain) throws java.lang.Exception
Filter
doFilter
method of the Filter is called each time a document is passed through
the chain due to a conversion request. The FilterChain passed in to this method allows the
Filter to pass on the document to the next entity in the chain.
A typical implementation of this method would either invoke the next filter
in the chain using the FilterChain object (chain.doFilter()
), or
not pass on the document to the next filter in the filter chain to block the conversion
processing.
context
- The OfficeContext in use to pass along the chain.document
- The XComponent being converted to pass along the chain.chain
- The chain.java.lang.Exception
- If an error occurs processing the filter.