Neeraj Khajanchi

Neeraj Khajanchi

  • NA
  • 12
  • 15.5k

How to set A4 size for FlowDocument under Window in WPF C# ?

Aug 14 2017 9:22 AM
I have a flowdocument under a Window in WPF C# desktop application. I want to print the flow document for A4 size. How do I set size so that content under the flow document covers full A4 paper size? 
 
<Window x:Class="CarpetChallan.Window1"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   xmlns:local="clr-namespace:CarpetChallan"
   mc:Ignorable="d"
   Title="Window1" Height="730" Width="800">
   <Grid>
      <FlowDocumentReader ScrollViewer.CanContentScroll=" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsPageViewEnabled="True">
         <FlowDocument ColumnWidth="999999" PageHeight="21cm" Name="CallanFlowFoc">

Answers (4)