










	 W       W  III   N    N   PPPP    RRRR    III   N    N  TTTTTTT
	 W       W   I    NN   N   P   P   R   R    I    NN   N     T
	  W     W    I    N N  N   P   P   R   R    I    N N  N     T
	  W  W  W    I    N  N N   PPPP    RRRR     I    N  N N     T
	   WW WW     I    N   NN   P       R  R     I    N   NN     T
	   W   W    III   N    N   P       R   R   III   N    N     T










			     WinPrint Version 1.00
		   Batch printing program for Windows 95/98/NT
				 User's Manual






			     COPYRIGHT (C) 1999 by
				 Piero  Ronchi
			    All Rights are Reserved








			Email: goc4164@iperbole.bologna.it
				 Bologna, ITALY









       ----------------------------------------------------------------------

				P R E F A C E


				   LICENSE

       WinPrint is not a Public Domain  program; WinPrint is copyright (C) by
       Piero Ronchi, Bologna, Italy.  

       WinPrint IS FREE FOR PERSONAL USE ONLY.

       WinPrint may NOT be modified in any respect, for any reason, including
       but  not  limited   to,   de-compiling,   disassembling,   or  reverse
       engineering of  the program. 

       You are free to distribute the PUBLICLY AVAILABLE shareware version of
       WinPrint to others subject to  the  above  restrictions  and  also the
       following:

	  A.  No fee is charged for its use.

	  B.  No remuneration  may be  accepted for WinPrint.  

	  C.  WinPrint must be copied in  unaltered  form containing license
	      information, the FULL documentation and all accompanying files.     
	      The self-extracting archive must not be altered in ANY respect.


				 SITE LICENSE


       If you  plan on using WinPrint in a corporate, government office,  or
       in any business environment  whatsoever,  registration  is  mandatory
       and the two month limited free use is strictly enforced.

       The price for a business use of WinPrint is  $50, with  the  right of
       of unlimited copy and use within your organization.
       To register, just send me an email with  your  name,  your  corporate
       name and address, your email address, and a short description of  the
       use you do of WinPrint in your corporate.

       An Italian version of the program is available.


				   WARRANTY

       WinPrint  and  accompanying  files are  provided  AS  IS  without  any
       warranty, expressed or implied.  This includes without  limitation the
       fitfulness for  a particular purpose or application and any warranties
       of merchantability.

       While I  tried to  be as  thorough as  possible in preparing WinPrint,
       Piero Ronchi shall not be  liable  for any  damages,  whether  direct,
       indirect, special, incidental or consequential arising from a  failure 
       of this program or accompanying files to operate in a  manner  desired
       by the user.  


       ----------------------------------------------------------------------
       WinPrint 1.00                 License and Warranty              2


				 TABLE OF CONTENTS








	 W       W  III   N    N   PPPP    RRRR    III   N    N  TTTTTTT
	 W       W   I    NN   N   P   P   R   R    I    NN   N     T
	  W     W    I    N N  N   P   P   R   R    I    N N  N     T
	  W  W  W    I    N  N N   PPPP    RRRR     I    N  N N     T
	   WW WW     I    N   NN   P       R  R     I    N   NN     T
	   W   W    III   N    N   P       R   R   III   N    N     T








	Preface ...................................................... 2

	Table of contents ............................................ 3

	Introduction ................................................. 4

	System Requirements and installation ......................... 4

	Getting Started .............................................. 5

	WinPrint Parameters reference ................................ 6

	WinPrint Optimize parameter /Z .............................. 10

	WinPrint Graphic  parameter /G .............................. 11

	WinPrint Parameter file ..................................... 13

	Tips and Examples ........................................... 14














       ----------------------------------------------------------------------
       WinPrint 1.00              Table of contents             3


				   INTRODUCTION

       WinPrint is a program to print Ascii files in a  Windows  environment.
       Every program like Notepad, Wordpad, a word processor or a text editor
       can print a text file; who cares about a program like WinPrint?

       If you use a program like Word, you must:   run  the program, load the
       text file, find the right format you like for this  text  and  finally
       print on one of the printers defined in your computer. In short, these
       are interactive programs; WinPrint is a batch program: it is not  good
       for estemporaneous printings in which you can spend a time  to  obtain
       a best look changing fonts, reformatting paragraphs and so on.

       WinPrint is good mainly for two uses:
       - an estemporaneous use in which you want quikly print a  text without
         any aesthetical improvement
       - an automatized printing system in which you need often print the same 
         type of text, previously formatted in the same manner; your  goal is
         print possibily in an unattendend mode, without any  human interven-
	 tion.

       WinPrint is a command that not requires any interaction: it  not  open
       any form or window, it resembles a old DOS command that  is  run  from
       the console prompt, but unlike a true DOS program, WinPrint  can fully
       use all the capabilities of the printer drivers of Windows 95 or NT.
       WinPrint can not run in native DOS: is a truly Win32 program.

       In short, WinPrint is a replace of the old  DOS  command  PRINT in the 
       Windows environment, in which you have the device independence provided
       by the Windows printer drivers,  and  some  parameters  to  change the
       overall look of the text.



		       SYSTEM REQUIREMENTS AND INSTALLATION

       WinPrint requires any PC compatible suitable for  running Windows  95,
       98 or NT. No particularly powered system is required:  WinPrint  is  a
       light program that run well in any system;  only  if  you  print  text
       together to big pictures (see forward) you need some  extra  RAM  over
       the minimum. At last a printer must be defined; WinPrint can  use  any
       defined printer in Windows: local or remote, laser or  ink-jet, impact
       or  postcript; if  you  succesfully  print  on  it  with  any  Windows
       program, this printer is suitable for use with WinPrint. 

       No link with DOS LPT1 or LPT2 is required.
       WinPrint not runs in native DOS, is a Win32 program.

       To install WinPrint:
       - unzip the distribution file in  any  temporary  directory  you want,
       - copy (or move) the program WinPrint.exe in a directory  in PATH, for
         example \WINDOWS or \WINDOWS\COMMAND  in  Windows95/98  or \WINNT in
         Windows  NT, and that is all.



       ----------------------------------------------------------------------
       WinPrint 1.00             Introduction and Installation    4



				GETTING STARTED

       To start to use the program open a MSDOS session (or a console session
       in NT) and run WinPrint as a DOS command, with his parameters.
       If you want to run the examples, go to in  directory EXAMPLES of  the
       distribution file (with command 'cd EXAMPLES') and run the BAT files.

       Like DOS command PRINT, you can print a file writing at the prompt:

            WINPRINT C:\AUTOEXEC.BAT

       and the ASCII file AUTOEXEC.BAT  is  printed  in  the  Windows default
       printer, with all the defaults defined for this printer.

       You will see a printed page with little characters,  printed  near the
       borders; if you want to change these defaults you  must  use  WinPrint
       parameters, i.e. a slash (/) followed by a letter (or other).
       Every parameter is case insensitive.

       For example, if you want to print with a more big font use /H (height)
       parameter:

            WINPRINT C:\AUTOEXEC.BAT /H12

       in which '12' is the height in typographical points; to  increase  top
       and left margin use /T and /M, to change paper format in  Landscape or
       Portait orientation use /L or /P.
       A detailed description follows in 'Commands Reference'.

       You can also print up to four images together the  text with parameter
       /G: for every page printed these images are  superimposed at text,  to 
       permit a more attractive look with logos, signatures or  forms  merged
       in the pages.

       The complete format of the command WinPrint is:

            WINPRINT <file-to-print> <printer-name> <font-name> <parameters>

       An alternative mode to run WinPrint is:

            WINPRINT <file-to-print> @<parameter-file>

       in this case, <parameter-file> is a prevously prepared file  with  all
       the parameters you need for a well known type  of  prints you use: the
       program search the name of the file to print in  this  file,  and,  if
       found, use the corresponding print parameters. This parameter-file  is  
       a mode to 'backup' a well suited parameters for a particular  type  of
       print that you think to repeat.


       If you run WINPRINT only, without any parameter, you have a short help.



       ----------------------------------------------------------------------
       WinPrint 1.00               Getting started               5



			      PARAMETERS  REFERENCE




   <file-to-print> 

       is the file name of the ascii file to print and is the only  mandatory
       parameter in WinPrint.
       In this file the character '12' decimal (i.e. '0C' exadecimal)  is the
       new page character; the characher '09' is the Tab  character,  that is
       translated to 8 blanks; any other character with  value  minor  of  31
       (i.e. ASCII control character) is skipped.
       If you instead of a file name specify '-', standard input  is assumed;
       for example:
           dir *.* | WinPrint - /P /H10



    <printer-name>

       is the name of the Windows printer to use.
       If you don't specify it, the default printer is used.
       If the printer name contains blanks, use quotation marks (");
       for example:
              "MyPrinter at \\server\printname"
       You can use only a initial part of the Windows printer name:
              Myprinter       (in this mode you can omit the quotation marks)
       You cannot use a central or final part of the name.



    <font-name>

       is the name of the printer font to use.
       If you not specify it, the default font for the selected  printed  is
       used. If the font name contains blanks, use quotation marks (");
       for example:
              "Times new Roman"
       You can use only a initial part of the font name;  if  there  is  more
       that one font which has this name, the first is selected.
       You cannot use a central or final part of the name.
       Note that almost all Windows font are Proportional, that is not suited
       to print a tipical text report, that needs constant  spaced  character
       to obtain a correct draw up in columns.
       If you want to specify a font name without specify printer (i.e. using
       the  default  printer)  use  '-'  as  a  printer  name.   (These   are
       positional parameters).
       To see what fonts are permitted for your printer, use
	       WINPRINT /?





       ----------------------------------------------------------------------
       WinPrint 1.00              Parameters reference                  6




    All other parameters are compound by  a  slash  (/),  a  letter,  and, if
    required, a number or other things. All parameters are case  insensitive.
    Usually, parameters are divided by blanks; for example:
               /A /F /L
    but, if parameter are one letter only, you can also write:
               /AFL   or   /A/F/L
    This is not permitted for more complex parameters.



    /L

       Put the paper orientation to Landscape, that is the long edge on top.
       Is well suited if the report width is more than 80  columns;  is  not
       good if the page has more than 45 - 55 lines / page.



    /P

       Put the paper orientation to Portrait, that is the short edge on top.
       Is well suited if the report width is less than  80  columns  or  has
       high number of lines / page.



    /F

       Force Windows to use a NOT proportional font (a Fixed pitch font).
       Is the default if you not specify a font.
       If you have specified a font that is proportional  (and specify  /F),  
       that font is changed by Windows to a similar NOT proportional.



    /V

       Force Windows to use a Proportional font (a Variable pitch font).
       Is the reverse of /F.



    /Hnn

       Is the Height of the font in typographical  points. 'nn' is a number,
       usually between 6 (very small) and 12 (normally big font). With  this  
       parameter you implicitely define the maximum number  of  columns  and
       rows that are contained in the page. You must try some values to find  
       the right choice or can use the parameter /Z (see forward).
       In WinPrint is not possible to select the space between lines.




       ----------------------------------------------------------------------
       WinPrint 1.00              Parameters reference                  7




    /I

       Set the font in Italic.


    /B

       Set the font in Bold.


    /Tnn

       Is the Top border of the text printed: 'nn' is the  number  of  blank
       lines; the effective space depend upon the font height.
       Note that this border is present in every page printed  only  if  the
       page skip is produced by new page character in the text or  by  a  /R
       parameter.
       If the page is skipped by Windows because the page is phisically full, 
       this border is not present in the next page.


    /Mnn

       Is the Left border of the text printed: 'nn' is the number  of blanks
       left before the first character of every line.


    /Cnnn  or  /Knnn

       Is the number of Columns of the text printed: it has no effect  if is
       not used together the parameter /Z; /K is the same that /C unless the  
       lines are truncated if their length exceed the specified columns.


    /Rnnn

       Is the number of lines (Rows) of every page.
       A counter is initialized every new page: if the lines  printed exceed
       this number, a new page is forced; if a new-page character  is  found
       before, this new page is executed and the counter resetted.
       If the /R parameter defines a number of lines  greater  than  what  a
       physical page  can  contain,  a  page  is  skipped  automatically  by
       Windows, /T parameter is ignored, the line counter  is  NOT  resetted
       and a bad new page skip is forced in this new page by /R parameter.
       So, you must tune the /H and /R to avoid this.

       If you don't specify /R, no new page  skip  is  forced;  are executed
       only the new-page characters present  in  the  file;  if  no new-page
       character is in the text file, no one  page  skip  is  executed;  the
       pages are changed by Windows when are physically filled, that is  the
       text is nearest possible to the top and bottom border.



       ----------------------------------------------------------------------
       WinPrint 1.00              Parameters reference                  8




    /Onn

       'nn' specifies the number of copies printed.
       Obviously the default is 1.



    /A

       Translate the ASA control character in column 1.  
       The ASA control characters are an old mode to control the behaviour 
       of a line printer used in mainframe; this parameter is useful  only  
       if you must print text transferred by a mainframe or by an AS/400.
       The column 1 can be:
       '1'        a new page
       '0'        an additional blank line skip
       '-'        an additional two blank lines skip
       '+'        print the line over the preceding  line; i.e.  don't  skip
                  the line; this  control  character  in  not  supported  by
                  WinPrint, that ignore the line beginning with '+'.
       All other characters in column 1 are ignored (normally are blank).



    /U  or  /UM

       With /U WinPrint process a Unix ASCII file, that is a text file  with
       lines terminated only by a hexadecimal '0A' (and not by a  '0D0A'  as
       in PC files).
       With /UM WinPrint process a MacIntosh ASCII file, that is a text file
       with lines terminated by '0D' only.



    /!nn

       By default, Tab characters ('09') are interpreted by  WinPrint  as  8
       blanks. If you want to change this default, specify  this  parameter,
       with 'nn' is the number of blanks equivalent to Tab.
       If you specify 0, Tab characters are left unchanged.




    /S

       With /S (Silent) WinPrint don't visualize the the short final message.







       ----------------------------------------------------------------------
       WinPrint 1.00              Parameters reference                  9





			   WINPRINT  OPTIMIZE  PARAMETER






    /Z  or  /ZS

       Optimize the page, choosing a font size and paper orientation for you.
       With /ZS, a pre-scan of the input file is done; in this way  WinPrint
       can determine the maximum line and page  width  to  set  the  correct
       parameters. With a simple /Z, you must add one or more parameters  to
       bind the choices of the  program.  The  most  important  choice  that
       WinPrint do is the font Height selection: if you  use  /H  parameter,
       you cannot use /Z or /ZS. To force something can use /P or /L, /C, /R
       /T or /M; the parameters among that you don't force, are  selected by
       program. A large /C suggest a /L or a small font  size,  a  large  /R
       force a use of /P or a small font size. The margins (/T and  /M)  are
       selected by WinPrint after the choice of font  size,  to  centre  the
       printed page. By way, the goal of optimization is contain every  page
       correctly, without any line truncation or bad page skip.
       The optimization is not infallible, expecially if don't use  pre-scan
       or force something that is against the peculiarities of the print.
       You can use /ZS to have some tips about suggested parameters (actually
       a message with selected parameters is visualized);  than  you reprint  
       the file using those parameters (without /Z) modified for your needs.





       Examples:

            /C132  /Z              I know that my print is 132 columns
            /ZS  /P                I want a mandatory Portait format
            /ZS /T3 /M5            Mandatory borders
            /C80 /r50 /Z           I know also the page length















       ----------------------------------------------------------------------
       WinPrint 1.00               Optimize  Parameter                   10



			   WINPRINT  GRAPHIC  PARAMETER



       With the /G parameter you can merge up to four graphic images in  the
       printed page; you can decide the position  and  the  scale  of  every
       image in the page and so, for EVERY page  printed  those  images  are
       superimposed at text.
       This parameter is suited for insert a logo, a background, a  form  or
       everything you want, together a text: instead  of  use  a  preprinted
       paper, you print this background with text at the same time.



       The sintax of this parameter is:

             /Gn,x,y,s[:sy],image-file.bmp

       where:


       n  :  must be a number from  1  to  4;  use  different  numbers   for
             different images


       x  :  is the orizontal position of the top-left corner of image;
             the unit is pixel and depend by printer resolution, that is, if
             your laser printer has a resolution of 300 dpi and you  specify
             600, the top left corner is 2 inch more right from the  virtual
             corner used by Windows to delimit the space  printable  on  the
             page.


       y  :  is the vertical position of the top-left corner of image;
             the unit is always pixel, i.e. the printer resolution


       s  :  is the scale of image in per cent; if you  use  100,  the image
             width on the printed paper is equal to width-in-pixel   divided
             by printer-resolution; for example,  an  image  of  1000  pixel
             is large 3 and 1/3 inchs on a 300 dpi laser printer.
             If you  specify  a  scale  different  from  100,  the image  is
             stretched by this ratio, leaving the  proportion  by  x  and  y
             unchanged; a scale of 20 produce an image  5  times  smaller, a
             scale of 300 signify 3 times bigger.


       sy :  is an optional parameter; if you specify it (using a colon  ':'
             to separate from global scale), you  stretch image in height in
             different mode than in width. The scale is in per cent  of  the
             image along the Y-axis: if you specify it,is a number different
             from previous, to deform the image as you like.



       ----------------------------------------------------------------------
       WinPrint 1.00              Graphic  Parameter /G                 11






       image-file-name   : must be in a BMP Window format;  you  can  use  a
	     name with a partial or full directory path.
	     If the name or path contains blank, you must enclose the  whole
	     parameter with quotation mark (").

	     The image is placed  OVER  the  text, if  is  present  in  this
	     position; in this case the characters may be not visible.
	     A conventional pixel placed on the left border of the image  is
	     used as transparent color, that is, if this color  is white, in
	     all the places where the image has white pixels, the underneath
	     text is visible.  Normally,  this  type  of  image  (forms   or
	     shadowing to use as  background)  are  only  lines,  boxes,  or
	     pattern  in  black and white images: ensure that the border  is 
	     white.

	     You can use a scanner  or  a  paint  program  to  produce  such
	     images; if your scanner has a resolution equal to  dpi  of your  
	     printer, your work is simplified  using  a  scale  of  100;  to  
	     position correctly the images on text you must  do  some  tries 
	     printing sample text: WinPrint is not a 'visual' tool.

	     Note: if a page is skipped by  Windows  (because  the  page  is
	     filled and  is  not  present  an  adequate  /R  or  a  new-page
	     character) the images are NOT printed in this page.





	Examples:


            /G1,100,1200,100,C:\IMAGES\MyIMG.bmp
            "/G3,600,200,150:200,My Picture.bmp"


















       ----------------------------------------------------------------------
       WinPrint 1.00              Graphic  Parameter /G                 12

			    WINPRINT  PARAMETER  FILE



       You may spend some time to find the  right  parameters  suitable  for
       your needs, expecially if you use images; if you want  to  save  your
       work may write a batch that run WinPrint with  those  parameters,  or
       better, use a  parameter file  to  collect  parameters  of  all  your
       recurring prints.

       Parameter file is an ASCII file that you create  with  whatever  text
       editor; its basic structure is:
          one line  - one print             where a line is formed by:
          printfile - list of parameters

       When you recall WinPrint you write:

          WINPRINT print-file  @parameter-file

       The program, finding a '@', understand to search parameters  in  this
       file, instead of command line: opens this file  and  search  a  match
       with the specified print file and, if found, use parameters specified
       on its right.
       You can specify only '@': by default the program search  a  parameter
       file named WINPRINT.PAR.

       Print names cannot contain path; if you specify path in command line,
       only the file name without path is searched on parameter file.
       Names of print-files in parameter files can be generic names, that is
       you can use the wild character '*'; the only bond is that you can use
       only ONE '*', for example:
            Myprint.*             (correct)
            FromA*.prn            (correct)
            *m1.txt               (correct)
            From*B.t*             (incorrect)
       You can specify '*' as a last choice: this is as a default for  names
       not found in preceding lines.

       If the file name  contains blanks, use quotation marks (") as  usual.
       If a parameter contains blank (for example the image  name  of   /G),
       this also must be enclosed in quotation mark.
       Is not correct enclose more that one parameter in quotation mark  (in
       command line also).
       A semicolon (;) is a start of a comment line.

       A short example:

       ; This is an example of Parameters file for WinPrint
       ; --------------+-----------------------------------------------
       ; File-to-print | List of parameters
       ; --------------+-----------------------------------------------
       WideText.*     /l  /H6 /T2 /M4
       Example2.BAT /p /h11 /g1,150,200,100,LOGO.BMP
       Example*.bat  /p /zs
        *            /P /C80 /ZS


       ----------------------------------------------------------------------
       WinPrint 1.00               Parameter  File                  13



			      TIPS  AND  EXAMPLES



				      TIPS


       1) If you want to use WinPrint in the common  visual  environment, do 
          this:
          - Create a .BAT file (for example WinPrint.Bat) with a line  like:
               WINPRINT  %1  <parameters-you-want>
          - Create a shortcut (a link) of the BAT file and put it on desktop
          - Modify the properties of this link (that is a PIF file)  if  you
            want: at least set 'Close at end' in 'Program' tab (you can also
            change the icon and minimize window at execution)
          - Now, to print you can drag the icon of a text file over the icon
            of the link of your BAT.


       2) WinPrint can be run as a step of a complex command procedure:
          a command procedure can be every program  written  in  a  language
          that can run external programs,  as  PERL,  REXX,  WINBATCH,  KICX
          and so on. Can be launched also by a traditional  program  written
          for example in C, but its use is more right  for  a  non  compiled
          language.


       3) WinPrint can be a front-end of a multi-plataform spooling  system:
          - some eterogeneous machines (as Unix, AS/400 and mainframes) send
            their print files to their own directory on a NT machine,  using
            for example TCP/IP FTP transfer.
          - An ever runnig NT program check if a file is  arrived  on  those
            directorys, then use WinPrint (with a parameter file)  to  print
            them on NT controlled printers.


       4) If you want to try a print program  like  WinPrint  without  waste
          paper, you can do in this way:
          - Install in Windows any postscript printer driver,  even  if  you
            don'y have a postscipt printer
          - Install Ghostview,  a  free  software to  see  postscript  files
            without print; Ghostview can be found in  Internet:  choose  the
            correct Windows plataform
          - Stop the printing of this printer, to avoid errors
          - Print a file on this printer
          - View this print with Gostview, searching it:
            in Windows 95/98, in \WINDOWS\SPOOL\PRINTERS\
               with a extension .SPL
            in Windows NT4, in \WINNT\SYSTEM32\SPOOL\PRINTERS\
               with a extension .SPL





       ----------------------------------------------------------------------
       WinPrint 1.00               Tips and examples              14





				    EXAMPLES


       In directory EXAMPLES there are some BAT to test WinPrint.

       In EXAMPLE1.BAT there  are  many  commonly  used  examples  ready  to
       run: remove 'REM' before the command you want to test.

       EXAMPLE2.BAT is a test of graphical capabilities of WinPrint.

       EXAMPLE3.BAT is a transfer file from a mainframe using 3270 emulation
       and a print with /A to test the control characters in column 1.




			     ----------------------





       If you have a problem with WinPrint please feel free to email me and
       describe the situation. 

       Excuse me for my bad english.



       Thanks for your support!








			      PIERO   RONCHI
		     Email: goc4164@iperbole.bologna.it
			      Bologna, ITALY










       ----------------------------------------------------------------------
       WinPrint 1.00               Tips and examples              15

