Completed
Last Updated: 15 Feb 2018 16:53 by ADMIN
ADMIN
Deyan
Created on: 08 Jun 2016 07:30
Category: WordsProcessing
Type: Bug Report
5
WordsProcessing: Table with specified width does not expand to its full width when exported to PDF
The issue is observed with tables that have a specific width (in inches or percents) but whose columns do not have width specified. MS Word renders such tables expanded to their full width. For tables with 100% width, they have to expand to the entire width of the page. The same behavior is expected in the PDF export.

As a common side effect, when specific text alignment (e.g. center or right) is applied to a paragraph within a table cell, and the table is with specified width, but the column is auto-sized (without set width), then the text alignment seems as not respected. Actually the problem is that the column table is shrunk to the text width.

Workaround: this may be used before exporting the RadFlowDocument instance to PDF:

foreach (Table table in document.EnumerateChildrenOfType<Table>())
{
    table.LayoutType = TableLayoutType.FixedWidth;
}


Workaround 2:

Set specific width to the auto-sized columns (to any of the cells in the columns):

cell.PreferredWidth = new Telerik.Windows.Documents.Flow.Model.Styles.TableWidthUnit(500);

Available in R1 2018 SP2 release version.
0 comments