Table's 'cellspacing' and 'cellpadding' are not imported from HTML when the unit is not specified, e.g. <table cellpadding="25">. According to the HTML Specification (https://www.w3.org/TR/REC-html40/struct/tables.html#adef-cellspacing), the only permitted values are: - only number - number followed by percent. MS Word imports it according to the specification (like WordsProcessing), but all of the browsers successfully imports values even with the px suffix, e.g. '25px'.
The alternative text allows setting a description of the information contained inside the table and is useful for people who may not be able to see the content.
An ArgumentException is thrown when importing HTML containing standard and non-standard pseudo classes or pseudo elements. The concreete scenario is the following: .myclass::-webkit-scrollbar or .myclass::-ms-expand The message of the exception is similar to this: "Unexpected character found at position [X]: ".. scrollbar::>>-<<webkit-scrollbar"".
When the <sectPr> element is not defined as the last child element but appears in different position of the <body> of the document, the content after <sectPr> is not imported. Although some applications handle this case, according to the Office Open XML specification, the sectPr element must be the last element inside the <body>.
In addition to the values containing numbers, the font-size property can have one of the following values as well: medium|xx-small|x-small|small|large|x-large|xx-large|smaller|larger|initial|inherit; At this point, HtmlFormatProvider skips these values and applies default font-size to the content. To import similar content with the proper styling, the customer can replace the CSS keywords with their equivalents in px.
When a document has a deleted text as part of track changes and there is a comment on the deletion, the document throws InvalidOperationException upon import.
If the background color is applied to <tr> element then it is not imported. Workaround: The background color may be applied to the cells (<td> elements) in the desired row and this should have the same effect.
There are multiple tags and attributes in the Open XML model which define the formatting of the complex script characters and are not implemented in the WordsProcessing model. Such tags are: szCs: Complex script font size; bCs: Complex script bold; iCs: Complex script italic; Attributes: cstheme: Complex Script Theme Font; The cs (Complex Script Font) attribute is implemented in the export, but it is not preserved in the model on import.
Currently, the align attribute is supported only for a table and when applied to a cell or row is omitted on import.
In a DOCX document, the users can define an image which is bigger than the size of the page. When such an image is at the beginning of the document and is converted with PdfFormatProvider, an additional page is added in the result PDF.
foreach (var image in document.EnumerateChildrenOfType<ImageInline>()) { var section = image.Paragraph.Parent as Section; if (image.Image.Height > section.PageSize.Height - section.PageMargins.Top - section.PageMargins.Bottom) { var height = section.PageSize.Height - section.PageMargins.Top - section.PageMargins.Bottom - (image.Paragraph.Spacing.SpacingAfter * (image.Paragraph.Spacing.LineSpacing - 0.97)); image.Image.Size = new System.Windows.Size(image.Image.Width, height); } }
When applying a table or table cell border with no thickness specified, the border is exported with a default thickness value of zero. However, by specification, the default value should be 2.
Workaround: Create a border by specifying the thickness value. For example:
table.Borders = new TableBorders(new Border(thickness, BorderStyle.Single, new ThemableColor(Colors.Black)));
The Spacing Before property of the paragraph at the start of the page should not be respected if it is not the first one inside the current section.
Manually overriding the Spacing Before property would resolve the issue.