Printing a Microsoft Project (MPP/XML) files
Aspose.Tasks for .NET provides the facility to print projects to the default printer or any custom printer using the Project.Print function. It also provides advanced printing features like changing the printing options and settings.
Printing Project Data
The Project class exposes the Print function to print the project. The Print function uses PrintOptions to set different settings for printing like TimeScale, StartDate, EndDate, FitContent, LegendOnEachPage and more. Another class (from System.Drawing.Printing namespace), PrinterSettings is used to configure the printer to print all pages, page start (FromPage), page end (ToPage), PaperSize and so on. Both the objects of PrintOptions and PrinterSettings are passed to Project.Print() for final printing.
To print a project:
- Load a Microsoft Project file.
- Call the print function along with the specified arguments.
Print to the Default Printer
The following lines of code shows how to achieve this using C#.