News, Events, Conferences, What's New About, Partners, Jobs Phone, E-mail, Address, Location Free Evaluation


home
products
product videos
customer support


Resources
Frequently Asked Questions

Is it possible to send a report directly to multiple printers both local and remote?

Download PDF version of this faq: RemotePrinting.pdf

The predominate usage of Parallel Crystal is for generating PDF electronic documents and distributing them over the web. As some customers also want to print directly on paper, we are providing this extra information about Microsoft Windows printer and network configurations and how they relate to Parallel Crystal.

Is it possible to send a report directly to multiple printers both local and remote?

Yes, it is possible to direct Parallel Crystal output to printers recognized by Windows NT on the report server for rendering on paper. They may be local to the report server or they may be remote. In either case the printers must be configured and visible on the Parallel Crystal report server.

The following information, on setting up both local and remote printers on a report server, is valid for both Microsoft Windows NT 4 and Microsoft Windows 2000.

Windows 2000 users should review this document for details on using IP Printing:
http://kb.indiana.edu/data/ahvm.html?cust=2416

Users of Windows NT 4 must add the Microsoft TCP/IP Printing Service and configure a port to use it. For detailed instructions on how to do that please see this document:
http://kb.indiana.edu/data/aiso.html?cust=288

For the limited focus of this FAQ we are making our recommendations based on the following distinctions between local and remote printers:

Local Printer

A local printer receives data directly from the client computer and is set up through the “Add Printer Wizard”, as shown below, using Microsoft TCP/IP Printing Service and an LPR port.

For printers that are NOT physically connected to the report server, there may be other ways of configuring a local printer. However, the method illustrated in this FAQ is the required procedure, especially if you desire control over the paper trays.

Local Printer Icon


Remote Printer

A remote printer receives data through a print server and is set up using the “Add Printer Wizard”, as shown below, using the built in print sharing function of Windows NT.

Remote Printer Icon

Sample Code:
This sample Java program generates a report from the Box.rpt report file and sends it to four logical printer queues that print to two physical printers on the network. The printers being used for this sample are HP LaserJet 4000 and a HP LaserJet 4 Plus.

Download .java file from here.

The first printer Queue
- is a remote printer that utilizes the NT share name to send reports to it for printing on paper.
- it uses the default letter size paper from tray 2 as its paper source.

The second printer Queue
- is a local printer that utilizes a standard printer name to send reports to it for printing on paper.
- it uses the default letter size paper from tray 2 as its paper source.

The third printer Queue
- is a remote printer that utilizes the NT share name to send reports to it for printing on paper.
- is configured through a print server to print to legal size paper from tray 1 as its paper source.

The second printer Queue
- is a local printer that utilizes a standard printer name to send reports to it for printing on paper.
- is configured through the local machine to print to legal size paper from tray 1 as its paper source.

To use this code you must change the following:
- report server name
- path to box.rpt
- proper NT share names for your remote printers
  (for example \\print_server_name\full_printer_name )
- proper standard printer names for your local printers

In addition to these code changes, to print to an alternate paper source, you must have your remote printers configured properly through your print server and your local printers configured from your local machine (see figures below).

Important Note for PCRE v2.4 users: It is necessary for a least one remote printer and one local printer to be configured on the report server prior to invoking the GetPrinterNames method call in the code sample below. This is not required for PCRE v2.5+ users.

import com.mobileapps.pcre.*;
class SimpleAppChangePrinter
{
public static void main(String [] args)
{
      System.getProperties().list(System.out);
      PCREApplicationClient client = null;
      try
      {
            client = new PCREApplicationClient("REPORT_SERVER_NAME");
            client.Connect();
            PCREEngine engine = client.OpenEngine();
            PCREJob job = engine.OpenJob("PATH_TO\\Box.rpt");

//This line of code will return all the printers
//available on the report server machine.
            String[] printerNames = client.
GetPrinterNames();

//This line of code will print to the screen
//the names of the available printers
            System.out.println("The available printers are:");
            for(int i=0; i<printerNames.length; i++)
            System.out.println(" "+printerNames[i]);

//This code will print to the first specified printer, which
//is a remote printer that is configured to print to the
//default letter size with the tray auto selected
            System.out.println("Now printing to the first printer:");
            job.SelectPrinterByName("\\\\WOPOR\\HP LaserJet 4 Plus - Dev", null);
            job.OutputToPrinter(1);
            job.Start();

//This code will print to the second specified printer,
//which is a local printer that is configured to print
//to the default letter size with the tray auto selected
            System.out.println("Now printing to the second printer:");
            job.SelectPrinterByName("Local HP LaserJet 4000 Series PS", null);
            job.OutputToPrinter(1);
            job.Start();

//This code will print to the third specified printer,
//which is a remote printer that is configured to print
//to legal sized paper through tray 1(manual feed)
            System.out.println("Now printing to the third printer:");
            job.SelectPrinterByName("\\\\WOPOR\\HP LaserJet 4000 LMF", null);
            job.OutputToPrinter(1);
            job.Start();

//This code will print to the fourth specified printer,
//which is a local printerthat is configured to print
//to legal sized paper through tray 1 (manual //feed)
            System.out.println("Now printing to the fourth printer:");
            job.SelectPrinterByName("Local 2 HP LaserJet 4000 Series PS", null);
            job.OutputToPrinter(1);
            job.Start();
            job.Close();
            System.out.println("Report Finished");
            engine.Close();
      }
      catch ( PCREError ex )
      {
            System.out.println("Exception: "+ex);
      }
//This exception for graceful shutdown of the gateway is only for
//PCREv2.6+ users.

            catch (GatewayShuttingDown error)
      {
            System.out.println("GatewayShuttingDown: " + error);
      }
      finally
      {
            if (client !=null) client.Quit();
      }
      }
}

From the Third Printer Queue Shown Above

From the Fourth Printer Queue Shown Above

Secondary Rendering On Paper Following PDF Generation:

To the extent that customers want to generate PDF and then programmatically control its secondary rendering on paper, that application would be outside the scope of Parallel Crystal and they should refer to the Adobe Acrobat Software Development Kit (SDK).

http://partners.adobe.com/asn/developer/acrosdk/

However it is also possible to call the methods OutputToPrinter and OutputToPDF within the same report job.

Third Party References:

Below are selected third party products that facilitate the sharing of printers between windows and non-windows (Unix, AS/400 etc…) systems. These products offer some advanced printing features. The distinction between local and remote printers is still the same when using these products. Configure these products, and the printers they control, following the advice in this document for remote printers.

http://lpr.brooksnet.com
offers an expanded feature set (like broadcast and fail over printing) over the standard Windows printing features

http://www.cosprint.com
offers an advanced output management and print spooling package for controlling document delivery.

http://www.analyser.co.uk/niprint/
offers the ability for NT to use UNIX printers and vice versa

http://www.distinct.com/products/vit32/docs/control.lpr.asp
provides access to printers via an ActiveX component

http://www.xlink.com/nfs_products/Omni-Print_LPD_LPR/Omni-Print_LPD_LPR.htm
offers the ability for NT to use UNIX printers and vice versa

http://www.riverland.net.au/brooksnet/rpmremoteprintmanager.html
allows users to customize and control processing of print jobs received over a TCP/IP network from host systems including mainframes, AS/400s, UNIX and Linux, and other Windows systems

http://www.utexas.edu/academic/otl/software/lpr/
is an add-in Print Monitor that adds LPR capability to the Windows Spooler

BACK TO TOP
BACK TO START

© 2000-2005 Dynalivery Corporation
formerly Mobile Application Servers, Inc.