TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Eric Carmody
from: Peter Fitzsimmons
date: 1995-10-04 01:48:20
subject: PM PRINT SAMPLE 1/2

PF>  /*                                                
PF>                         
PF>   * This sample program contains the least amount 
PF> of code I could write    
PF>   * to do PM text printing,  to the system default 
PF> printer.                

 EC> Hello Peter,

 EC> A while ago, you responded to my plea for help in 
 EC> regards to doing some basic 
 EC> printing to the the default printer. You replied with 
 EC> a tip to use ... fopen(); 
 EC> fprintf();fclose... approach, which I use and works fine for my purpose.

 EC> What is the ability of the sample program you posted, 
 EC> if more than just text 
 EC> printing.  Is that route necessary to support different printing fonts?

The fopen/fprintf is only good for plain text, in the default font, for
printers than can print plain text (A plotter or PostScript printer, for
example,  will print nothing when you send them plain text).

You can also use the fopen/fprintf to send printer-specific info to the
printer (a postscript file,  for example).  The fopen/fprintf method
completely bypasses the PM printer driver (but not the spooler),  so it
requires that you know ahead of time what type of printer is attached.

The sample code I recently posted has no previous knowledge of the printer,
 or the font to be used.  It will print to a plotter,  in PCL,postscript, 
or whatever else the installed PM printer driver can come up with.


--- Maximus/2 3.00
* Origin: Sol 3 * Toronto * V.32 * (905)858-8488 (1:259/414)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 259/414 400 99 229/2 3615/50 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.