Sha256: 5612c46865668be411d958a3fcc84c7513ec831d3de180084e7e38bbd4723ba7

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

module Asposetasksjava
  module RenderTaskUsageView
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate project object
        project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'test_tasks.mpp')

        # Define the SaveOptions with required TimeScale settings as Days
		options = Rjb::import('com.aspose.tasks.PdfSaveOptions').new
		options.setTimescale(Rjb::import('com.aspose.tasks.Timescale').Days)
		# Set the Presentation format to ResourceUsage
		options.setPresentationFormat(Rjb::import('com.aspose.tasks.PresentationFormat').TaskUsage)
		# Save the Project
		project.save(data_dir + "task_days.pdf", options)

		# Set the Tiemscale settings to ThirdsOfMonths
		options.setTimescale(Rjb::import('com.aspose.tasks.Timescale').ThirdsOfMonths)
		# Save the Project
		project.save(data_dir + "task_thirdsOfMonths.pdf", options)

		# Set the Timescale settings to Months
		options.setTimescale(Rjb::import('com.aspose.tasks.Timescale').Months)
		# Save the project
		project.save(data_dir + "task_months.pdf", options)

		puts "Created task usage view files."
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Tasks/rendertaskusageview.rb