GroupDocs.Conversion for .NET 24.4 Release Notes

There are 20+ features, improvements, and bug fixes in this release.

Full list of changes in this release

KeyCategorySummary
CONVERSIONNET-6797FeatureOptions to customize requests to external resources when converting from web document
CONVERSIONNET-6809FeatureAdd support for Zstandard (Zstd) archive format
CONVERSIONNET-6801FeatureAdd page number in the converted PDF
CONVERSIONNET-6827EnhancementReplace .net standard 2.1 target with .net6.0-windows target
CONVERSIONNET-6810EnhancementImprove WordProcessing to WebP conversion
CONVERSIONNET-6814EnhancementImprove conversions from HTML
CONVERSIONNET-6831EnhancementSaving out native constituent files while performing GroupDocs.Conversion on container file formats?
CONVERSIONNET-5092EnhancementChange comma delimited to another character
CONVERSIONNET-6823EnhancementAdd Diagram conversion support to cross-platform package
CONVERSIONNET-5243BugDWG to PDF conversion issue
CONVERSIONNET-6790BugBorder across table is not displayed in output RTF
CONVERSIONNET-6789Bugstyle=“display:none
CONVERSIONNET-6788BugBorder is not displayed in the converted RTF
CONVERSIONNET-6660BugHTML to DOCX Conversion loses the Formatting
CONVERSIONNET-4741BugSetting font path
CONVERSIONNET-4802BugTIFF to PDF conversion issue
CONVERSIONNET-5099BugEmail to PNG conversion issue
CONVERSIONNET-4591BugException when using NoteLoadOptions.FontSubstitutes
CONVERSIONNET-6807BugRegression: PPTX to PDF: GroupDocs.Conversion.Exceptions.GroupDocsConversionException: Could not find a part of the path ‘/usr/share/fonts’.
CONVERSIONNET-6803BugEML to PDF: Converted file throws exception when opened
CONVERSIONNET-6806BugFile types of owned documents are detected incorrectly when converting from a container document
CONVERSIONNET-6408BugConverting a tiff with different horizontal and vertical resolutions to PDF produces stretched result
CONVERSIONNET-6834BugRegression: PPTX to PDF: GroupDocs.Conversion.Exceptions.GroupDocsConversionException: Could not find a part of the path ‘/usr/share/fonts’.
CONVERSIONNET-6793BugWhen you open an RTF file converted with break-all specified in CSS, it will be displayed surrounded by []

Major features

  • Replaced .net standard 2.1 target with .net6.0-windows target
  • New option to add page numbering when converting from word and pdf
  • Added support for Zstandard (Zstd) archive format
  • Extended options to customize requests to external resources when convert from a web document
  • Improved conversions from HTML
  • Option to customize the separator character when convert to delimited format
  • Extended load options delegate which provide the original stream content

Public API and backward incompatible changes

  1. Introduced two new constructors to Converter class - Converter(Func<Stream>, Func<string, FileType, Stream, LoadOptions>, Func<ConverterSettings>) and Converter(string, Func<string, FileType, Stream, LoadOptions>, Func<ConverterSettings>).

    Usage:

    const string source = "sample.pst";
    Func<string, FileType, Stream, LoadOptions> loadOptionsProvider = (string sourceFileName, FileType sourceFileType, Stream sourceStream) =>
    {
        if (sourceFileType == EmailFileType.Pst)
        {
            return new PersonalStorageLoadOptions();
        }
    
        var fileName = $"{sourceFileName}.{sourceFileType.Extension}";
        using var fs = new FileStream(fileName, FileMode.Create);
        sourceStream.CopyTo(fs);
    
        return null;
    };
    
    using (var converter = new Converter(source, loadOptionsProvider))
    {
      var options = new PdfConvertOptions();
      var i = 1;
    
      var convertOptionsProvider = (string sourceFileName, FileType sourceFileType) => new PdfConvertOptions();
    
      var documentCompletedHandler =
        (string sourceFileName, FileType sourceFileType, Stream convertedStream) =>
        {
            using var fs = new FileStream($"converted-{i++}.pdf", FileMode.Create);
            convertedStream.CopyTo(fs);
        };
      converter.Convert(() => new MemoryStream(), documentCompletedHandler, convertOptionsProvider);
    }
    
  2. In SpreadsheetConvertOptions is introduced a new property - Separator

    Usage:

    const string source = "sample.xlsx";
    
    using (var converter = new Converter(source))
    {
      var options = new SpreadsheetConvertOptions
      {
          Format = SpreadsheetFileType.Csv,
          Separator = '|'
      };
      converter.Convert("converted.csv", options);
    }
    
  3. In WebLoadOptions are introduced two new properties - ConfigureHeaders and CredentialsProvider

    Usage:

    const string source = "index.html";
    
    using (var converter = new Converter(source, () => new WebLoadOptions
       {
           CredentialsProvider = (uri) =>
           {
    
               return new NetworkCredential("user", "password");
           },
           ConfigureHeaders = (uri, headers) =>
           {
               headers.Add("x-api-key", "111-222-333");
           }
       }))
    {
      var options = new WordProcessingConvertOptions
      {
          Format = WordProcessingFileType.Docx
      };
      converter.Convert("converted.docx", options);
    }
    
  4. Removed obsolete properties Width and Height from PdfConvertOptions and WordProcessingConvertOptions