Interface CustomFactory

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface CustomFactory
    A functional interface that allows users to define a custom strategy for converting image data as a byte array into a PDImageXObject.
    • Method Detail

      • createFromByteArray

        PDImageXObject createFromByteArray​(PDDocument document,
                                           byte[] byteArray)
                                    throws java.io.IOException
        Creates a PDImageXObject from the given image byte array and document context.
        Parameters:
        document - the document that shall use this PDImageXObject.
        byteArray - the image data as a byte array
        Returns:
        a PDImageXObject.
        Throws:
        java.io.IOException - if there is an error when creating the PDImageXObject.