Class JBIG2Filter

java.lang.Object
org.apache.pdfbox.filter.Filter
org.apache.pdfbox.filter.JBIG2Filter

final class JBIG2Filter extends Filter
Decompresses data encoded using the JBIG2 standard, reproducing the original monochrome (1 bit per pixel) image data (or an approximation of that data). Requires a JBIG2 plugin for Java Image I/O to be installed. A known working plug-in is the Apache PDFBox JBIG2 plugin.
  • Field Details

    • LOG

      private static final org.apache.commons.logging.Log LOG
    • levigoLogged

      private static boolean levigoLogged
  • Constructor Details

    • JBIG2Filter

      JBIG2Filter()
  • Method Details

    • logLevigoDonated

      private static void logLevigoDonated()
    • decode

      public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index, DecodeOptions options) throws IOException
      Description copied from class: Filter
      Decodes data, with optional DecodeOptions. Not all filters support all options, and so callers should check the options' honored flag to test if they were applied.
      Overrides:
      decode in class Filter
      Parameters:
      encoded - the encoded byte stream
      decoded - the stream where decoded data will be written
      parameters - the parameters used for decoding
      index - the index to the filter being decoded
      options - additional options for decoding
      Returns:
      repaired parameters dictionary, or the original parameters dictionary
      Throws:
      IOException - if the stream cannot be decoded
    • decode

      public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException
      Description copied from class: Filter
      Decodes data, producing the original non-encoded data.
      Specified by:
      decode in class Filter
      Parameters:
      encoded - the encoded byte stream
      decoded - the stream where decoded data will be written
      parameters - the parameters used for decoding
      index - the index to the filter being decoded
      Returns:
      repaired parameters dictionary, or the original parameters dictionary
      Throws:
      IOException - if the stream cannot be decoded
    • encode

      protected void encode(InputStream input, OutputStream encoded, COSDictionary parameters) throws IOException
      Specified by:
      encode in class Filter
      Throws:
      IOException