Hello. I have a problem with printing multiple pages in textBox in C#. I have no idea how to do this, tried e.HasMorePages but it still isn't working. Could you help me please? It's my code.
private void printTextBox(object sender, PrintPageEventArgs e) { e.Graphics.DrawString(tabela.Text, tabela.Font, Brushes.Black, 50, 20); } private void printTextBoxButton_Click(object sender, EventArgs e) { PrintDocument pd = new PrintDocument(); pd.PrintPage += printTextBox; PrintPreviewDialog ppd = new PrintPreviewDialog(); ppd.Document = pd; ppd.ShowDialog(); ppd.Close(); pd.Dispose(); }
Thank you!