Convert MPP to PDF file - Facing Exception

Hi,

We are using followig code for converting .mpp file to pdf.
// Load the document to be coneverted.
var inputFile = new Aspose.Tasks.Project(@“inputFile.mpp”);
// Save to PDF format
inputFile.Save(@“outputFile.pdf”, Aspose.Tasks.Saving.SaveFileFormat.Pdf);

with this we are getting the below exception:
The project format ‘MPP8’ is not supported.

Could you please suggest how can we resolve this?

Hi,

Could you please provide us an update on this?

Thanks,
Ambika

@Kofax_Business_Communications,

Sorry for the delayed answer.
Looks like the input file is in obsolete MPP8 format (created by Microsoft Project 98 or earlier).

The format MPP8 is no longer supported.

Thanks for the info.

USing this code for converting .mpp to .pdf.
But not getting the desired output.
Please find the attached .zip file which contains inputfile, output with current code changes and the expected output.
ExpectedOutputFile.zip (206.2 KB)

Could you please suggest what changes we need to make to pdf similar to “ExpectedOutputFile.pdf”.

Thanks,
Ambika

@Kofax_Business_Communications,
you can make the similar PDF (without blank white space at the right side of the page) using the following settings:

string dir = "e:/!5/";
var p = new Project(dir + "InputFile.mpp");
PdfSaveOptions so = new PdfSaveOptions();
so.StartDate = p.StartDate;     // Without these two lines p.TimescaleStart and p.TimescaleFinish dates are used.
so.EndDate = p.FinishDate;
so.RenderToSinglePage = true;
p.Save(dir + "output.pdf", so);