Page 1 of 1

Network printer does not work

Posted: Wed Nov 20, 2019 8:30 am
by wolf1860
TSRichViewEdit,Standard printing action:SRVE FILE--TSrvActionPrint,It works fine when the printer connects to the pc directly,but it does not work when I use a network printer.
The printer dialog displays the information,but the printer does nothing.

Re: Network printer does not work

Posted: Wed Nov 20, 2019 8:41 am
by Sergey Tkachenko
It does not even print an empty page?

Re: Network printer does not work

Posted: Wed Nov 20, 2019 9:07 am
by wolf1860
No,it doesn't.By the way,my network printer is HP LaserJet P1505n. My client's network printer is EPSON33B569(L6160 Series).But another client' network printer(SHARP MX-M2658N -WSD) works fine.

Re: Network printer does not work

Posted: Wed Nov 20, 2019 10:29 am
by Sergey Tkachenko
If nothing is happens, this means that the standard TPrinter methods (BeginDoc, EndDoc, NewPage) do not work.
This means that standard Delphi/WinAPI methods do not work with this printer.
Probably, it's just not available...

Can a print preview be displayed?

Re: Network printer does not work

Posted: Wed Nov 20, 2019 10:57 am
by wolf1860
Sorry,I don't provide a preview function.How should I do to test this?

Re: Network printer does not work

Posted: Wed Nov 20, 2019 7:45 pm
by Sergey Tkachenko
Sorry, I overlooked that the question was about ScaleRichView.

But testing with TRichView may be useful. Please test with RichViewActions\Demos\DelphiUnicode\ActionTest\ demo.

First, run File | Print by choosing the printer. Does it print?
Next, check File | Print Preview. Does it display a preview?
(I suggest "Print" first because its dialog allows to choose a printer; "Print Preview" uses the current printer).

For any case, try a document that contains not only text but some drawing (for example, a table with borders)

Re: Network printer does not work

Posted: Thu Nov 21, 2019 1:19 am
by wolf1860
In office word the printer works fine,that means the network printer is ready.
I did further test and found some strange situations(The demo application).
1.I created an empty file,typed some english charaters ,It worked after a long time .So I tried to print the readme.rvf first page(demo default file),it worked after a long time.
2.I created an empty file,input some chinese characters,it did nothing.
3.I created an empty file,input some englist characters and a table with some english characters,it worked after a long time. Then I typed some chinese charaters,it did not work any more.
Maybe,It has something to do with the character.

Re: Network printer does not work

Posted: Thu Nov 21, 2019 4:17 pm
by Sergey Tkachenko
Try assigning MetafileCompatibility = True.

For TRichView, it is TRVPrint.MetafileCompatibility.
For ScaleRichView, if you use RichViewAction, it is TRVAControlPanel.MetafileCompatibility.
In ActionTest demos, it can se set in Tools | Options dialog.

For ScaleRichView without RichViewActions, it is parameter of printing methods, or TSRVPrint.MetafileCompatibility.

Re: Network printer does not work

Posted: Thu Nov 21, 2019 5:33 pm
by wolf1860
In my application,I set the TRVAControlPanel.Compatibility:=True,It did not work.
In the Demo,I set the tool-options-metacompatiblity:=true it did not work either.

Re: Network printer does not work

Posted: Fri Nov 22, 2019 11:48 am
by Sergey Tkachenko
In the demo, also try to change text engine from Uniscribe to Windows (in the same dialog)

Re: Network printer does not work

Posted: Fri Nov 22, 2019 1:46 pm
by wolf1860
I changed it to windows,the printer did not work either.
So I tried again.When I create a new document and typed some english characters,the printer worked after a long time ,I mean that is unnormal but it worked.
I cleared the english charaters and typed some chinese characters,it didn't work.
There are some differences between the two steps: there are 2 items in the printer dialog when english charaters and there is only one item in the printer dialog when chinese characters,the item disappeared after a long time and the printer did nothing.

Re: Network printer does not work

Posted: Sun Nov 24, 2019 10:24 am
by Sergey Tkachenko
Unfortunately, I do not know how to fix it. ScaleRichView simply calls TPrinter methods (like BeginDoc, NewPage, etc.) and then draws on the printer canvas.
Probably, the problem is in the printer driver. Can it be updated?