Link to home
Start Free TrialLog in
Avatar of jstoner49
jstoner49

asked on

I'm using Richedit.print but it will not print across a network

I'm using the richedit.print because it word wraps during printing.  This feature works great to a local printer. But when I use the print dialog to select the printers, it list all of the printers on the network. I select the network printer and nothing happens, I wait for the Windows 2000 print window it never comes up.  I get no errors and nothing prints.

I need help.

Thanks Jim
Avatar of mikepj
mikepj
Flag of Canada image

Can you provide some code showing the trouble?  That should work.
Avatar of jstoner49
jstoner49

ASKER

Here is my code for printing. It prints fine to a local printer but it will not print the network printers.

procedure TForm1.Button20Click(Sender: TObject);
var
fprn: system.text;
I:integer;
Lcol: integer;
begin
      anquest;

    richedit1.Text:= print.Text;
 if printdialog1.Execute then
richedit1.Print(print.text);




end;
The Print() method parameter is the document title.  I wonder if this causes your printer driver to do something strange.
if I don't use (print.text) I get blank paper on the local printer. Print.text is a tmemo.
You have something odd going on.  Update your printer drivers.  I have previously done exactly what you have done and it worked great.
I'm using richedit.print because wordwrap on the printer.  
I have searching for something on several sites. One thing that keeps coming up is printerindex I'm still not sure how to write code with it.
these are current printer drivers for win 2000.  When printing to win2000 it always prompts you to select a printer even when the program already has selected the specific printer.  When I run the program it never launches the win 2000 printer select window. I don't even get an error and the print job is not even spooled.
You can use it to directly read/control the printer selection.  In conjunction with Printers[PrinterIndex], you can see the name of the printer.  I'm sure much more is readily available.  I did a quick test and PrinterIndex is set directly by TPrinterDialog so you won't need it unless you're making this selection yourself.
I'm not sure why the richedit would not print to the network printer I'm using the generic code I found for printing tmemo this seems to work just fine.
jstoner49:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
jstoner49,
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Accept mikepj's answer http:#7178985 and Refund

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial