Aspose.Tasks Project to PDF Converter for .NET
Aspose.Tasks Project to PDF Converter for .NET empowers developers to seamlessly convert Microsoft Project (MPP) files into professional, high-quality PDF documents. Built on top of the Aspose.Tasks API, this plugin simplifies complex workflows and ensures accurate preservation of tasks, resources, calendars, and Gantt charts—all without requiring Microsoft Project to be installed.
Installation and Setup
- Install the NuGet package
Aspose.Tasks
into your .NET project. - Configure licensing by following the Metered Licensing guide.
- For full details on installation and framework compatibility, see the Installation Guide .
Supported Platforms:
- Operating Systems: Windows, Linux, macOS
- Frameworks: .NET Framework (3.5–4.8), .NET Standard 2.0, .NET Core (2.0–3.1), .NET 5/6+, Mono (2.6.7+)
- Development Tools: Microsoft Visual Studio, MonoDevelop
Quick Start: Convert MPP to PDF
using Aspose.Tasks;
Project project = new Project("New Project.mpp");
project.Save("SaveProjectAsPDF_out.pdf", SaveFileFormat.PDF);
This example demonstrates the simplest way to load an MPP file and save it directly to PDF using default settings.
Advanced Export Options
Fine-tune your exports with the PdfSaveOptions
class:
Project project = new Project("New Project.mpp");
PdfSaveOptions options = new PdfSaveOptions();
// Ensure content fits within cells
options.FitContent = true;
options.Timescale = Timescale.Months;
options.PresentationFormat = PresentationFormat.TaskUsage;
project.Save("FitContentsToCellSize_out.pdf", options);
Customize Text Styles
Developers can modify text formatting for specific items, such as overallocated resources:
Project project = new Project("New Project.mpp");
PdfSaveOptions options = new PdfSaveOptions();
options.PresentationFormat = PresentationFormat.ResourceSheet;
TextStyle style = new TextStyle();
style.Color = Color.OrangeRed;
style.FontStyle = FontStyle.Bold | FontStyle.Italic;
style.ItemType = TextItemType.OverallocatedResources;
options.TextStyles = new List<TextStyle> { style };
project.Save("CustomizeTextStyle_out.pdf", options);
This customization ensures exported PDFs match reporting standards or company branding.
Features and Functionalities
Core Conversion Engine
- Parses tasks, resources, calendars, and baselines.
- Preserves layout and styling of native MS Project.
- Supports multi-sheet and multi-view exports.
File Format Support
- Converts
.mpp
(Project 2010–2021+),.mpt
(templates), and Project XML files. - Normalizes schema versions for consistent rendering.
View and Chart Customization
- Export views: Gantt Chart, Task Usage, Resource Usage, or combined layouts.
- Apply filters, groupings, and custom tables from the source project.
Page Setup & Pagination
- Control page size (A4, Letter, Legal, custom), orientation, and margins.
- Scale charts to fit single-page or multi-page layouts.
- Automatic pagination across large timelines.
PDF Compliance & Quality
- Support for PDF 1.4–2.0.
- Conformance with archival standards (PDF/A-1b, PDF/A-2u).
- Font embedding, image compression, raster/vector rendering options.
Stream & File Workflows
- Save to streams for web/cloud apps or file paths for desktop tools.
- Support for synchronous and asynchronous batch pipelines.
Large Project Handling
- Optimized for thousands of tasks and multi-resource projects.
- Supports progress callbacks and cancellation tokens.
Error Reporting
- Validates corrupted dates, missing dependencies, or unsupported fields.
- Provides detailed exception handling for CI/CD integration.
Best Practices
- Configure Licensing Early: Avoid runtime evaluation interruptions.
- Dispose Resources: Use
using
blocks to free native handles. - Predefine Views: Set filters/tables in project templates before conversion.
- Preserve Readability: For wide Gantt charts, use multi-page exports over scaling.
- Leverage Streams: Reduce I/O overhead in high-throughput environments.
Frequently Asked Questions
Q: Can I use Project to PDF Converter in ASP.NET or WPF apps? Yes. It works in ASP.NET, WCF, WinForms, WPF, and Mono-based apps across Windows, Linux, and Mac.
Q: How do I customize the PDF appearance?
Use PdfSaveOptions
to configure fonts, text styles, date formats, margins, and initial PDF view settings.
Q: Can I specify a View object directly?
Yes. Use SaveOptions.ViewSettings
for explicit view export, overriding PresentationFormat
.
Q: What Microsoft Project views are supported? Supported views include Gantt Chart, Task Usage, Resource Usage, and others.