Class DocxImageExtractor
java.lang.Object
org.wickedsource.docxstamper.util.DocxImageExtractor
Extracts images from a docx document.
- Version:
- ${version}
- Author:
- Joseph Verron
-
Constructor Summary
ConstructorsConstructorDescriptionDocxImageExtractor(org.docx4j.openpackaging.packages.WordprocessingMLPackage wordprocessingMLPackage) Creates a new image extractor for the given docx document. -
Method Summary
Modifier and TypeMethodDescriptiongetRunDrawingAltText(org.docx4j.wml.R run) Extract the content type of the image from an embedded image run.getRunDrawingFilename(org.docx4j.wml.R run) Extract the name of the image from an embedded image run.getRunDrawingMaxWidth(org.docx4j.wml.R run) Extract the width of the image from an embedded image run.
-
Constructor Details
-
DocxImageExtractor
public DocxImageExtractor(org.docx4j.openpackaging.packages.WordprocessingMLPackage wordprocessingMLPackage) Creates a new image extractor for the given docx document.- Parameters:
wordprocessingMLPackage- the docx document to extract images from.
-
-
Method Details
-
getRunDrawingFilename
Extract the name of the image from an embedded image run.- Parameters:
run- run containing the embedded drawing.- Returns:
- a
Stringobject
-
getRunDrawingAltText
Extract the content type of the image from an embedded image run.- Parameters:
run- run containing the embedded drawing.- Returns:
- a
Stringobject
-
getRunDrawingMaxWidth
Extract the width of the image from an embedded image run.- Parameters:
run- run containing the embedded drawing.- Returns:
- a
Integerobject
-