Click here to Skip to main content
15,920,031 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
good morning everybody , iam doing the application of printing, in wpf in C#.net, from my application the i am able to print the matter in textbox , but , the printing page look like a different font and different fontsize, and more over due to this iam not getting the visiable matter from the printer , so that i need to chanege the font and the size nad line spacing by using C# while printing , so please me an idea,

my sample code is
FlowDocument doc = new FlowDocument(new Paragraph(new Run(textBox1.Text)));
          doc.Name = "FlowDoc";
          IDocumentPaginatorSource idpSource = doc;
          PrintDialog printDlg = new System.Windows.Controls.PrintDialog();
          printDlg.PrintDocument(idpSource.DocumentPaginator, textBox1.Text);



give me and idea
Posted

1 solution

The Run element you used have properties to change the Font, Font Styles.

Take a look here[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900