Method: FPDF#Output
- Defined in:
- lib/fpdf.rb
#Output(file = nil) ⇒ Object
897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/fpdf.rb', line 897 def Output(file=nil) # Output PDF to file or return as a string # Finish document if necessary self.Close if(@state<3) if file.nil? # Return as a string return @buffer else # Save file locally open(file,'wb') do |f| f.write(@buffer) end end end |