Видалення розриву між списком завдань та колонтитом
Перетворення даних проекту в різні формати може призвести до простору між списком завдань проекту та колонтитом. Використання властивості REMELFOOTERGAP усуне додатковий розрив між списком завдань та колонтитом документа.
Усунення розриву між списком завдань та колонтитом документа
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);