public class GraphicInserterFilter extends AbstractTextContentInserterFilter
| Constructor and Description |
|---|
GraphicInserterFilter(@NonNull 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(@NonNull 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(@NonNull String imagePath,
int width,
int height,
@NonNull Map<String,Object> shapeProperties)
Creates a new filter that will insert the specified image using the specified properties while
converting a document.
|
GraphicInserterFilter(@NonNull String imagePath,
@NonNull Map<String,Object> shapeProperties)
Creates a new filter that will insert the specified image using the specified properties 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 GraphicInserterFilter(@NonNull String imagePath, int horizontalPosition, int verticalPosition) throws org.jodconverter.core.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.core.office.OfficeException - If the size of the image cannot be detected.public GraphicInserterFilter(@NonNull 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(@NonNull String imagePath, @NonNull Map<String,Object> shapeProperties) throws org.jodconverter.core.office.OfficeException
imagePath - The path to the image (file) on disk.shapeProperties - The properties to apply to the created graphic shape.org.jodconverter.core.office.OfficeException - If the size of the image cannot be detected.public GraphicInserterFilter(@NonNull String imagePath, int width, int height, @NonNull Map<String,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 void doFilter(@NonNull org.jodconverter.core.office.OfficeContext context,
@NonNull com.sun.star.lang.XComponent document,
@NonNull FilterChain chain)
throws 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.Exception - If an error occurs processing the filter.Copyright © 2022 - present; JODConverter. All rights reserved.