Saving a Project as PDF in PHP

Aspose.Tasks - Saving a Project as PDF

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

PHP Code

 1$project = new Project('test_tasks.mpp');
 2$options = new PdfSaveOptions();
 3$timescale = new Timescale();
 4$presentationFormat = new PresentationFormat();
 5$options->setFitContent(true);
 6$options->setTimescale($timescale->Months);
 7$options->setPresentationFormat($presentationFormat->TaskUsage);
 8$options->setLegendOnEachPage(false);
 9$project->save("project.pdf", $options);
10print "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.