LDAP/IPP Configuration
  • 25 Mar 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

LDAP/IPP Configuration

  • Dark
    Light

Article summary

LDAP/IPP Printing Configuration

Introduction

Comflow has a new Java IPP Server implementation in favour of the old, deprecated one implemented in C#. The approach now is to communicate directly with the built in Windows IIS Service on the printer server and send preferably pdf- or postscript files there for further handling. Other printer file formats are supported via different conversion options.

The benefits with this printer configuration is that you get control over the status of the printer from Comflow and its printer attributes, like choosing tray.

Basically Comflow lists all printers in LDAP that passes the printer filter. For each printer it tries to find it on any of the pinpointed printer servers and if it successful, then the printer is a connected printer within Comflow. Comflow then sends pdf's to the printer server when printing, if not a print conversion is setup, which then enables a conversion from pdf to the wanted format of the printer to postscript or other by the printer requested formats. Additional conversions can be added as custom.

The access to LDAP/Active Directory can be basic (username and password), NTLM (+ domain) or via SPNEGO.

This requires some configuration of the Windows printer server and the sitedef.xml needs to declare a new printer handler. The transfer to the new IPP implementation should be seamless for the user.

Windows Printer Server Configuration

Here are the necessary steps for configuring the printer server using the IPP implementation.

  • Open the Add Roles and Features Wizard from the Server Manager.
  • Goto Server Roles.
  • Identify the Print and Document Services and the Web Server (IIS) roles and check them.
  • Click Next.
  • Goto Features.
  • Identify the Internet Printing Client feature.
  • Goto Role Services.
  • Identify the Internet Printing service.
  • Click Next.
  • Confirm.

Server Roles

serverroles

Features

features

Role Services

roleservices

Share Printer

Every printer that is setup on the printer server needs to be shared on your network and you also have to check the List in the directory checkbox to make the printer visible to the Active Directory.

Share Printer

shareprinter


Sitedef setup

Printer Handler

The sitedef.xml needs a new LDAP printer handler:

  1. Give the handler an id (name) and set class to "net.comactivity.core.print.ldap.LdapPrinterHandler".
  2. Set the LDAP provider URL, like "ldap://dc1.example.com:389"
  3. Set the search base within LDAP for the wanted printers, "DC=example,DC=com". If left blank, all printers will be listed.
  4. Set the user id and password for connection to LDAP
  5. Set the domain for connection to LDAP. If domain is set, NTLM will be used as authentication method on Windows.
  6. List the print servers that Comflow shall connect, like "http://printserver1.example.com,http://printserver2.example.com"
  7. Set the user id and password for connecting the print servers
  8. Set the search base for the printer servers. If left blank, all printers will be listed. 
  9. Set the IPP version. Default is version 1.0
  10. Define possibly a filter
NameValue Description
provider.urlWindows AD Controller address
provider.search.baseWindows AD Controller search base
user.idWindows AD Controller user id including the domain
passwordWindows AD Controller password
domainWindows AD Controller domain. If this property is set, strip the '@comact.comactivity.net' domain part from the user.id property value.
ipp.passwordWindows IPP password
ipp.user.idWindows IPP user id
ipp.domainWindows IPP domain, short hand version, upper case
printers.search.baseSearch base for locating printers
ipp.versionWindows IPP Server requires version 1.0 - don't change
ipp.server.urlsURLs to print servers running Windows IPP. Use comma ',' to separate server URLs if several.
global.printer.filterFilters the list of printers from the LDAP. Shall be used with wildcard (%), like Brother% or %printer.
updateintervalHow often printer information shall be retrieved from IPP Server in milliseconds. Default is 2 minutes/120 000 milliseconds.


Here is an example of the sitedef settings. The property values in the XML are examples.

<PrinterHandler id="ldap" class="net.comactivity.core.print.ldap.LdapPrinterHandler">  
   <Property name="provider.url" value="ldap://dc1.example.com:389"/>
   <Property name="provider.search.base" value="DC=example,DC=com"/>
   <Property name="user.id" value="user@example.com"/>   
   <Property name="password" value="userpwd"/>
   <Property name="domain" value="example.com"/>
   <Property name="ipp.server.urls" value="http://printserver1.example.com,http://printserver2.example.com"/>
   <Property name="ipp.domain" value="EXAMPLE"/>
   <Property name="ipp.password" value="userpwd"/>
   <Property name="ipp.user.id" value="user"/>
   <Property name="printers.search.base" value=""/>
   <Property name="ipp.version" value="1.0"/>
   <Property name="global.printer.filter" value="Brother%" />
   <Property name="updateinterval" value="120000" /><!-- Default every second minute-->
</PrinterHandler>

SPNEGO Authentication

In some Windows environments, NTLM is not applicable, SPNEGO together with Kerberos cab be used.


Printer File Format Conversions

Comflow standard wise generate pdf as printer file format. Though not all printers can manage pdf, why you might need to convert it into the "standard language" for printers, Postscript. See settings below.

Conversion service for Postscript

To enable Postscript, you have to add the a conversion service for IPP, which is done under Services in the Sitedef. Note that "printer.handler.ids" is a list of printer handlers for which the conversion is valid, and the printern handler defined above must be in that list.

<Services>
  <ServiceImpl name="net.comactivity.core.print.Converters">
    <Properties>
      <Property name="enabled" value="true"/>
      <Property name="printer.handler.ids" value="ldap"/>
    <Properties>  
<ServiceImpl>
</Services>

Custom conversions can be built.

Conversion via Ghostscript

Ghostscript is a printer format converter, which supports many different formats. By installing and configuring Comflow, you enable the conversion from pdf to the supported formats. For detailed information, see Ghostscript homepage: https://ghostscript.com/

You install by downloading and installing Ghostscript on the Comflow server: https://ghostscript.com/releases/gsdnld.html

You then configure Comflow to interact with the installed Ghostscript by pinpointing it in sitedef.xml under JVMProperties for the property "printing.ghostscript.path" .

<JVMProperties>
            <!-- Enable Ghostscript printer format conversion by pinpointing path to Ghostscript exe-->
            <Property name="printing.ghostscript.path" value='C:\Program Files\gs\gs10.01.1\bin\gswin64c.exe'/>  
</JVMProperties>

PPD files

In some cases there is a need for customizing certain printer properties and that can be achieved by using a ppd file for that particular printer. PPD files are managed in the PrinterControl/EnhancedPrinting/Manage PPD system portlet. In Windows, these files are usually found under C:\Windows\System32\spool\DRIVERS\x64\3 or a subdirectory of C:\Windows\System32\DriverStore\FileRepository. Connect PPD to printer in the PrinterControl/EnhancedPrinting/Printers portlet by entering Model Id. Press Save, and then Printer Properties to do the PPD ↔ IPP mapping.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.