Last active
January 4, 2022 02:40
-
-
Save aspose-com-kb/7fcf31868ba6c5f81e8f87d18525f71a to your computer and use it in GitHub Desktop.
This code can be used to convert Microsoft Project File to XPS. For further details, refer to the article https://kb.aspose.com/tasks/java/how-to-convert-microsoft-project-file-to-xps-in-java/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.aspose.barcode.License; | |
import com.aspose.tasks.Project; | |
import com.aspose.tasks.SaveFileFormat; | |
public class ConvertMicrosoftProjectFileToXPSInJava { | |
public static void main(String[] args) throws Exception{ // main function for ConvertMicrosoftProjectFileToXPSInJava class | |
// Set Aspose.Tasks license to remove trial version watermark in the output XPS file converted from MPP | |
License tasksLicense = new License(); | |
tasksLicense.setLicense("Aspose.Tasks.lic"); | |
// Load the input MPP file to be converted to XPS | |
Project sourceMPPFile = new Project("InputMPPFile.mpp"); | |
// Save the output XPS file using SaveFileFormat enumerator | |
sourceMPPFile.save("OutputXPSFile.xps", SaveFileFormat.XPS); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment