You need to define a print page handler to do the actual printing. See the
following article for a sample on how to do this.
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemdrawingprintingprintdocumentclasstopic. asp
You can pretty much cut-and-paste the code to get this working in no time.
hth
-Joel
--------------------
From: "john sutor" <john_sutor@NOSPAM>
Subject: Printing a document
Date: Mon, 7 Jun 2004 14:21:17 -0400
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <OV**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 216.196.231.250
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
.phx.gblXref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.csharp:249646
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
Does anyone know how to print a document. This should be simple. Here is
my code
I get a blank page
string sdoc="C:\\Test1.txt";
this.prtDocument.DocumentName=sdoc;
this.prtDocument.Print();
--------------------------------------------------------------------
This reply is provided AS IS, without warranty (express or implied).