Aspose.Words for .NET 19.1 Release Notes
Major Features
There are 48 improvements and fixes in this regular monthly release. The most notable are:
- Implemented the directed line caps rendering for Bezier curves in metafiles.
- Implemented processing of the stroke properties while rendering custom line caps in metafiles.
- Implemented support of Unicode font names while rendering to PDF.
- Implemented Tiff binarization threshold control via ImageSaveOptions.ThresholdForFloydSteinbergDithering property.
- Fixed a bug that prevents rendering of horizontal lines with gradient fill in DrawingML.
- Fixed a bug when gradient fill is not rotated with DrawingML shapes by default.
- Fixed a bug that caused an incorrect rendering of DrawingML shapes inside groups when 3D rotation was applied.
- Fixed a bug with the calculation of the point coordinates if the date axis is replaced by the string axis.
- Fixed a bug with vertical alignment of Ruby objects while rendering.
- Fixed a bug that caused the creation of extra link tags in output PDF when rendering documents with footnotes.
- Supported dynamic table cell merging for LINQ Reporting Engine.
- Supported textual comments within LINQ Reporting Engine template syntax tags.
- Improved computation of wrap bounds of floating objects which affects position of text nearby.
- Improved positioning of line when it cannot fit next to floating object and has to be pushed below.
- Implemented navigation from footnote reference to footnote for PDF output.
- Fixed exception which may happen when spans are merged in paragraphs with different directionality.
- Fixed exception which may happen when span has null shading inside text box.
Full List of Issues Covering all Changes in this Release
Key | Summary | Category |
---|---|---|
WORDSNET-16891 | DOCX to PDF conversion issue with text wrapping around the table | Bug |
WORDSNET-17644 | The scaling of the second vertical axis and the placement of the grey line are changed after converting to PDF | Bug |
WORDSNET-5656 | Images are rendering incorrectly/misplaced in Fixed Formats | Bug |
WORDSNET-17723 | Field code of hyperlink is changed after conversion from RTF to DOCX | Bug |
WORDSNET-17824 | Extra link tag is added for footnotes inside table | Bug |
WORDSNET-17434 | Gradient shape is lost after conversion from DOCX to PDF | Bug |
WORDSNET-17442 | Superscipt on Japanese characters vertical misalignment | Bug |
WORDSNET-17802 | DOCX to PDF conversion issue with charts' rendering | Bug |
WORDSNET-16475 | Extra left margin is added after conversion from HTML to MHT | Bug |
WORDSNET-17632 | DOCX to HTML conversion issue with table border | Bug |
WORDSNET-17638 | Word to HTML Paragraph Formatting Issue | Bug |
WORDSNET-17414 | MHTML to PDF conversion issue with text position | Bug |
WORDSNET-17878 | Copied styles don’t match the source styles | Bug |
WORDSNET-17896 | Shape’s contents are lost in output PDF | Bug |
WORDSNET-17739 | BuiltInDocumentProperties.Bytes always does not return a valid number of bytes | Bug |
WORDSNET-17840 | Border color not modified when changing Accent color | Bug |
WORDSNET-17884 | Arrow shapes do not render correctly in output PDF | Bug |
WORDSNET-17717 | Incorrect list markers in a RTF document | Bug |
WORDSNET-17900 | Font Name Not Properly Embedded in Converted PDF | Bug |
WORDSNET-17438 | Document with ‘PlaceHolder Text’ style, get corrupted after UpdateFields() using Aspose.Words | Bug |
WORDSNET-17444 | Text wrapping problems when saving to PDF | Bug |
WORDSNET-13626 | Extra empty page is created after conversion from Docx to Pdf | Bug |
WORDSNET-16468 | Position of chart is changed in output PDF | Bug |
WORDSNET-15961 | Style.AddCopy changes the style name | Bug |
WORDSNET-17922 | Missing Text when converting RTF to PDF | Bug |
WORDSNET-17837 | DOCX to PDF conversion issue with GroupShape rendering | Bug |
WORDSNET-17953 | Gradient fill has incorrect direction while rendering rotated DML shapes | Bug |
WORDSNET-16517 | SymbolSetRemapUndefined error appears when printing PCL generated by Aspose.Words | Bug |
WORDSNET-17850 | How to merge table cells using the Linq engine | Bug |
WORDSNET-17863 | DOCX to PDF conversion issue with list label rendering | Bug |
WORDSNET-17615 | Different time format in doc and pdf | Bug |
WORDSNET-17797 | DOCX with picture yields faulty PDF with black areas | Bug |
WORDSNET-17538 | ImportFormatMode issues with KeepSourceFormatting and KeepDifferentStyles when importing nodes | Bug |
WORDSNET-17819 | Expose the threshold control for Tiff binarization // Saving from Word to Tif - binarization settings | Enhancement |
WORDSNET-17068 | Arrow Heads truncate when converting DOCX to PDF | Enhancement |
WORDSNET-17765 | Make footnote endnote numbers hyperlinks leading to corresponding note entry in main story | Enhancement |
WORDSNET-4876 | Footnotes and endnotes references need to be rendered as active links | Enhancement |
WORDSNET-17598 | System.NullReferenceException occurs when rendering DOC to PDF | Exception |
WORDSNET-16577 | SEH exceptions raises while instancing Document class | Exception |
WORDSNET-17672 | Document.UpdatePageLayout throws System.NullReferenceException | Exception |
WORDSNET-17959 | System.OverflowException is thrown while reading the ODT file | Exception |
WORDSNET-17926 | An exception raises while converting ODT to DOCX | Exception |
WORDSNET-17814 | MailMerge.ExecuteWithRegions throws System.NullReferenceException | Exception |
WORDSNET-17903 | Document.Compare throws System.ArgumentOutOfRangeException | Exception |
WORDSNET-15798 | Add feature to merge table’s cell vertically depending upon data structure | Feature |
WORDSNET-17786 | Add name to foreach syntax of Linq Reporting | Feature |
WORDSNET-17784 | UnsupportedOperationException upon loading Doc | Regression |
WORDSNET-17956 | System.InvalidCastException occurs upon converting DOC to DOCX | Regression |
Public API and Backward Incompatible Changes
This section lists public API changes that were introduced in Aspose.Words 19.1. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in Aspose.Words which may affect existing code. Any behavior introduced that could be seen as a regression and modifies existing behavior is especially important and is documented here.
Different Time Format in DOC and PDF (Added IFieldUpdateCultureSource)
WORDSNET-17615 has now been resolved.
A customer complained about incorrect date/time formatting. We have figured out that there is a difference between MS Word formatting and .NET/Windows formatting and also between different .NET Framework versions.
When thinking on how to fix this issue, we opted for providing the customer with a flexible way of specifying a culture defining date/time formatting on per field basis. To do so, we have introduced the IFieldUpdateCultureSource interface:
/// <summary>
/// When implemented, provides a <see cref="CultureInfo"/> object that should be used during the update of a particular field.
/// </summary>
public interface IFieldUpdateCultureProvider
{
/// <summary>
/// Returns a <see cref="CultureInfo"/> object to be used during the field's update.
/// </summary>
/// <param name="culture">The name of the culture requested for the field being updated.</param>
/// <param name="field">The field being updated.</param>
/// <returns>The culture object that should be used for the field's update.</returns>
CultureInfo GetCulture(string culture, Field field);
}
and the corresponding FieldOptions property:
/// <summary>
/// Gets or sets a provider that returns a culture object specific for each particular field.
/// </summary>
/// <remarks>
/// <para>The provider is requested when the value of <see cref="FieldUpdateCultureSource"/> is <b>FieldUpdateCultureSource.FieldCode</b>.</para>
/// <para>If the provider is present, then the culture object it returns is used for the field update. Otherwise, a system culture is used.</para>
/// </remarks>
public IFieldUpdateCultureProvider FieldUpdateCultureProvider
Usage:
document.FieldOptions.FieldUpdateCultureSource = FieldUpdateCultureSource.FieldCode;
document.FieldOptions.FieldUpdateCultureProvider = new FieldUpdateCultureProvider();
private class FieldUpdateCultureProvider : IFieldUpdateCultureProvider
{
public CultureInfo GetCulture(string name, Field field)
{
switch (name)
{
case "ru-RU":
CultureInfo culture = new CultureInfo(name, false);
DateTimeFormatInfo format = culture.DateTimeFormat;
format.MonthNames = new []{"месяц 1", "месяц 2", "месяц 3", "месяц 4", "месяц 5", "месяц 6", "месяц 7", "месяц 8", "месяц 9", "месяц 10", "месяц 11", "месяц 12", ""};
format.MonthGenitiveNames = format.MonthNames;
format.AbbreviatedMonthNames = new []{"мес 1", "мес 2", "мес 3", "мес 4", "мес 5", "мес 6", "мес 7", "мес 8", "мес 9", "мес 10", "мес 11", "мес 12", ""};
format.AbbreviatedMonthGenitiveNames = format.AbbreviatedMonthNames;
format.DayNames = new []{"день недели 7", "день недели 1", "день недели 2", "день недели 3", "день недели 4", "день недели 5", "день недели 6"};
format.AbbreviatedDayNames = new []{"день 7", "день 1", "день 2", "день 3", "день 4", "день 5", "день 6"};
format.ShortestDayNames = new []{"д7", "д1", "д2", "д3", "д4", "д5", "д6"};
format.AMDesignator = "До полудня";
format.PMDesignator = "После полудня";
const string pattern = "yyyy MM (MMMM) dd (dddd) hh:mm:ss tt";
format.LongDatePattern = pattern;
format.LongTimePattern = pattern;
format.ShortDatePattern = pattern;
format.ShortTimePattern = pattern;
return culture;
case "en-US":
return new CultureInfo(name, false);
default:
return null;
}
}
}
Customers are now able to specify any culture and any date/time formatting for a particular field based on the specified name.
Expose the threshold control for Tiff binarization
WORDSNET-17819 has now been resolved:
New public property was added to ImageSaveOptions class:
/// <summary>
/// Gets or sets the threshold that determines the value
/// of the binarization error in the Floyd-Steinberg method.
/// when <see cref="ImageBinarizationMethod"/> is ImageBinarizationMethod.FloydSteinbergDithering.
/// </summary>
/// <remarks>
/// <para>The default value is 128.</para>
/// </remarks>
public byte ThresholdForFloydSteinbergDithering
{
get { return mThresholdForFloydSteinbergDithering; }
set { mThresholdForFloydSteinbergDithering = value; }
}
The higher the value, the darker the image.
UC
Document doc = new Document ("inputFileName");
ImageSaveOptions options = new ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);
options.TiffCompression = TiffCompression.Ccitt3;
options.ImageColorMode = ImageColorMode.Grayscale;
options.TiffBinarizationMethod = ImageBinarizationMethod.FloydSteinbergDithering;
options.ThresholdForFloydSteinbergDithering = 254;
doc.Save("outputFileNameC.tiff", options);