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 Details

    • createFromByteArray

      PDImageXObject createFromByteArray(PDDocument document, byte[] byteArray) throws 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:
      IOException - if there is an error when creating the PDImageXObject.