Hi Everyone.

I need help with using Printer.Canvas to print toa USB printer. Using Delphi 7.0 and a Brother HL2140 USB only printer, produces a blank page. A friend tried it on his USB printer and all of the print was on the left half of the page. On my printer, no problem when using 'Print' to print the screen, or RichEdit on the same USB printer. I use all three methods in the same application. There is no problem when using a parallel port printer. Simple code..

[Printer.begindoc;

Printer.canvas.textout(10,10,'Hello World');

Printer.enddoc;]

produces a blank page on the USB printer.

Thanks for any help.

Walter

Recommended Answers

All 2 Replies

Odd. I print to mine all the time and don't do anything special because it is a USB printer. Likewise, printing to network printers or even Acrobat works using code similar to yours, except of course for the content.

Could it be something else, like page offsets, or line/font color, or font?

Odd. I print to mine all the time and don't do anything special because it is a USB printer. Likewise, printing to network printers or even Acrobat works using code similar to yours, except of course for the content.

Could it be something else, like page offsets, or line/font color, or font?

I'm not sure. It all works nicely on the parallel printer. I tried line color, font and font color (black) but I don't know what page offset is.
As soon as I can get my HP 1200 home, I'll know how it works using the same printer on each of the modes (parallel, USB).
Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.