Hi,
Hi Vibhor,
Thank you for contacting Aspose support team.
Aspose.Tasks can be used to save project file in different formats. There is no direct method to print Gantt chart only similar to Microsoft Project. However following code can be used to remove all the columns in the task sheet. Please give it a try and share your feedback with us.
Project project = new Project(“Sample.mpp”);
project.DefaultView.Table.TableFields.Clear();
project.Save(“output.jpg”, SaveFileFormat.JPEG);
Hi,
Project project = new Project(@“E:\b4ubuild_sample_07.mpp”);
// Save to one page image (Timescale.ThirdsOfMonths)
Aspose.Tasks.Saving.ImageSaveOptions options = new Aspose.Tasks.Saving.ImageSaveOptions(SaveFileFormat.JPEG);
options.Timescale = Timescale.Days;
options.PresentationFormat = PresentationFormat.GanttChart;
project.Save(“NewProductDevThirdsOfMonths.jpeg”, options);
Project project = new Project(@"E:\b4ubuild_sample_07.mpp");
// Save to one page image (Timescale.ThirdsOfMonths)
Aspose.Tasks.Saving.ImageSaveOptions options = new Aspose.Tasks.Saving.ImageSaveOptions(SaveFileFormat.JPEG);
options.Timescale = Timescale.Days;
//options.StartDate = new DateTime(2009, 06, 01);
//options.EndDate = new DateTime(2009, 07, 30);
options.PresentationFormat = PresentationFormat.GanttChart;
project.DefaultView.Table.TableFields.Clear();
project.Save("NewProductDevThirdsOfMonths.jpeg", options);
Hi Vibhor,
Thank you for providing feedback.
You may please modify the code such that only one field is left. It displays the task id and complete Gantt Chart. I am afraid no option is found which can display only Gantt chart without displaying any field.
string path = url + “Tasks_737802\”;
Project project = new Project(@"E:\b4ubuild_sample_07.mpp");
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.JPEG);
options.Timescale = Timescale.Days;
options.PresentationFormat = PresentationFormat.GanttChart;
TableField field = project.DefaultView.Table.TableFields[0];
project.DefaultView.Table.TableFields.Clear();
project.DefaultView.Table.TableFields.Add(field);
project.Save(path + "output.jpeg", options);
Please feel free to writes us back if you have any other query in this regard.
Hi Kashif,
Hi,
Hi,
Hi Vibhor,