Class PdfImageExtractor

java.lang.Object
de.xima.fc.testhelper.pdf.PdfImageExtractor

public final class PdfImageExtractor extends Object
Extracts images from a PDF document.
Since:
8.2.0
  • Constructor Details

    • PdfImageExtractor

      public PdfImageExtractor()
  • Method Details

    • extractImagesFromPdf

      public static <Container> Container extractImagesFromPdf(org.apache.pdfbox.pdmodel.PDDocument document, Collector<? super org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject, ?, ? extends Container> collector) throws IOException
      Extracts images from a PDF document and collects them using the provided collector.
      Type Parameters:
      Container - The type of the container that the collector collects the images into.
      Parameters:
      document - The PDF document to extract images from.
      collector - The collector to collect the images with.
      Returns:
      The result of the collector.
      Throws:
      IOException - If an I/O error occurs while extracting the images.