Class PdfImageExtractor


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

      • PdfImageExtractor

        public PdfImageExtractor()
    • Method Detail

      • 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.