프로젝트 데이터를 PDF로 변환하는 방법
이 기사는 Aspose.Tasks for java를 사용하여 프로젝트 데이터를 PDF로 렌더링하는 방법을 보여줍니다. API는 다음 기능을 제공하면서 프로젝트 데이터를 PDF를 포함한 다양한 출력 형식으로 렌더링합니다.
PDF 제작자 정보
- Aspose Ltd.와 Aspose.Tasks 의 Tasks는 이러한 필드에 대해 표시되기 때문에 응용 프로그램 및 생산자 필드에 대해 값을 설정할 수 없습니다.
PDF로 프로젝트 저장
Project 클래스는 프로젝트를 다양한 형식으로 저장하는 데 사용되는 저장 메소드를 노출시킵니다. 저장 메소드를 사용하면 SaveFileFormat 열거 유형을 사용하여 프로젝트 데이터를 PDF로 렌더링 할 수 있습니다.
PDF에 프로젝트를 저장하려면 :
- Microsoft 프로젝트 파일을로드하십시오.
- savefileformat.pdf를 사용하여 프로젝트를 PDF에 저장하십시오.
다음 줄의 코드는이를 달성하는 방법을 보여줍니다.
Supported Graphical Column Indicators
Aspose.Tasks draw graphical column indicators while rendering project data to PDF. The following are the graphical indicators supported by Aspose.Tasks .
Indicator Type | Graphical Representation |
---|---|
Task Indicators | ![]() |
Resource Indicators | ![]() |
Assignment Indicators | ![]() |
Saving to Multiple PDF Files
To save the project data to multiple PDF files, set the SaveToSeparateFiles flag to true.
Customizing TextStyle for Project Data
Aspose.Tasks allows you to customize the text style for overallocated resources. By default, the style for overallocated resources is similar to Microsoft Project (MSP), that is, it is red and bold. TextItemType.OverallocatedResources enables you to customize the color and style for overallocated resources. The example below shows how.
Customizing Date Format
Aspose.Tasks give developers control over date formatting when rendering project data to output. The following example shows how to use the DateFormat enumerator to specify the date format.
1Project project = new Project();
2Date date = new Date();
3project.setStartDate(date);
4// By default project.DateFormat == DateFormat.Date_ddd_mm_dd_yy (Mon 09/22/14)
5// customize DateFormat (September 22, 2014)
6project.setDateFormat(DateFormat.Date_mmmm_dd_yyyy);
7project.save("saved.pdf", SaveFileFormat.PDF);
8//Export to date format 19/07/2016
9project.setDateFormat(DateFormat.DateDdMmYyyy);
10project.save("p2.pdf", SaveFileFormat.PDF);