|
|||||||||||||||||
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?
|
| 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 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
|
|
|
© 2000-2005 Dynalivery Corporation |