Remove Gap Between Tasks List and Footer
Contents
[
Hide
Show
]Conversion of Project data to different formats can lead to space between the project’s tasks list and footer. Using the ReduceFooterGap property will eliminate the extra gap between the tasks’ list and the footer of the document.
Eliminating Gap between Tasks List and Document Footer
1// The path to the documents directory.
2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
3
4//Read the MPP file.
5System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"CreateProject2.mpp");
6
7//Use ReduceFooterGap property to reduce the gap between list of tasks and Footer
8auto imageSaveOptions = [&]{ auto tmp_0 = System::MakeObject<ImageSaveOptions>(Aspose::Tasks::Saving::SaveFileFormat::PNG); tmp_0->set_ReduceFooterGap(true); tmp_0->set_SaveToSeparateFiles(true); tmp_0->set_PageSize(Aspose::Tasks::Visualization::PageSize::A0); tmp_0->set_Timescale(Aspose::Tasks::Visualization::Timescale::Days); return tmp_0; }();
9project->Save(dataDir + u"ReducingGapBetweenTasksListAndFooter_out.png", System::StaticCast<Aspose::Tasks::Saving::SaveOptions>(imageSaveOptions));
10
11auto pdfSaveOptions = [&]{ auto tmp_1 = System::MakeObject<PdfSaveOptions>(); tmp_1->set_ReduceFooterGap(true); tmp_1->set_SaveToSeparateFiles(true); tmp_1->set_PageSize(Aspose::Tasks::Visualization::PageSize::A0); tmp_1->set_Timescale(Aspose::Tasks::Visualization::Timescale::Days); return tmp_1; }();
12project->Save(dataDir + u"ReducingGapBetweenTasksListAndFooter_out.pdf", System::StaticCast<Aspose::Tasks::Saving::SaveOptions>(pdfSaveOptions));
13
14auto htmlSaveOptions = [&]{ auto tmp_2 = System::MakeObject<HtmlSaveOptions>(); tmp_2->set_ReduceFooterGap(false); tmp_2->set_IncludeProjectNameInPageHeader(false); tmp_2->set_IncludeProjectNameInTitle(false); tmp_2->set_PageSize(Aspose::Tasks::Visualization::PageSize::A0); tmp_2->set_Timescale(Aspose::Tasks::Visualization::Timescale::Days); return tmp_2; }();
15project->Save(dataDir + u"ReducingGapBetweenTasksListAndFooter_out.html", htmlSaveOptions);