Enhanced MPP to HTML conversion with Aspose.Tasks for .NET 18.7

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

aspose-tasks-for-netWe are pleased to announce the release of Aspose.Tasks for .NET 18.7. This release further enhances the Project data conversion to HTML by providing capability to save html elements to separate files. It also fixes several issues reported with the API that further enhances the adds to the overall stability of the API. For a detailed note on what is new and fixed, please visit the release notes section of API documentation.

Saving Fonts, Images and CSS Styles Separately

This release of Aspose.Tasks for .NET API lets you export the fonts, images and CSS styles to separate files while exporting project data to HTML. It also provides the options to assign callback functions to the export process for assignment of necessary parameters. These modifications have been added to the HtmlSaveOptions class of the API and can be utilized as shown in the following code sample.

var options = new HtmlSaveOptions { FontFaceTypes = FontFaceType.Ttf, PageSize = PageSize.A0, ExportImages = ResourceExportType.AsFile };

var savingCallbacks = new UserSavingCallbacks
{
    RootFolder = this.ResultFolder.Value + "SavingCallbacks",
    KeepCssStreamOpened = true,
    CssFolder = "css",
    ImagesFolder = "images",
    FontsFolder = "fonts"
};
options.CssSavingCallback = savingCallbacks;
options.FontSavingCallback = savingCallbacks;
options.ImageSavingCallback = savingCallbacks;
if (!Directory.Exists(savingCallbacks.RootFolder))
{
    if (!Directory.Exists(savingCallbacks.RootFolder))
    {
        Directory.CreateDirectory(savingCallbacks.RootFolder);
    }
}

var project = new Project(Common.TestdataPath + "HtmlTest\\TestExportCssFontsImages.mpp");
project.Save(Path.Combine(savingCallbacks.RootFolder, "document.html"), options);

using (var writer = new StreamWriter(savingCallbacks.CssStream))
{
    writer.WriteLine();
    writer.WriteLine("/* This line is appended to stream manually by user */");
}

Removal of Obsolete Extended Attributes Members

From this release onward, the obsolete members of ExtendedAttributeDefinition and OutlineValue have been removed. This is important to note as you’ll have to replace any such occurrences of Obsolete members with the new methods and techniques that have been available as replacement for long time now. All the examples related to these have been updated in API documentation and can be referred for utilization.

API Resources

You may visit the following API resources for getting started and working with the API.

  • Product Documentation – Detailed API documentation with code examples and details about API functional areas
  • Aspose.Tasks Forum – Our online support forum where we address your queries and inquiries

To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Leave a Reply