Last active
June 25, 2022 14:10
-
-
Save aspose-com-kb/7290fed08357ac1b0460b27a53ede581 to your computer and use it in GitHub Desktop.
How to Export MS Project to PDF using C#. For more information, please follow the link: https://kb.aspose.com/tasks/net/how-to-export-ms-project-to-pdf-in-csharp/
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
using Aspose.Tasks; | |
using Aspose.Tasks.Saving; | |
namespace AsposeTests | |
{ | |
class Program | |
{ | |
static void Main(string[] args) // Main function to Convert MPP to PDF | |
{ | |
// Load license | |
Aspose.Tasks.License lic = new Aspose.Tasks.License(); | |
lic.SetLicense(@"Aspose.Total.lic"); | |
// Load the source MPP file | |
Project project = new Project("Sample.mpp"); | |
// Declare the PdfSaveOptions class object and set page size | |
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); | |
pdfSaveOptions.PageSize = Aspose.Tasks.Visualization.PageSize.A0; | |
// Convert MPP to PDF | |
project.Save("output.pdf", pdfSaveOptions); | |
System.Console.WriteLine("Done"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment