List Info

Thread: Problem with a MATRIX printer...




Problem with a MATRIX printer...
user name
2006-07-20 17:08:24

Christian Labrie wrote:
> I have a small application I've programmed to print bills on a matrix
> printer.
> It just print a few lines on a paper.
>
> My code is quite standard.
>
> BeginDoc
> Print the lines
>; EndDoc...
>
> But my problem is that the printer keeps printing %5% on the top left corner
> of the paper before printing the rest.
>;
> Anybody knows where that kind stuff migh come from and how to prevent it.
>
> Thanks to any replies.

Not printed anything with Delphi, but Win32 APIs require StartDoc,
StartPage, print content, EndPage, EndDoc. The documentation for all
the printer stuff on Windows is pretty obtuse. Delphi appears to cover
most of that up - which is good, but in doing so there is the increased
possibility of messing up something.

That said, are you calling TPrintDialog? Failure to do so means that
Printer won't get a proper printer device context and that might be the
source of the problem.

--
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

Safe C++ Design Principles (First Edition)
Learn how to write memory leak-free, secure,
portable, and user-friendly software.

Learn more and view a sample chapter:
http://www.CubicleSoft.com/SafeCPPDesign/

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )