6
प्रिंटिंग में एकाधिक कॉलम से बचें मैं फ़्लो डॉक्यूमेंट से प्रिंट करने के लिए कोड लिख रहा हूं।FlowDocument
PrintDialog printDialog = new PrintDialog();
bool? result = printDialog.ShowDialog();
if (result == true)
{
FlowDocument fd = new FlowDocument();
fd.Blocks.Add(new Paragraph(new Run(String.Format("Message:\r\n{0}\r\n", txtMessage.Text))));
fd.PageHeight = printDialog.PrintableAreaHeight;
fd.PageWidth = printDialog.PrintableAreaWidth;
printDialog.PrintDocument((fd as IDocumentPaginatorSource).DocumentPaginator, "print test");
}
यह कोड एक पृष्ठ में एकाधिक कॉलम प्रिंट करेगा। इससे कैसे बचें?
इसके लिए धन्यवाद, मेरे पास छोटे दस्तावेज़ हैं और मेरे सिर को खरोंच कर बैठे हुए सोच रहे थे कि मेरे पृष्ठ का केवल आधा उपयोग क्यों किया जा रहा था। मुझे आश्चर्य है कि उन्होंने डिफ़ॉल्ट रूप से दो कॉलम क्यों ले लिए? – Mishax