Get Number of Pages in Project in Ruby

Aspose.Tasks - Get Number of Pages in Project

To get Number of Pages in Project using Aspose.Tasks Java for Ruby, simply invoke GetNumberOfPages module. Here you can see example code.

1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2presentation_format = Rjb::import('com.aspose.tasks.PresentationFormat')
3timescale = Rjb::import('com.aspose.tasks.Timescale')
4puts "Number of Pages = " + project.getPageCount(presentation_format.ResourceUsage, timescale.Days).to_s
5puts "Number of Pages = " + project.getPageCount(presentation_format.ResourceUsage, timescale.Months).to_s
6puts "Number of Pages = " + project.getPageCount(presentation_format.ResourceUsage, timescale.ThirdsOfMonths).to_s

Download Running Code

Download Get Number of Pages in Project (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.