Remote Printing: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
Line 68: Line 68:
Now Parametrized Printer Substitution statements are now supported along with several other NWP enhancements, including shading, boxing and pictures.
Now Parametrized Printer Substitution statements are now supported along with several other NWP enhancements, including shading, boxing and pictures.


===PrinterList()===
===Printer_List()===
Returns only the client's printer list.
Printer_List() is a system function that loads an array with local printer definitions.
 
An example of its use:
10 DIM A$(1)*1000
20 Printer_List(A$)
30 PRINT MAT A$
 
This will print a list of printer names with each followed by their respective @port-name.
 
The array A$ will be redimensioned by the system to the correct number of elements, but you must first dimension the length of the elements as shown in the example. Microsoft OneNote tends to include a very lengthy printer definition.  


<noinclude>
<noinclude>

Revision as of 15:30, 13 March 2020

Remote Printing is used in many Client Server versions of Business Rules!

ALL PRN:/ and WIN:/ normally prints on the CLIENT.

SPOOLCMD governs PRN:/ output, and if @ is not indicated SPOOLCMD runs and prints on the server. There is nothing, however, that prevents SPOOLCMD from forwarding spooled output to clients.

With OPTION 30- (suppress remote printing)

PRN:/ and WIN:/     print on the server
PRN:@/ and WIN:@/   print on the client

Option 31 - suppresses native windows formatting but doesn't suppress printing via Windows. OPTION 31 has been deprecated in favor of DIRECT:/

==========================================================================

 Printer                        Output Method
 Name	------------------------------------------------------------------
	Normal	Unix 	Unix 	   Unix		Windows		Unix
		Opt 30	Spoolcmd   both		Spoolcmd	Spoolcmd @
	------------------------------------------------------------------

 PRN:/	client	server	server	   server	client		client
	direct	lp	spoolcmd   spoolcmd	spoolcmd	spoolcmd


                    PRN:@/, WIN:/, WIN:@/ or PREVIEW:/ 

 Opt 31	client	client	client	   client	client		client
        direct mode ---------------------------------------------------->

 WIN:/	client	server	client	   server	client		client
        native windows printing ----------------------------------------->

 PREVIEW:/
  -or-
 WIN:@/	client	client	client	   client	client		client
        native windows printing ----------------------------------------->

==========================================================================


Notes

OPTION 30 is not allowed on Windows servers.

SPOOLCMD always runs on the server unless it specifies a leading @.
e.g. SPOOLCMD @ print.bat [SPOOLFILE] runs print.bat on the client.

Ctrl-P only works at a LINPUT statement or at a command prompt.

  • Client side reports* are always created in a spool file on the client. This includes both WIN:/ and 'SPOOLCMD @' reports.

Two SPOOLPATH statements are allowed, one for the server and one for the client. The client SPOOLPATH should have '@' right after the SPOOLPATH keyword (e.g. SPOOLPATH @ ...) to designate where on the client spool files should be placed.

Remote printing now supports 'COPIES='.

Remote printing overriding server side printing via PRN:@/ didn't contain carriage returns (had line feeds only)

The config statement
SPOOLCMD  @  print.bat [SPOOLFILE]

Causes print.bat to be issued ON THE CLIENT in the client current directory.


Direct Printing

DIRECT:/ can be used in lieu of PRN:/ to ignore SPOOLCMD. DIRECT:/ is synonymous with PRN:/ except that SPOOLCMD doesn't apply to DIRECT. ( DIRECT:/ is equivalent to specifying WIN:/ with OPTION 31 on. )

Now Parametrized Printer Substitution statements are now supported along with several other NWP enhancements, including shading, boxing and pictures.

Printer_List()

Printer_List() is a system function that loads an array with local printer definitions.

An example of its use:

10 DIM A$(1)*1000
20 Printer_List(A$)
30 PRINT MAT A$

This will print a list of printer names with each followed by their respective @port-name.

The array A$ will be redimensioned by the system to the correct number of elements, but you must first dimension the length of the elements as shown in the example. Microsoft OneNote tends to include a very lengthy printer definition.