Remove Gap Between Tasks List and Footer
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
1String dataDir = Utils.getDataDir(SaveAsPdf.class);
2
3//Read the MPP file.
4Project project = new Project(dataDir + "Homemoveplan.mpp");
5
6//Use ReduceFooterGap property to reduce the gap between list of tasks and Footer
7ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFileFormat.PNG);
8imageSaveOptions.setReduceFooterGap(true);
9imageSaveOptions.setSaveToSeparateFiles(true);
10imageSaveOptions.setPageSize(PageSize.A0);
11imageSaveOptions.setTimescale(Timescale.Days);
12project.save(dataDir + "ReducingGapBetweenTasksListAndFooter_out.png", (SaveOptions)imageSaveOptions);
13
14PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
15pdfSaveOptions.setReduceFooterGap(true);
16pdfSaveOptions.setSaveToSeparateFiles(true);
17pdfSaveOptions.setPageSize(PageSize.A0);
18pdfSaveOptions.setTimescale(Timescale.Days);
19project.save(dataDir + "ReducingGapBetweenTasksListAndFooter_out.pdf", (SaveOptions)pdfSaveOptions);
20
21HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
22htmlSaveOptions.setReduceFooterGap(true); // set to true
23htmlSaveOptions.setIncludeProjectNameInPageHeader(false);
24htmlSaveOptions.setIncludeProjectNameInTitle(false);
25htmlSaveOptions.setPageSize(PageSize.A0);
26htmlSaveOptions.setTimescale(Timescale.Days);
27project.save(dataDir + "ReducingGapBetweenTasksListAndFooter_out.html", htmlSaveOptions);