MPP를 SVG로 변환하는 방법

확장 가능한 벡터 그래픽 (SVG)은 2 차원 그래픽을 지원하는 XML 기반 벡터 이미지 형식입니다. 확장 성과 고해상도로 인해 웹 및 인쇄 환경에서 널리 사용됩니다. .NET 용
Aspose.Tasks는 MPP (Microsoft Project) 파일을 SVG 형식으로 내보내는 것을 완전히 지원합니다. 이 기능을 통해 개발자는 Gantt 차트와 같은 프로젝트보기를 독립형 벡터 그래픽으로 렌더링 할 수 있습니다. 그런 다음 이러한 그래픽을 웹 응용 프로그램, 보고서에 포함 시키거나 품질 상실없이 인쇄 할 수 있습니다.

프로젝트 저장 SVG

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

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

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

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

1Project project = new Project("New Project.mpp");
2project.Save("SaveProjectAsSVG_out.SVG", SaveFileFormat.SVG);
1Project project = new Project("New Project.mpp");
2SaveOptions options = new SvgOptions();
3options.FitContent = true;
4options.Timescale = Timescale.ThirdsOfMonths;
5project.Save("UseSvgOptions_out.svg", options);

Using SvgOptions to Customize Output

The SvgOptions class allows you to customize how the output SVG is rendered. For example, you can specify which pages to render or change the output timescale.

Key properties include:

Conclusion

Aspose.Tasks for .NET makes it easy to convert Microsoft Project files into high-quality vector graphics. The SVG format is ideal for scenarios where scalable and embeddable visualizations are required. For more control over the output, use the SvgOptions class to fine-tune rendering behavior.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.