Thankyou for ur article, i'm using that code in my project for a customized printing. I have a problem with in stopping the print when the text to be printing is over. I'm not using the header and footer part of ur code. So how can i stop printing when the text is over.
started copying and pasting your example usage, but it won't work.
I get a compile error about the "MyPrintUnit unit(this);" it says its expecting no parameters. I guess its looking for GPrintUnit ctor????? if I remove the this, then unit.Print(); complains about not being a class or union type.
I've only used your sample code as is, so am i doing something wrong?
I have implemented this and it is working fine ... but a new printer was added and now all I get from the printer is printed in Arial 12pt even though I specified Times New Roman 10pt. I have tried using Arial 10pt but the results from this printer remain the same.
I can use different printers and have no problems but from this one printer it seems only to use the default font. (A guess, but one that fits the facts)
What is problem you are having? You will have to modify the code a little to fit your paticular environment (compiler and so on), but other than that, the examples seem to work exactly as stated. If you could give me a little more information, perhaps I could be of some assistance.
Using your classes it works great printing through the network or by USB connection. However, if connected by parallel port the application will hang right after OK is pressed on the windows printer dialog.
The printer is a HP Inkjet and the OS is Windows 2003.
Hi I used your sample and I change the output to a lots of characters and it is not shifted at all. I don't know why. I complimed your example and printed then it was no overflow. Then I added more caracters to see if it will be shifted and it is not. I don't know why?. Thanks.
Wat if I have got a single word, without spaces, which is too long to be accomodated in the width of rect provided to DrawText of DC? It gets truncated. How to wrap that single word? Does DrawText provide any flag to do this, as it provides for Word Wrapping?
Can your GPrintUnit::PrintCol() can be used for this purpose?