Cannot convert non-English MPX 4.0 file to PDF-A1b: ArgumentOutOfRangeException with DateTime value

Hi,

We try to convert MPX 4.0 files saved with non-English locale (German) to PDF.

We open the MPX file with Aspose and we try to save the file as PDF with the following save options:
var saveOptions = new PdfSaveOptions
{

PresentationFormat = PresentationFormat.GanttChart,
Compliance = PdfCompliance.PdfA1b,
LegendOnEachPage = false

};

We get the following exception:

System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
Parameter name: value
at System.DateTime.AddTicks(Int64 value)
at System.DateTime.Add(Double value, Int32 scale)
at .()
at . ?? (Boolean )
at . ?? (Boolean )
at …?? [T1]( , Boolean )
at . ?? (Boolean )
at . ?? ()
at . ?? ()
at ? .(Stream , SaveOptions )
at Aspose.Tasks.Project.Save(String filename, SaveOptions options)

The current culture is set also to German during execution.

The issue can be simply reproduced with an “empty” project file(see attached file):

  • change the windows system language to German
  • create an empty project with MS Project 4.1 on Windows XP
  • save the “empty” file as MPX 4.0

Do you support MPX files saved with non-English locale settings?

Thanks,

Patrik V.

EmptyGerman4.0.zip (845 Bytes)

@patrikvogronics,

Thank you for contacting Aspose support team again.

Sample EmptyGerman4.0.MPX file is opened in MSP 2010 and saved as PDF, however it is observed that MSP also raises exception while saving this PDF file. It seems that empty MPX files cannot be saved as PDF. You may please try to save your sample MPX file as PDF using Microsoft Project. If exception is raised by MSP then try using MPX file with some tasks and share the feedback. Use this Non-Empty MPX file with Aspose.Tasks library as well and test the scenario again.

Hi,

I have created a new German(Switzerland)(attached in zip) file with some task and subtask. I got a same problem.

GermanWithSomeTask.zip (877 Bytes)

@patrikvogronics,

Thank you for providing sample file. This issue is observed and logged under Id: TASKSNET-2094 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

@patrikvogronics,

This issue has been fixed in latest version of Aspose.Tasks for .NET 17.9. Please let us know if we can be of any additional help to you with respect to your queries related to API.