Class: EideticPDF::PdfObjects::PdfStream
Instance Attribute Summary collapse
#gen, #seq
Instance Method Summary
collapse
#dictionary
#footer, #header, #reference_object, #reference_string, #to_s
Constructor Details
#initialize(seq, gen, stream = nil) ⇒ PdfStream
324
325
326
327
328
|
# File 'lib/epdfo.rb', line 324
def initialize(seq, gen, stream=nil)
super(seq, gen)
@stream = (stream || '').dup
dictionary['Length'] = PdfInteger.new(length)
end
|
Instance Attribute Details
#stream ⇒ Object
Returns the value of attribute stream.
322
323
324
|
# File 'lib/epdfo.rb', line 322
def stream
@stream
end
|
Instance Method Details
#body ⇒ Object
342
343
344
345
|
# File 'lib/epdfo.rb', line 342
def body
dictionary['Length'] = PdfInteger.new(length)
"#{super}stream\n#{stream}endstream\n"
end
|
#filter=(filter) ⇒ Object
334
335
336
337
338
339
340
|
# File 'lib/epdfo.rb', line 334
def filter=(filter)
if filter.is_a?(PdfArray)
dictionary['Filter'] = filter
else
dictionary['Filter'] = PdfName.new(filter)
end
end
|
#length ⇒ Object
330
331
332
|
# File 'lib/epdfo.rb', line 330
def length
stream.length
end
|