public static function render_resource_sheetview($dataDir = null)
 {
     # Instantiate project object
     $project = new Project($dataDir . 'test_tasks.mpp');
     # Define the SaveOptions with required TimeScale settings as Days
     $options = new PdfSaveOptions();
     # Set the Presentation format to ResourceSheet
     $presentationFormat = new PresentationFormat();
     $options->setPresentationFormat($presentationFormat->ResourceSheet);
     $project->save($dataDir . "result.pdf", $options);
     print "Created resource sheet view file." . PHP_EOL;
 }
 public static function run($dataDir = null)
 {
     # Instantiate project object
     $project = new Project($dataDir . 'test_tasks.mpp');
     # Define the SaveOptions with required TimeScale settings as Days
     $options = new PdfSaveOptions();
     $timescale = new Timescale();
     $options->setTimescale($timescale->Days);
     # Set the Presentation format to ResourceUsage
     $presentationFormat = new PresentationFormat();
     $options->setPresentationFormat($presentationFormat->TaskUsage);
     # Save the Project
     $project->save($dataDir . "task_days.pdf", $options);
     # Set the Tiemscale settings to ThirdsOfMonths
     $options->setTimescale($timescale->ThirdsOfMonths);
     # Save the Project
     $project->save($dataDir . "task_thirdsOfMonths.pdf", $options);
     # Set the Timescale settings to Months
     $options->setTimescale($timescale->Months);
     # Save the project
     $project->save($dataDir . "task_months.pdf", $options);
     print "Created task usage view files." . PHP_EOL;
 }
 public static function run($dataDir = null)
 {
     # Instantiate project object
     $project = new Project($dataDir . 'test_tasks.mpp');
     $options = new PdfSaveOptions();
     # Set the LegendOnEachPage property to false to hide legends
     # Set the row height to fit cell content
     $timescale = new Timescale();
     $presentationFormat = new PresentationFormat();
     $options->setFitContent(true);
     $options->setTimescale($timescale->Months);
     $options->setPresentationFormat($presentationFormat->TaskUsage);
     $options->setLegendOnEachPage(false);
     $project->save($dataDir . "project.pdf", $options);
     print "Saved project as pdf, please check the output file." . PHP_EOL;
 }