KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /home/queenjbs/www/FusionChart/Code/RoR/SampleApp/lib/fusioncharts/exporter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/queenjbs/www/FusionChart/Code/RoR/SampleApp/lib/fusioncharts/exporter/fc_exporter_pdf.rb
=begin

  Copyright (c) 2009 Infosoft Global Private Limited
 
=end
# Export Handler for PDF format.
class Fusioncharts::Exporter::FcExporterPdf
  require 'fusioncharts/exporter/generator'
  
  #FusionCharts Exporter -  PDF Class
  #version 2.0 [ 05 March 2009 ] - Added error handling, restructured the code.
  #version 1.0 [ 03 March 2009] - Converted from controller to ruby class

  # Function to handle the export process.
  def process_export(stream,meta,format)
    fc_error=nil
    @pdf_binary=nil
  begin
    fc_exporter = Fusioncharts::Exporter::Generator::PDFGenerator.new(stream, meta["width"].to_i, meta["height"].to_i, meta["bgColor"])
    # Parameter whether to compress the data or not
    @pdf_binary=fc_exporter.get_pdf_objects(true)
    #logger.info "PDF Binary created"
  rescue Exception => e
   print "Exception occurred="+e.to_s
   fc_error= Fusioncharts::Exporter::FcError.new("516")
  end
   return @pdf_binary,fc_error!=nil ? fc_error : true

  end
  
  # Writes the PDF to file.
  def write_to_file(fileName)
        f = File.open(fileName, 'wb');
        f.write @pdf_binary
        f.close
  end

end

Anon7 - 2021