Need printing help - How to print on 1/4 the part of A4 paper on dot-matrix printer
-
I checked many printing articles on CodeProject and CodeGuru Need some help/guidance. From my app (Environment - VC++ 6.0, MFC, Win98/2000/XP), I need to print single as well as batch of invoices and checks on dot-matrix printer - print checks (multiple checks on single A4 page) - print multiple invoices on one A4 or other custome size paper (e.g. 4 small-invoices on one A4 size papers) Question is: For dot-matrix printer, how to achieve printing such that if one invoice is printed in top 1/4 part of A4 paper, whole paper should not come out ? (User may cut printed portion of paper and aftter sometime may continue to print next invoice on same paper). (Similarly need to print one or more check) Any sample or code snippet for such printing ? I appreciate any help/guidance. Anand_Arv
-
I checked many printing articles on CodeProject and CodeGuru Need some help/guidance. From my app (Environment - VC++ 6.0, MFC, Win98/2000/XP), I need to print single as well as batch of invoices and checks on dot-matrix printer - print checks (multiple checks on single A4 page) - print multiple invoices on one A4 or other custome size paper (e.g. 4 small-invoices on one A4 size papers) Question is: For dot-matrix printer, how to achieve printing such that if one invoice is printed in top 1/4 part of A4 paper, whole paper should not come out ? (User may cut printed portion of paper and aftter sometime may continue to print next invoice on same paper). (Similarly need to print one or more check) Any sample or code snippet for such printing ? I appreciate any help/guidance. Anand_Arv
To use GDI to print then I imagine you'd need to change the paper size to a user-defined value using the printer driver's configuration interface. Mark
Great job, team. Head back to base for debriefing and cocktails.
-
To use GDI to print then I imagine you'd need to change the paper size to a user-defined value using the printer driver's configuration interface. Mark
Great job, team. Head back to base for debriefing and cocktails.
Problem is...I need to print part of paper and then paper should not be ejected. How to achieve that ? (in an App developed with VC++/MFC and running on WinXP/Win98/Win2000) Thanks a lot for helping. Anand_Arv
-
Problem is...I need to print part of paper and then paper should not be ejected. How to achieve that ? (in an App developed with VC++/MFC and running on WinXP/Win98/Win2000) Thanks a lot for helping. Anand_Arv
I understand :) The problem is that to GDI, it's the paper size setting that causes the advance to the next page when you call EndPage (or EndDoc) from your code. If you set the paper size to 8.5 x 2.75 then it sould only advance 2.75. Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it."
-
Problem is...I need to print part of paper and then paper should not be ejected. How to achieve that ? (in an App developed with VC++/MFC and running on WinXP/Win98/Win2000) Thanks a lot for helping. Anand_Arv
An alternative method is to send escape codes directly to the printer instead of using GDI... HOWTO: Send Raw Data to a Printer by Using the Win32 API[^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it."
-
I understand :) The problem is that to GDI, it's the paper size setting that causes the advance to the next page when you call EndPage (or EndDoc) from your code. If you set the paper size to 8.5 x 2.75 then it sould only advance 2.75. Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it."
Mark Salsbery wrote:
I understand The problem is that to GDI, it's the paper size setting that causes the advance to the next page when you call EndPage (or EndDoc) from your code. If you set the paper size to 8.5 x 2.75 then it sould only advance 2.75.
Thanks a lot for nice info. Just curious to know... Does this apply only to Dot Matrix Printer ? i.e. For Laser/Inkjet printer, if I set paper size to 8.5 x 2.75 and use A4 paper, will it eject A4 paper fully or it will allow to continu printing on same paper ? Anand
-
Mark Salsbery wrote:
I understand The problem is that to GDI, it's the paper size setting that causes the advance to the next page when you call EndPage (or EndDoc) from your code. If you set the paper size to 8.5 x 2.75 then it sould only advance 2.75.
Thanks a lot for nice info. Just curious to know... Does this apply only to Dot Matrix Printer ? i.e. For Laser/Inkjet printer, if I set paper size to 8.5 x 2.75 and use A4 paper, will it eject A4 paper fully or it will allow to continu printing on same paper ? Anand
From my experience, a laser printer will eject the page at the end. I'm no printing expert so I'm not sre how one can control it more precisely. I know you could accumulate enough printing jobs to fill a sheet then do a page at a time. Laser printers I've worked with didn't have a way to linefeed the paper and tear it off. Maybe there's laser printers with continuous feed paper (rolls)? I know dot matrix printers have escape codes to do it. Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it."