Page 1 of 1

TPrinter Class

Posted: Wed Apr 05, 2006 4:09 pm
by RAMESHBABU
Hi All

I am a TDosPrn user and I am new to Windows Printing. I wrote a small
customised report using TPrinter Class and the output in the preivew is
good and exactly as per my requirement.

I changed the default printer to another printer. And the output is not in
a readable position. The rows, and columns are displaced.

I found the difference is just bause of their individual printer's resolution.

Can anybody suggest me what is the procedure that I should adopt
to get a constant output in preview/on paper, even the user selects
different printers ( with the different printer resolutions ).


Thanks in advance


- Ramesh Babu P

Posted: Wed Apr 05, 2006 4:31 pm
by carlos vargas
Ramesh

I you use oPrint:Say() method, youl have this problem. (this is resolution depend of printer)

use oPrint:cmSay() method for avod the problem.

sorry for my very bad english.

Posted: Wed Apr 05, 2006 4:51 pm
by RAMESHBABU
Hi carlos

Thank you for quick reply.

I will try it and come back.

Regards

- Ramesh Babu P

Posted: Wed Apr 05, 2006 5:24 pm
by Roger Seiler
Download a zip file from my website that contains source code to deal with your printer problems. The URL is below.

The problem is usually caused by the workstation printer using a different DPI than the printer that you used when you created the report. My program code executes a test printout that shows what adjustments need top be made for the particular printer, and writes the adjustment codes to an ini file on the workstation for future automatic reference by the report programs.

http://www.leadersoft.com/support/prntadj.zip

This zip contains:

- 2 PRG files: PrntAdj.prg and TRept23.prg

- a PrntAdj.rc file containg the resource for the dialog used by PrntAdj.prg

- a PrinTest.txt file to be used for the test of the printers internal settings

- a PrntAdj.txt Help text file to explain things to the end user

Good luck!

- Roger

Posted: Wed Apr 05, 2006 6:10 pm
by Antonio Linares
Roger,

Thanks!

Posted: Thu Apr 06, 2006 5:47 am
by RAMESHBABU
Mr.Roger

Thank you very much for your help.

I could understand your logic and I feel that it is a work around process.
And I can't bother my user to test every report supplying with different
Parameters untill they get correct output for every printer they deal with.

I am in search of an automatic mechanism which can convert row, col
co-ordinates of customised reports when they are printed on any windows
printer, having different resolutions.

I don't know how all other's are printing these customised reports on
different Windows Printers having different resolutions using FWH :o

Regards to you

- Ramesh Babu P