[comp.windows.ms.programmer] HOW CAN I SEND A TEXTSTREAM TO PRINTER W/O USING DC COMMANDS !!!

rdthomps@vela.acs.oakland.edu (Robert D. Thompson) (05/14/91)

	I want to use the PRINT MANAGER and be able to dump a text
	file with CR's and LF's to a printer - just to print text.

	BUT, I don't want to use TextOut(hPR,x,y...) and I don't want
	to simply open the port and dump the text.

	For my project it is important that I use the print manager and
	still avoid the device context commands that do not seem
	necessary since I already have a properly formatted ASCII text
	file.

	Any help would be greatly appreciated.

	Thanks...Regards |(8>
---
Robert
rdthomps@vela.acs.oakland.edu

kensy@microsoft.UUCP (Ken SYKES) (05/20/91)

In article <6405@vela.acs.oakland.edu> rdthomps@vela.acs.oakland.edu (Robert D. Thompson) writes:
>
>	I want to use the PRINT MANAGER and be able to dump a text
>	file with CR's and LF's to a printer - just to print text.
>
>	BUT, I don't want to use TextOut(hPR,x,y...) and I don't want
>	to simply open the port and dump the text.

Check out the PASSTHROUGH escape.  Once you create the printer DC and
send the STARTDOC you can use PASSTHROUGH to send the remainder of the
data.

Ken Sykes
Disclaimer: The above opinions are solely my own.

alan@comp.lancs.ac.uk (Alan Phillips) (05/20/91)

In article <72434@microsoft.UUCP> kensy@microsoft.UUCP (Ken SYKES) writes:
>In article <6405@vela.acs.oakland.edu> rdthomps@vela.acs.oakland.edu (Robert D. Thompson) writes:
>>
>>	I want to use the PRINT MANAGER and be able to dump a text
>>	file with CR's and LF's to a printer - just to print text.

>Check out the PASSTHROUGH escape.  Once you create the printer DC and
>send the STARTDOC you can use PASSTHROUGH to send the remainder of the
>data.

SDK reference says "in general, apps must avoid resetting the printer or causing
the page to be printed" when using PASSTHROUGH. I've certainly not managed
to send any coherent text to a DJ500 with it - if you maneg it, let me know!