Saving a Project as PDF in Ruby

Aspose.Tasks - Saving a Project as PDF

To Save a Project as PDF using Aspose.Tasks Java for Ruby, simply invoke SaveProjectAsPdf module. Here you can see example code.

Ruby Code

 1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
 2
 3options = Rjb::import('com.aspose.tasks.PdfSaveOptions').new
 4
 5options.setFitContent(true)
 6
 7options.setTimescale(Rjb::import('com.aspose.tasks.Timescale').Months)
 8
 9options.setPresentationFormat(Rjb::import('com.aspose.tasks.PresentationFormat').TaskUsage)
10
11options.setLegendOnEachPage(false)
12
13project.save("project.pdf", options)
14
15puts "Saved project as pdf, please check the output file."

Download Running Code

Download Saving a Project as PDF (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.