GroupDocs.Conversion for .NET 19.12 Release Notes

Major Features

There are 5+ features, improvements and bug-fixes in this release, most notable are:

  • XML documents can be converted to any format without transformation
  • Call ConvertedDocumentStream or ConvertedPageStream delegates providing converted stream for processing or storing.
  • Improved memory management

Full List of Issues Covering all Changes in this Release

KeyCategorySummary
CONVERSIONNET-3539FeatureConvert XML documents without transformation
CONVERSIONNET-3526ImprovementNew overload Convert methods which accepts ConvertedDocumentStream or ConvertedPageStream delegates
CONVERSIONNET-2922BugError converting RTL/HTML to PDF
CONVERSIONNET-3357BugCross reference table or cross reference stream not found exception thrown when converting a particular PDF to image
CONVERSIONNET-3507BugConvert from XML to any format throw exception - The file is corrupt or damaged.
CONVERSIONNET-3508BugException “The process cannot access the file because it is being used by another process.” when converting to file
CONVERSIONNET-3525BugConvert to image doesn’t release the last image
CONVERSIONNET-3534BugPages limit for TXT file adds additional empty page at the end

Public API and Backward Incompatible Changes

  1. GroupDocs.Conversion.Converter.Convert overloads

    Introduced new overloads of Convert method

    /// <summary>
    /// Converts source document. Saves the whole converted document.
    /// </summary>
    /// <param name="document">The delegate that saves converted document to a stream.</param>
    /// <param name="documentCompleted">The delegate that receive converted document stream.</param>
    /// <param name="convertOptions">The convert options specific to desired target file type.</param>
    public void Convert<TFileType>(SaveDocumentStream document, ConvertedDocumentStream documentCompleted, ConvertOptions<TFileType> convertOptions) where TFileType : FileType
         
    /// <summary>
    /// Converts source document. Saves the converted document page by page.
    /// </summary>        
    /// <param name="document">The delegate that saves converted document page to a stream.</param>
    /// <param name="documentCompleted">The delegate that receive converted document page stream.</param>
    /// <param name="convertOptions">The convert options specific to desired target file type.</param>
    public void Convert<TFileType>(SavePageStream document, ConvertedPageStream documentCompleted, ConvertOptions<TFileType> convertOptions) where TFileType : FileType
    

    From v19.12 of GroupDocs,Conversion stream created from SaveDocumentStream/SavePageStream delegate is disposed automatically. In order to be able to store converted document stream to file system or database, each time when converted document stream is read the delegates ConvertedDocumentStream/ConvertedPageStream are invoked. 

    Usage:

    const string fileName = "source.docx";
    using (var converter = new Converter(() => new FileStream(fileName, FileMode.Open)))
    {
        var options = new PdfConvertOptions();
        converter.Convert(()=> new MemoryStream(), converted =>
        {
            using (var fileStream = new FileStream("converted.pdf", FileMode.Create))
            {
                converted.CopyTo(fileStream);
            }
        }, options);
    }
    
  2. XML documents can be converted without transformations

    Usage:

    using (var converter = new Converter("sitemap.xml"))
    {
        var options = new PdfConvertOptions();
        converter.Convert("converted.pdf", options);
    }