프로젝트 데이터를 SVG 형식으로 저장합니다

이 기사는 Aspose.Tasks java를 사용하여 프로젝트 데이터를 SVG 형식으로 렌더링하는 방법을 보여줍니다.

프로젝트 저장 SVG

Project 클래스는 프로젝트를 다양한 형식으로 저장하는 데 사용되는 저장 메소드를 노출시킵니다. 저장 메소드를 사용하면 SaveFileformat 열거 유형을 사용하여 프로젝트 데이터를 SVG 형식으로 렌더링 할 수 있습니다.

SVG에 프로젝트를 저장하려면 :

  1. Microsoft 프로젝트 파일을로드하십시오.
  2. SaveFileformat.svg를 사용하여 프로젝트를 SVG에 저장하십시오.

다음 줄의 코드는 Java를 사용하여이를 달성하는 방법을 보여줍니다.

1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(SaveAsSVG.class);
4// Read the input Project file
5Project project = new Project(projectName);
6project.save(dataDir + "Project5.SVG", SaveFileFormat.SVG);

Using SvgOptions

1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(SaveAsSVG.class);
4// Read the input Project file
5Project project = new Project(projectName);
6SaveOptions opt = new SvgOptions();
7opt.setFitContent(true);
8opt.setTimescale(Timescale.ThirdsOfMonths);
9project.save(dataDir + "FileName5.svg", opt);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.