public class GraphicInserterFilter extends AbstractTextContentInserterFilter
构造器和说明 |
---|
GraphicInserterFilter(java.lang.String imagePath,
int horizontalPosition,
int verticalPosition)
Creates a new filter that will insert the specified image at the specified location while
converting a document.
|
GraphicInserterFilter(java.lang.String imagePath,
int width,
int height,
int horizontalPosition,
int verticalPosition)
Creates a new filter that will insert the specified image at the specified location while
converting a document.
|
GraphicInserterFilter(java.lang.String imagePath,
int width,
int height,
java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
Creates a new filter that will insert the specified image using the specified properties while
converting a document.
|
GraphicInserterFilter(java.lang.String imagePath,
java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
Creates a new filter that will insert the specified image using the specified properties 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 GraphicInserterFilter(java.lang.String imagePath, int horizontalPosition, int verticalPosition) throws org.jodconverter.office.OfficeException
imagePath
- The path to the image (file) on disk.horizontalPosition
- The horizontal position where to insert the image on the document
(millimeters).verticalPosition
- The vertical position where to insert the image on the document
(millimeters).org.jodconverter.office.OfficeException
- If the size of the image cannot be detected.public GraphicInserterFilter(java.lang.String imagePath, int width, int height, int horizontalPosition, int verticalPosition)
imagePath
- The path to the image (file) on disk.width
- the width of the image to insert. The original image will be resize if required
(millimeters).height
- The height of the image to insert. The original image will be resize if required
(millimeters).horizontalPosition
- The horizontal position where to insert the image on the document
(millimeters).verticalPosition
- The vertical position where to insert the image on the document
(millimeters).public GraphicInserterFilter(java.lang.String imagePath, int width, int height, java.util.Map<java.lang.String,java.lang.Object> shapeProperties)
imagePath
- The path to the image (file) on disk.width
- the width of the image to insert. The original image will be resize if required
(millimeters).height
- The height of the image to insert. The original image will be resize if required
(millimeters).shapeProperties
- The properties to apply to the created graphic shape.public GraphicInserterFilter(java.lang.String imagePath, java.util.Map<java.lang.String,java.lang.Object> shapeProperties) throws org.jodconverter.office.OfficeException
imagePath
- The path to the image (file) on disk.shapeProperties
- The properties to apply to the created graphic shape.org.jodconverter.office.OfficeException
- If the size of the image cannot be detected.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.