Class DocxImageExtractor

java.lang.Object
org.wickedsource.docxstamper.util.DocxImageExtractor

public class DocxImageExtractor extends Object
Extracts images from a docx document.
Version:
${version}
Author:
Joseph Verron
  • 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

      public String getRunDrawingFilename(org.docx4j.wml.R run)
      Extract the name of the image from an embedded image run.
      Parameters:
      run - run containing the embedded drawing.
      Returns:
      a String object
    • getRunDrawingAltText

      public String getRunDrawingAltText(org.docx4j.wml.R run)
      Extract the content type of the image from an embedded image run.
      Parameters:
      run - run containing the embedded drawing.
      Returns:
      a String object
    • getRunDrawingMaxWidth

      public Integer getRunDrawingMaxWidth(org.docx4j.wml.R run)
      Extract the width of the image from an embedded image run.
      Parameters:
      run - run containing the embedded drawing.
      Returns:
      a Integer object