GroupDocs.Conversion for .NET 25.9 Release Notes
There are 10 features, improvements, and bug fixes in this release.
Full list of changes in this release
Key | Category | Summary |
---|---|---|
CONVERSIONNET-7972 | Enhancement | Add font transformation functionality for WordProcessing documents conversion |
CONVERSIONNET-8002 | Enhancement | Add font transformation functionality for PDF document conversion |
CONVERSIONNET-7973 | Enhancement | Allow skipping headers and footers when converting spreadsheet documents |
CONVERSIONNET-7979 | Enhancement | Implement chunked processing for PDF to Markdown conversion |
CONVERSIONNET-7971 | Enhancement | Add DefaultFont property to TxtLoadOptions for setting default font when converting from TXT |
CONVERSIONNET-7963 | Bug | Cannot convert from One to Eps |
CONVERSIONNET-7741 | Bug | Font substitution not working when perform PDF to PDF/A conversion |
CONVERSIONNET-7987 | Bug | Original source filename lost during intermediate document conversions |
CONVERSIONNET-7974 | Bug | MSG to PDF conversion issue |
CONVERSIONNET-7965 | Bug | Trial pages not properly limited when converting from diagram to web in evaluation mode |
Major Features
Font Transformation Support: Added font transformation capabilities during conversion for both WordProcessing and PDF documents, allowing more control over text styling and rendering.
Spreadsheet Conversion Options: Introduced an option to skip headers and footers when converting spreadsheets.
Improved PDF to Markdown Conversion: Implemented chunked processing for more efficient and scalable PDF-to-Markdown conversions.
TXT Conversion Flexibility: Added
DefaultFont
property toTxtLoadOptions
to control font rendering when converting plain text files.Key Bug Fixes: Resolved issues related to format compatibility, font substitution, trial mode behavior, message-to-PDF conversion, and preserving original file names during intermediate conversions.
Public API and backward incompatible changes
Introduced FontTransformations property in the WordPropcessingLoadOptions class. It allows transforming fonts after document loading and font substitution are complete. Font transformations can modify any fonts in the document, including those that were successfully loaded. Key usage scenarios include:
Scenario 1: Basic Font Name Transformation
var loadOptions = new WordProcessingLoadOptions(); loadOptions.FontTransformations.Add(FontTransformation.CreateByName("Times New Roman", "Tahoma"));
Scenario 2: Flexible Font Transformation
var loadOptions = new WordProcessingLoadOptions(); var sourceFont = new Font("Times New Roman"); var targetFont = new Font("Tahoma", 22); loadOptions.FontTransformations.Add(FontTransformation.CreateFlexible( sourceFont, targetFont, true, true));
The
CreateFlexible
method parameters:- First
true
: Match by font size - fonts will be matched regardless of their original size - Second
true
: Match by font style - fonts will be matched regardless of their style (bold, italic, underline)
This allows maximum flexibility in font matching, transforming all “Times New Roman” fonts to “Tahoma” at 22pt size, regardless of the source font’s original size or styling.
Scenario 3: Complete Font Style Transformation
var loadOptions = new WordProcessingLoadOptions(); var sourceFont = new Font("Times New Roman", 12); var targetFont = new Font("Tahoma", 22); targetFont.Italic = true; targetFont.Bold = true; targetFont.Underline = true; loadOptions.FontTransformations.Add(FontTransformation.Create(sourceFont, targetFont));
- First
Added FontTransformations property to the PdfLoadOptions class, providing the same functionality and usage scenarios as in
WordProcessingLoadOptions
(see above). Example usage:const string source = "balance.pdf"; using (var converter = new Converter(source, loadContext => new PdfLoadOptions { FontTransformations = new List<FontTransformation> { FontTransformation.CreateByName("Tahoma", "Arial") } })) { var options = new PdfConvertOptions { PdfOptions = { PdfFormat = PdfFormats.PdfA_1A } }; converter.Convert("converted.pdf", options); }
Intoduced two new properties SkipHeaders and SkipFooters in SpreadsheetLoadOptions class. Both properties can be used independently or together, providing flexible control over header/footer inclusion in converted documents. Usage example:
var loadOptions = new SpreadsheetLoadOptions { SkipHeaders = true, // Exclude headers from conversion output SkipFooters = true // Exclude footers from conversion output }; using (var converter = new Converter("input.xlsx", loadContext => loadOptions)) { var convertOptions = new PdfConvertOptions(); converter.Convert("output.pdf", convertOptions); }
Introduced DefaultFont property in the TxtLoadOptions class. This font will be applied when rendering document content during conversion (e.g., to PDF, WordProcessing, etc.)
Usage example
using GroupDocs.Conversion; using GroupDocs.Conversion.Options.Load; using GroupDocs.Conversion.Options.Convert; var loadOptions = new TxtLoadOptions(); var defaultFont = new Font("Arial", 12); defaultFont.Bold = true; // optional defaultFont.Italic = true; // optional defaultFont.Underline = true; // optional loadOptions.DefaultFont = defaultFont; using (var converter = new Converter("sample.txt", loadContext => loadOptions)) { var options = new PdfConvertOptions(); converter.Convert("output.pdf", options); }
FluentConverter Usage
using GroupDocs.Conversion; using GroupDocs.Conversion.Options.Load; using GroupDocs.Conversion.Options.Convert; var loadOptions = new TxtLoadOptions(); var defaultFont = new Font("Times New Roman", 14); defaultFont.Bold = true; // optional defaultFont.Italic = true; // optional defaultFont.Underline = true; // optional loadOptions.DefaultFont = defaultFont; FluentConverter .Load("sample.txt") .WithOptions(loadOptions) .ConvertTo("output.pdf") .Convert();