public class TextInserterFilter extends AbstractTextContentInserterFilter
| Constructor and Description |
|---|
TextInserterFilter(@NonNull 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(@NonNull java.lang.String text,
int width,
int height,
@NonNull 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doFilter(@NonNull org.jodconverter.core.office.OfficeContext context,
@NonNull com.sun.star.lang.XComponent document,
@NonNull 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, setRectSize, toOfficeSizepublic TextInserterFilter(@NonNull 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(@NonNull java.lang.String text,
int width,
int height,
@NonNull java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
text - The text to insert.width - The width of the rectangle to insert (millimeters).height - The height of the rectangle to insert (millimeters).shapeProperties - The properties to apply to the created rectangle shape.public void doFilter(@NonNull org.jodconverter.core.office.OfficeContext context,
@NonNull com.sun.star.lang.XComponent document,
@NonNull FilterChain chain)
throws java.lang.Exception
FilterdoFilter 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.Copyright © 2022 - present; JODConverter. All rights reserved.