It's wierd. When I set the Printer.Height to something - it always has a value of 5440 .. It's not getting modified, which may be due to the printer driver .. What's happening is that I have a Custom mini printer that prints on a page that's about 2 inches wide. When I print from a VB program - the printing just keeps on going on & on .. and it never actually cuts the page. That's what I want to do - cut the page at like 3 or 4 or 5 inches - set it to anything desirable . Would the Printer.Height (even I get it to set) actually "cut" the page at that height, or would it simply end the printing at that point.
Also - If I'm printing a Rich Text Box using this:
Do
' Print the page by sending EM_FORMATRANGE message
NextCharPosition = SendMessage(RTF.hWnd, EM_FORMATRANGE, True, fr)
If NextCharPosition >= TextLength Then Exit Do 'If done then exit
fr.chrg.cpMin = NextCharPosition ' Starting position for next page
Printer.NewPage ' Move on to next page
Printer.Print Space(7) ' Re-initialize hDC
fr.hdc = Printer.hdc
fr.hdcTarget = Printer.hdc
Loop
Regarding making the printer "cut" the page, the printer's documentation may have a section where control codes are explained in which you might find that a control code or escape sequence cuts the page. If so, you might try sending that value using the Printer.Print command just before the Printer.NewPage.
Regarding wrapping at a certain width, you can use the "rc" element of the FORMATRANGE structure to specify a rectangular region in twips for the output area.
It is the TG58 Custom Printer. It is for printing coupons. I can't find a cutoff code in the printer's documentation . I've looked thoroughly. I've also searched online.
Punchinello, yours might be the solution I need though.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.