Last active
December 23, 2021 12:32
How to Convert MPP to XPS using C++. For more information, please follow the link: https://kb.aspose.com/tasks/cpp/how-to-convert-mpp-to-xps-using-cpp/
This file contains 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
#pragma once | |
#include <Project.h> | |
#include <Task.h> | |
#include<License/License.h> | |
#include<Saving/Enums/SaveFileFormat.h> | |
#include<Prj.h> | |
#include <system/string.h> | |
#include <system/console.h> | |
#include <system/environment.h> | |
#include <system/shared_ptr.h> | |
#include <system/environment.h> | |
#include <system/object_ext.h> | |
#include <system/object.h> | |
#include <stdio.h> | |
using namespace Aspose::Tasks; | |
using namespace Aspose::Tasks::Saving; | |
using namespace System; | |
void MPPToXPS() | |
{ | |
// Set license to perform MPP to XPS conversion | |
SharedPtr<License> AsposeTasksLicense = System::MakeObject<License>(); | |
AsposeTasksLicense->SetLicense(u"licFile"); | |
// The path to sour MPP file and directory. | |
System::String SourceFile = u"SourceMPPFile.mpp"; | |
// Load the source MPP file to export to XPS | |
SharedPtr<Project> MppToXps = MakeObject<Project>(SourceFile); | |
// Save the MPP to XPS in C++ | |
MppToXps->Save(u"MPPSavedToXPS.xps", SaveFileFormat::XPS); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment