views:

73

answers:

1

I have a Table with 4 columns inside a FlowDocument. I've set the width of the columns but when viewed in FlowDocumentReader, when in Page Mode or 2 Page Mode, the right most column is truncated.

<FlowDocument >
<Table BorderBrush="Black" BorderThickness="1">
    <Table.Columns>
        <TableColumn Background="Red" Width="120" />
        <TableColumn Background="Green" Width="180" />
        <TableColumn Background="Blue" Width="140" />
        <TableColumn Background="Yellow" Width="140" />
    </Table.Columns>
    <TableRowGroup>
        <TableRow>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Row Number</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Text</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Another Column</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Yet Another Column</Paragraph>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>1</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph >Lorem Ipsum is simply dummy text of the printing and typesetting industry.</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Hello World</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Where is my text?</Paragraph>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>2</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ...</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>3</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>4</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
        </TableRow>
        <TableRow>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>5</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
            <TableCell BorderBrush="Black" BorderThickness="1">
                <Paragraph></Paragraph>
            </TableCell>
        </TableRow>
    </TableRowGroup>
</Table>

Scroll Mode looks okay: Scroll Mode

When in Page Mode, things are different. Note that part of the third column and all of the fourth column are truncated. Why is it ever useful to truncate the columns on the right instead of showing them on the next page? Page Mode

A: 

I was able to get the FlowDocument to display in a single column by setting the ColumnWidth to the same value as the PageWidth. I'm using FlowDocument to print and this turns out to work very well. The PageWidth and PageHeight properties are set to whatever the PrintDialog says the printable area is. I then set the ColumnWidth to prevent printing in more than one column.

<FlowDocument PageWidth="850" PageHeight="1056" ColumnWidth="850" >
...
</FlowDocument>
mcohen75