Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing and Delphi 6 ENT

Status
Not open for further replies.

fjank

Programmer
Jun 2, 2003
1
0
0
FI
Hi, I´ve made an application on Delphi 6 for a farmer. In the app. he can store data about bills and print them. On the bills he want´s a logo in greyscale and that worked fine on my Canon BJC240 printer.. but on his HP laserprinter the logo is just black and white. From other applications, like MS-Paint the logo prints out correctly. In manner I´ve made the printfunction this way...

On uses I´ve put Printers an Graphics..

begin
printer.begindoc;
printer.canvas.stretchdraw(rect(1,1,printer.pagewidth,scale),form1.image1.picture.bitmap.canvas;
printer.enddoc;
end;

I also have trouble with the command printer.pagewidth on his printer. It outputs a cordinate out of page, cordinates lower than 40 horizontally aren´t accepted either.. I can´t understand how it can work with my printer but not with his.. I figured out that when changing paper from A4 to custom (and input the same sizes manually) on the printers setup, corrected the problem for the moment... What can I do? What is wrong?

Best regards Frank
 
What about using a Printengine like Quickreport?
That should solve this problems.
 

I have had a nightmare of a situation once regarding printing of logo\images and some fonts through the Printer class.

after the application had been "tested" on about 3 different types of printers , it was sent out to all the clients. and almost immediately the support phone was ringing like crazy..and all had problems about the logo printing as either a black rectangle or some garbage characters.Obviously this situtaion did not reflect well on our company.and we had to send the programs again.

after some searching we realised that the problems occurred on only win Xp and only on some brands of printers (some funny combination of OS and printer brands)

and then the easiest solution out was to use a reporting tool.
We used a third party reporting component suite but you can use quick report as Pascal has suggested.

Trust me , its the easiest way out and guaranteed to work without hassles.







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top