TX Text Control Blog

Printing into a PrintPreview control II

Blogged by Björn Meyer on November 19, 2007 and tagged with printing, sample.

In this sample, I explained how to print into a .NET Framework PrintPreviewDialog control.

http://www.textcontrol.com/en_US/downloads/library/snippet/preview2/

A customized PrintController has been derived from the PrintController class. But I forgot to tell you to reset the PrintController after initializing the dialog. This is important, because the dialog provides a button to print the content to the specified printer directly. If the PrintController is the inherited one, its content will not be printed.

Therefore, we have to pass a new PrintController, after the dialog has been initialized. We can attach an Actived event where the dialog will be opened:

pp.Activated += new EventHandler(pp_Activated);

In the event, we will create a new PrintController:

void pp_Activated(object sender, EventArgs e) { pp.Document.PrintController = new StandardPrintController(); }

The PrintPreviewDialog must be accessible in this sample:

private PrintPreviewDialog pp = new PrintPreviewDialog();
 
 
User Contributed Note

User Contributed Note by Salvadoron November 26, 2007 at 6:20:38 PM CET

how could be possible to put a new table or new cell in each new page?
User Contributed Note

User Contributed Note by Salvadoron December 19, 2007 at 4:45:14 PM CET

How add a letter size table cell on each page that you are apening and don't reduce that cells, always the same size... if delete a line dont reduce the cell... if change of page when you are writting, you must to continue in next cell in same column...in other words, I want 2 columns without text limit....
User Contributed Note

User Contributed Note by Jameson December 20, 2007 at 3:11:28 PM CET

As a Transcription company, we are interested in what you are doing in the Transcription area. We have done a number of extra's in our application (Auto-correct, Speedtyping, Medical Dictionary, Template Management, etc.) In additiona, we are also awaiting v14 of TXText because it contains vital features we must have in a Text Editor.
User Contributed Note

User Contributed Note by Björn Meyer on December 21, 2007 at 9:35:29 AM CET

Hello James Thanks for your thoughts. That is a very interesting comment, because we are currently working on a set of samples and best practices for medical transcription applications. May I ask you to contact me directly to discuss further requirements?
User Contributed Note

User Contributed Note by Zaxxonon January 11, 2008 at 3:08:24 PM CET

It would be very kind, if all samples can be made in visual basic.NET too. In our company we have only installed VB.NET and no C#. Often i couldn't try out the samples which are made with C# :-(
User Contributed Note

User Contributed Note by Ian Hughes on March 23, 2008 at 12:38:30 AM CET

I would like: 1) A better search and replace sample (Whole words, backwards and forwards search, special characters, color) 2) Not a code issue, but simply adequate documentation! In vb.net too, thank you. Code samples are useful. Diagrams are not. C# is lovely, but I have to convert it and then debug it.
 

Products

Support

Downloads

Corporate

Buy Now