I'm trying to print my FlowDocument (which is wrapped into a FlowDocumentScrollViewer) because I have a lot of texts/Textbox/combobox and the page height can become high !
I'm using this :
PrintDialog printDialog = new PrintDialog();
if (printDialog.ShowDialog() == true)
{
Scrollvvv.Document.ColumnWidth = printDialog.PrintableAreaWidth;
Scrollvvv.Document.ColumnGap = 0;
printDialog.PrintDocument(((IDocumentPaginatorSource)Scrollvvv.Document).DocumentPaginator, ServicesLangue.RM.GetString("TITRE_MODIFIER_SALON_EXPOSANT"));
}
My xaml looks like :
<FlowDocumentScrollViewer Name="Scrollvvv" VerticalScrollBarVisibility="Auto">
<FlowDocument Name="flowDoc" PagePadding="10">
<Section>
<BlockUIContainer>
<Grid Name="grid_principale">
<!-- Lot of stuffs here -->
</Grid>
</BlockUIContainer>
</Section>
</FlowDocument>
</FlowDocumentScrollViewer>
The thing is : It prints all my data in 1 page, the width is ok (i might add some margin but that's ok) but it compresses all my controls to fit in one page in height.
How to fix this ? I'd just want to disable this auto Height and keep the original size.