Module: PDF::Reader::Filter
- Defined in:
- lib/pdf/reader/filter.rb,
lib/pdf/reader/filter/lzw.rb,
lib/pdf/reader/filter/null.rb,
lib/pdf/reader/filter/flate.rb,
lib/pdf/reader/filter/ascii85.rb,
lib/pdf/reader/filter/ascii_hex.rb,
lib/pdf/reader/filter/depredict.rb,
lib/pdf/reader/filter/run_length.rb
Overview
:nodoc:
Defined Under Namespace
Classes: Ascii85, AsciiHex, Depredict, Flate, Lzw, Null, RunLength
Class Method Summary collapse
-
.with(name, options = {}) ⇒ Object
creates a new filter for decoding content.
Class Method Details
.with(name, options = {}) ⇒ Object
creates a new filter for decoding content.
Filters that are only used to encode image data are accepted, but the data is returned untouched. At this stage PDF::Reader has no need to decode images.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/pdf/reader/filter.rb', line 44 def self.with(name, = {}) case name when :ASCII85Decode, :A85 then PDF::Reader::Filter::Ascii85.new() when :ASCIIHexDecode, :AHx then PDF::Reader::Filter::AsciiHex.new() when :CCITTFaxDecode, :CCF then PDF::Reader::Filter::Null.new() when :DCTDecode, :DCT then PDF::Reader::Filter::Null.new() when :FlateDecode, :Fl then PDF::Reader::Filter::Flate.new() when :JBIG2Decode then PDF::Reader::Filter::Null.new() when :JPXDecode then PDF::Reader::Filter::Null.new() when :LZWDecode, :LZW then PDF::Reader::Filter::Lzw.new() when :RunLengthDecode, :RL then PDF::Reader::Filter::RunLength.new() else raise UnsupportedFeatureError, "Unknown filter: #{name}" end end |