Remove Gap Between Tasks List and Footer
Conversion of Project data to different formats can sometimes create unnecessary blank space between the task list and the footer of the output document. By using the ReduceFooterGap property, you can eliminate this extra spacing and produce a cleaner, more professional layout.
Eliminating Gap between Tasks List and Document Footer
The following example shows how to apply the ReduceFooterGap property to remove extra space when exporting project data. This ensures that the task list flows seamlessly into the footer without unnecessary whitespace.
1Project project = new Project("New Project.mpp");
2
3// Use ReduceFooterGap property to reduce the gap between list of tasks and Footer
4ImageSaveOptions imageSaveOptions =
5 new ImageSaveOptions(SaveFileFormat.PNG) { ReduceFooterGap = true, SaveToSeparateFiles = true, PageSize = PageSize.A0, Timescale = Timescale.Days };
6project.Save("ReducingGapBetweenTasksListAndFooter_out.png", (SaveOptions)imageSaveOptions);
7
8PdfSaveOptions pdfSaveOptions = new PdfSaveOptions { ReduceFooterGap = true, SaveToSeparateFiles = true, PageSize = PageSize.A0, Timescale = Timescale.Days };
9project.Save("ReducingGapBetweenTasksListAndFooter_out.pdf", (SaveOptions)pdfSaveOptions);
10
11HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions
12{
13 ReduceFooterGap = false,
14 IncludeProjectNameInPageHeader = false,
15 IncludeProjectNameInTitle = false,
16 PageSize = PageSize.A0,
17 Timescale = Timescale.Days
18};
19project.Save("ReducingGapBetweenTasksListAndFooter_out.html", htmlSaveOptions);In this code snippet, ReduceFooterGap is enabled so that the task list and footer are aligned closely together. This improves the readability of exported project files, especially when working with multi-page reports or preparing documents for printing.
Conclusion
The ReduceFooterGap property in Aspose.Tasks for .NET provides a simple but effective way to optimize the layout of exported project files. By removing unnecessary gaps, developers can generate cleaner outputs that are easier to read and better suited for professional reporting. This feature helps ensure consistency across different formats and improves the overall presentation of project data.
FAQ
Q: Do I need Microsoft Project installed to use ReduceFooterGap?
- No. Aspose.Tasks for .NET works independently of Microsoft Project.
Q: In which formats does ReduceFooterGap apply?
- The property works when exporting to formats like PDF, XPS, and various image formats.
Q: Does ReduceFooterGap affect the content of tasks or only the layout?
- It only adjusts the spacing in the output layout and does not modify the actual project data.
Q: Can I combine ReduceFooterGap with other layout settings?
- Yes. It can be used alongside options such as page size, orientation, and image export settings.
Q: Is ReduceFooterGap applied by default?
- No. You need to explicitly enable it in your export options.