NOTE: This document is for the .Net based Print Agent. if you're looking for the Java based version, you'll find it here.
The IFS Print Agent is a stand-alone server component responsible for
printing formatted business documents (operational reports) created using Report
Designer layouts. The PDF documents generated by the IFS Report Formatter during
the formatting step are then picked up by the Print Agent and sent for printing. This
document guides you through the installation process and the configuration for the Print Agent functionality.
You can read a bit more about the print agent on the
overview page.
To begin installation you must first download the zip file which contains the required scripts and configuration files for installing a Print Agent. The zip file can be download through the Add-ons page. A link to the Add-ons page can be found in the IFS Applications Landing Page.
Click on the link to download the IFS Print Agent Dot Net installation version from the Add-ons page. You might be prompt to provide login information. If so, provide your IFS Application login details. e.g. ALAIN and ALAIN user password.
Only 64-bit architecture is supported. Unpack the zip it into a folder on the same or a different machine to install the Print Agent.
Parameter | Description |
---|---|
ID | This is the Print Agent ID. By default, it is set to the host name. This can only be amended when the Windows Service in uninstalled. |
USER/PASSWORD | Credentials used by the Print agent when connecting to the extended server. It is better to locate the zip file in the extended server you want to connect then actually changing these parameters. |
URL | The connection string. Do not change this. Same reason as above. |
REST_PORT | The Print Agent opens a RESTful API for monitoring. Make sure to use different ports for each Print Agent if you run more than one and the same machine. |
PRINTING_PARAMETERS_FILE | The name of the configuration file for Print Agent printing parameters. Default is ifs-printing.properties. |
REQUEST_TIMEOUT/POLL_TIME | The timeout (in seconds) before the server will respond even if no new print jobs where found. Set this below other timeouts on the server to prevent technical issues. In the config file this property is called POLL_TIME due to backward compatibility. |
PRINTER_MAPPINGS | A list of printers serviced by this node, each printer mapping contains:: |
LOGICAL | Name of logical printer, must match the name specified in system configuration. Make sure the printer's name does not contain any white spaces as this is not supported. If a URL/Connection String is specified, a List of Values might be available from a context menu. |
PHYSICAL | Path to corresponding physical printer (relative from the server running the Print Agent). List of values available from the combo box and adding new printers can be done with a right mouse click. |
SOCKET_SPOOLER | Used to switch the Socket Spooler functionality ON and OFF. This is by default OFF. See more details further down in this document. |
PRINT_AGENT | Used to determine if the normal print agent polling functionality should be started. This is ON by default and should be ON in most cases. It is really only when you want to run a dedicated Socket Spooler that you would ever consider turning this OFF. However, the socket spooler functionality is not supported so this option would always be ON. |
MONITOR_UPDATE_RATE | Set how fast the Monitor will poll the REST API to get the current status of the Print Agent. |
REMOTE_MONITOR | If set to on, the REMOTE HOST/PORT will be used for monitoring instead of the current host and REST_PORT. In this mode, only monitoring is available. You cannot install, start or stop the service. |
REMOTE_HOST | Used as the host when doing remote monitoring. |
REMOTE_PORT | Used as the port when doing remote monitoring. |
DEBUG_LOGS | Default setting should be false. This can be enabled to get additional debug log lines which would be helpful to troubleshoot the issues. |
MAX_CONCURRENT_HTTP_CONNECTIONS | Maximum number of concurrent http connections (Default value is 2). This value could be modified to improve the printing performance when printing high volume of printouts. |
Following is a sample ifs-printagent-config.xml file with the information listed above.
<?xml version="1.0" encoding="utf-8"?> <REMOTE_PRINTING_NODE> <ID>PRINT_AGENT_1</ID> <POLL_TIME>180</POLL_TIME> <USER>IFSPRINT</USER> <PASSWORD>CgQIW96Acq0Ek7x/i8qlntoU/HRRg7ikuaZN</PASSWORD> <URL>https://lkppde1378.corpnet.ifsworld.com:58080</URL> <REST_PORT>8200</REST_PORT> <PRINT_AGENT>ON</PRINT_AGENT> <SOCKET_SPOOLER>OFF</SOCKET_SPOOLER> <PRINTING_PARAMETERS_FILE>ifs-printing.properties</PRINTING_PARAMETERS_FILE> <PRINTER_MAPPINGS> <PRINTER_MAPPING> <LOGICAL>PRINTER1</LOGICAL> <PHYSICAL>DUMMY</PHYSICAL> </PRINTER_MAPPING> </PRINTER_MAPPINGS> <MONITOR_UPDATE_RATE>Medium</MONITOR_UPDATE_RATE> <REMOTE_MONITOR>OFF</REMOTE_MONITOR> <REMOTE_HOST></REMOTE_HOST> <REMOTE_PORT></REMOTE_PORT> </REMOTE_PRINTING_NODE>
Note::In order for a print job to be picked up at all a Report Formatter needs to have the logical printer defined/listed. Hence, it's not enough to only make the logical to physical mapping in the Print Agent configuration, you also need to make sure that the logical printer is included in the printer list of a Report Formatter. It's not necessary to map the logical printer to a physical in the Report Formatter configuration when you're using a Print Agent for a printer though.
![]() |
Once the print agent is started, you can open the monitor and see
the log. After the startup is finished
it should say something like this.[004] 2018-02-21 17:35:54: State changed: RUNNING [005] 2018-02-21 17:35:55: Looking for jobs... |
![]() |
If you want to abort the installation, you can uninstall by clicking the "Uninstall Service" button. It will then try to connect to the application server to remove the registration and remove the windows service from registry. |
There is no manual configuration needed to configure Print Agent for HTTPS. Once the Middleware server is configured for HTTPS, the created Print Agent_<bit_version>_<instance>.zip files automatically get updated and configured to run in a SSL environment.
All you need to do is, install a fresh Print Agent using a newly created ZIP file after the HTTPS configuration.
The Print Agent can be started using the tray application. IFSPrintAgent.exe
When started, the node will register itself with the server and as long as it is running all print jobs destined to a printer on this node's list will not be spooled by the Report Formatter. Instead, the PDF will be created and later fetched and printed by the Print Agent. Use the Windows Service, to monitor the Print Agent status.
When run as a Windows Service the printers must be configured to accept anonymous printing, or the service must be run as a user with printing rights. There could be situations where some specific printers might have special security and access levels which limits leverage of printing, hence it is recommended to run the Print Agent service from an admin user who has full rights accordingly. The same applies for the Report Formatter when that is set up to spool print jobs to a printer.
When running Print Agent in Windows
10 for development purposes always run the Print
Agent with Administrative privileges.
You will get issues when starting Print Agent in console mode, using
start_printagent_console.cmd script directly or running it in "Run as
Administrator" mode. Instead open up a command prompt window in "Run as
Administrator" mode and run the start_printagent_console.cmd
script from that window.
When starting Print Agent in service mode, run the
start_printagent_service.cmd
script
directly in "Run as Administrator" mode.
It is possible to change a lot of minor settings for the PDF Library
printing. However, that default values should work fine in most scenarios.
If you have problems, it might be a solution to amend them. On
this page you can find a full list of the
various properties.
This functionality is mostly used when spooling ZPL printouts socket
listening label printers but has a few other features that can come in handy in
some setups.
Please see the
overview page for a description of this functionality.
To use this you first have to enable it in the printagent_conf.xml with the socket spooler option set to ON.
<SOCKET_SPOOLER>ON</SOCKET_SPOOLER>
Located in the print agent folder you can find the socket spooler configuration file; "ifs-spooler-config.properties"
Thread | Parameter | Description |
---|---|---|
Socket Listener | listener# | Listeners will listen for incoming connections on a port and pass the jobs to a spool queue. |
port* | The port to listen to. Any socket connections on this port will be picked up and the content being passed will be placed in a spool queue. | |
path* | The folder location of the spool queue. Here all queue related files will be saved. | |
Queue Processor | queue-processor# | Queue Processors will poll a spool queue and send jobs to a printer, file or folder. Both socket and UNC-paths are supported. |
path* | The folder location of the queue to process | |
printer* | The destination printer. It can be either a host:port for socket connections or a UNC path for printer queues. But is can also be a folder or file. | |
delay | This is the delay between each print in milliseconds. This is by default 0, but can be increased to reduce the load on slow printers. | |
polltime | This is the polling wait time and the default value is 5000. It is the sleep time for the process when no jobs are found in the queue. When the queue has multiple jobs, there will be no wait between each job. Use delay instead if you want to control this. | |
output | This option can be either merged or separated were merged is the default. In the merged mode, multiple jobs will be sent to the printer during the same connection. If you print to a folder, all jobs will be concatenated into the same spool file. In the separated mode, each job has its own socket connation or spool file. | |
File Processor | file-processor# | File Processors will poll a folder for files and pass them to a printer, file or folder. Both socket and UNC-paths are supported. |
path* | The folder path where files will be polled from. | |
printer*, delay, polltime, output | Same as for Queue Processor, but path means the folder path where files will be polled from. |
* mandatory properties
The following is a sample ifs-spooler-config.properties file with the information listed above.
# SPOOLER CONFIGURATION # Multiple listeners and processors can be added, just name them listenerX and processorX where "X" is a number. # No two listeners or processors should work on the same source but it is fine to use the same output target. # Listeners will listen for incoming connections on a port and pass the jobs to a spool queue. # Queue Processors will poll a spool queue and send jobs to a printer,file or folder. Both socket and UNC-paths are supported. # File Processors will poll a folder for files and pass them to a printer, file or folder. Both socket and UNC-paths are supported. # For processors "polltime" and "delay" is in milliseconds but can be obmitted. The default values are: polltime=5000 and delay=0 listener1.port=9100 listener1.path=d:\tmp\spooler #listener2.port=9300 #listener2.path=c:\tmp\spooler2 queue-processor1.printer=d:\tmp\spooler2\printer.txt queue-processor1.path=d:\tmp\spooler queue-processor1.delay=0 queue-processor1.polltime=5000 #queue-processor2.path=d:\tmp\spooler #queue-processor2.printer=d:\tmp\spooler3 #file-processor1.printer=//lkpprinter1/GBG2C #file-processor1.path=c:\tmp\files_to_print file-processor2.printer=localhost:9100 file-processor2.path=d:\tmp\spooler3 file-processor2.polltime=5000 file-processor2.delay=0 file-processor2.output=separated
You can start a monitor by double clicking the tray icon or using the first
context menu option.
The monitor will show the current status and log. The
view is updated automatically and the update rate can be configured
between every second to up every 5 minutes using preset enumeration values. You
can do a manual update by clicking the update spinner indicator or using the
monitor context menu "Refresh" option.
From the context menu you can also
control/clear the log window. It is also possible to save away the current log
file and start a new. This will happen automatically when the log file gets too
big.
You can start a monitor in a remote mode. This is done from the "Monitor" tab
on the configuration form.
If you switch this on, the REMOTE HOST/PORT will
be used for monitoring instead of the current host and REST_PORT.
In this
mode, only monitoring is available. You can not install, start or stop the
service. You can also not change the log file.