How to Print full slip when applying ScrollViewer

I have this code in where I am printing slip for my wpf application.
Here the printing is working fine if I just click on print button and is printing full slip from top to bottom. The issue occurs when I scroll and only some portion of page is visible and some is not like the picture blow:

when I print it prints only the visible part from above

this is the code i have that i am using for printing.

<Grid>
    <Grid.RowDefinitions>
        <!-- Main content takes most of the space -->
        <RowDefinition Height="*"/>
        <!-- Footer section is auto-sized -->
        <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <ScrollViewer VerticalScrollBarVisibility="Hidden"  Grid.Row="0">
        <StackPanel x:Name="PrintArea" Margin="10">

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>

                <!-- Header Row -->
                <Grid Grid.Row="0">
                    <!-- Repeat ColumnDefinitions here for consistent width -->
                    <Grid.ColumnDefinitions>
                        <!-- Sr. -->
                        <ColumnDefinition Width="10*"/>
                        <!-- Qty -->
                        <ColumnDefinition Width="10*"/>
                        <!-- Price -->
                        <ColumnDefinition Width="40*"/>
                        <!-- Total -->
                        <ColumnDefinition Width="40*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Grid.Column="0" Text="Sr." FontWeight="Bold" TextDecorations="Underline" HorizontalAlignment="Center"/>
                    <TextBlock Grid.Column="1" Text="Qty" FontWeight="Bold" TextDecorations="Underline" HorizontalAlignment="Center"/>
                    <TextBlock Grid.Column="2" Text="Price" FontWeight="Bold" TextDecorations="Underline" HorizontalAlignment="Center"/>
                    <TextBlock Grid.Column="3" Text="Total" FontWeight="Bold" TextDecorations="Underline" HorizontalAlignment="Center" />
                </Grid>

                <!-- DetailSectionItems -->
                <ItemsControl Grid.Row="1" x:Name="DetailSectionItemsSection" ItemsSource="{Binding ActiveInvoice.InvoiceItems}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,0">
                                <!-- Display Name and Code above item details -->
                                <TextBlock Text="{Binding Name}" 
                                  TextWrapping="Wrap" MaxWidth="300"/>

                                <!-- Item details row -->
                                <Grid Margin="0,2,0,2">
                                    <!-- Repeat ColumnDefinitions here as well -->
                                    <Grid.ColumnDefinitions>
                                        <!-- Sr. -->
                                        <ColumnDefinition Width="10*"/>
                                        <!-- Qty -->
                                        <ColumnDefinition Width="10*"/>
                                        <!-- Price -->
                                        <ColumnDefinition Width="40*"/>
                                        <!-- Total -->
                                        <ColumnDefinition Width="40*"/>
                                    </Grid.ColumnDefinitions>

                                    <!-- Serial Number using AlternationIndex -->
                                    <TextBlock Grid.Column="0" HorizontalAlignment="Center" TextWrapping="Wrap" MaxWidth="40"
                                      Text="{Binding (ItemsControl.AlternationIndex), 
                                      RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}, 
                                      Converter={StaticResource IndexToSrNoConverter}}"/>

                                    <TextBlock Grid.Column="1" Text="{Binding Quantity}" HorizontalAlignment="Center"
                                      TextWrapping="Wrap" MaxWidth="40"/>
                                    <StackPanel Grid.Column="2" HorizontalAlignment="Center" Orientation="Horizontal">
                                        <TextBlock  Text="{Binding DataContext.ActiveInvoice.ViewableCurrency, 
                                           RelativeSource={RelativeSource AncestorType=ItemsControl}}" HorizontalAlignment="Center" Margin="0,0,2,0"/>
                                        <TextBlock  Text="{Binding SalePrice}" HorizontalAlignment="Center"
                                           TextWrapping="Wrap" MaxWidth="150"/>
                                    </StackPanel>
                                    <StackPanel Grid.Column="3" HorizontalAlignment="Center" Orientation="Horizontal">
                                        <TextBlock  Text="{Binding DataContext.ActiveInvoice.ViewableCurrency, 
                                           RelativeSource={RelativeSource AncestorType=ItemsControl}}" HorizontalAlignment="Center" Margin="0,0,2,0"/>
                                        <TextBlock  Text="{Binding InvoiceItemNetTotal}" HorizontalAlignment="Center"
                                           TextWrapping="Wrap" MaxWidth="150"/>
                                    </StackPanel>
                                </Grid>

                                <!-- Divider Line -->
                                <Line X1="0" X2="1" Y1="0" Y2="0" Stretch="Fill" Stroke="Black" StrokeThickness="1" StrokeDashArray="1 2" Margin="0,5,0,5"/>
                            </StackPanel>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>


            <Separator Margin="10,10,10,10"/>

        </StackPanel>
    </ScrollViewer>

</Grid>

This is code For

    public partial class PosDefaultWindow : Window
    {
        //private InvoiceViewModel _invoiceViewModel;
        private SalesTerminalViewModel _salesTerminalViewModel;
        public ICommand PrintCommand { get; set; }
        public PosDefaultWindow(SalesTerminalViewModel salesTerminalViewModel)
        {
            //Set the data context
            _salesTerminalViewModel = salesTerminalViewModel;
            this.DataContext = _salesTerminalViewModel;
    
    
            PrintCommand = new RelayCommand(ExecutePrintCommand);
            this.Closing += PosCustomPrintWindow_Closing;
            this.Loaded += PosCustomPrintWindow_Loaded;
        }
        private void PosCustomPrintWindow_Loaded(object sender, RoutedEventArgs e)
        {
            TemplateHelper.SrNo = 0;
            //ActiveTemplateParse();
    
            InitializeComponent();
            // Automatically call PrintButton_Click to start printing when the window opens
            if (PrintSlip(PrintArea).GetAwaiter().GetResult())
            {
                this.Close();
            }
        }
        private void ActiveTemplateParse()
        {
            _salesTerminalViewModel.CurrentDate = DateTime.Now.ToString("yyyy-MM-dd");
            _salesTerminalViewModel.CurrentTime = DateTime.Now.ToString("h:mm tt");
        }
    
        private void PosCustomPrintWindow_Closing(object? sender, System.ComponentModel.CancelEventArgs e)
        {
            // Ensure that the focus is correctly set when closing
            if (this.Owner != null)
            {
                this.Owner.Focus();
    
            }
        }
        public async Task<bool> PrintSlip(UIElement printArea)
        {
            // Ensure the content is fully rendered
            printArea.Measure(new System.Windows.Size(printArea.RenderSize.Width, printArea.RenderSize.Height));
            printArea.Arrange(new Rect(new System.Windows.Size(printArea.RenderSize.Width, printArea.RenderSize.Height)));
    
            // Create a PrintDialog
            PrintDialog printDialog = new PrintDialog();
    
            // Show the print dialog to the user
            if (printDialog.ShowDialog() == true)
            {
                // Print only the specified visual (PrintArea)
                printDialog.PrintVisual(printArea, "POS Slip Print");
            }
    
            return true;
        }
    
        private void PrintButton_Click(object sender, RoutedEventArgs e)
        {
            // Pass the PrintArea to the PrintSlip method
            if (PrintSlip(PrintArea).GetAwaiter().GetResult())
            {
                this.Close();
            }
        }
        private void ExecutePrintCommand(object parameter)
        {
    
            // Call the same PrintButton_Click logic here
            PrintButton_Click(this, new RoutedEventArgs());
        }

}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật