The default print controller of .NET displays a status dialog that shows the status of the printing process like this:
'Page 5 of document'
If you want to print without such a print status dialog, you will need to use the StandardPrintController instead of the default PrintControllerWithStatusDialog. The StandardPrintController is part of the System.Drawing.Printing namespace. The following code prints the content of TX Text Control without such print status dialog:
PrintDocument printDoc = new PrintDocument();
PrintController printCtl = new StandardPrintController();
printDoc.PrintController = printCtl;
textControl1.Print(printDoc);Feel free to contact me, if you have any questions or would like to discuss further printing possibilities of TX Text Control.
Can this be achieved in vb.net?? Can you provide the code.I have problem with printing WITHOUT showing the txtextcontrol (tables in document are "broken"). If I show control
(and content) before printing, document print just fine.
Sample:
private void Print()
{
TxTextControl ctrl = new TxTextControl();
ctrl.Load(@"c:\test.rtf", StreamType.RichTextFormat);
ctrl.Print("test"); //or with PrintDocument()
}
I also tray to set control page margin with LoadSettings.Margins and also don't work.
(Tables has fixed size.)
Can anyone help.
DavidHello David
It is not possible to use the TextControl class without being visible on a form. In this case, you need to use the
ServerTextControl class that can be initialized invisible without a form.is it possible to override the printcontroller in such a way that a progressbar could be displayed to the user regarding running
print progress?
thanks