Sparen von Projektdaten im SVG -Format
Contents
[
Hide
Show
]Dieser Artikel zeigt, wie Projektdaten mithilfe von Aspose.Tasks JAVA in das SVG -Format rendern.
Ein Projekt speichern als SVG
Die Projekt Klasse enthält die Speichernmethode, mit der ein Projekt in verschiedenen Formaten speichert wird. Mit der Speichernmethode können Sie Projektdaten mit dem SaveFileFirformat -Aufzählungstyp in das SVG -Format rendern.
Um ein Projekt auf SVG zu speichern:
- Laden Sie eine Microsoft -Projektdatei.
- Speichern Sie das Projekt in SVG mit SaveFileformat.svg.
Die folgenden Codezeilen zeigen, wie dies mit Java erreicht werden kann
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);