###############################################################################
#
#    The Direct Print Monitor Configuration File.
#
###############################################################################

#
# This file is intended for advanced users. Please consult the documentation
# before modifying this file.
#
# NOTE: The hash (#) represents a comment.
#

#
# Define the name or IP address of the application server.
# On secondary server installs, this value should be changed to point to the
# primary application server.
#   Default: 127.0.0.1
#   Examples:  mainserver.localdomain.com, win2003, 1.2.3.4
#
# IMPORTANT: Please restart the server or the "Print Provider Service" after
# changing this value.
#
ApplicationServer=177.131.33.2


#
# Define the TCP port associated with the application server.
#   Default: 9191
#   Examples:  8080
#
ApplicationServerPort=9191

#
# Specify whether to use direct printing mode.  Direct printing mode is advised when
# there is no central print server and this print provider is run on user workstations.
# In this environment it is common for multiple workstations to register a print queue
# connecting to the same printer.  Direct printing mode will consolidate these queues
# for configuration and reporting in the Application Server.
#
DirectPrintingMode=true

#
# Specify whether to use HTTPS or not. If on, true, or enable is set, the Print
# Provider uses HTTPS to communicate with the Application Server on the port
# configured via ApplicationServerPort. It is recommended to use
# ApplicationServerPort=9195 when enabling TLS.
#
#   Default: off
#   Examples: on, true, yes, off, false, no
#
#TLS=on

#
# Specify the minimum TLS version that the Print Provider uses. The following
# versions are available, which are case insensitive. SSLv2 and SSLv3 are not
# supported and can not be used.
# More information about configuring the PaperCut NG/MF Application Server is
# available here: https://www.papercut.com/kb/Main/SSLCipherConfiguration/
#
#   Value   | Possible versions
#   --------+------------------
#   TLSv1.0 | TLS v1.0 or later
#   TLSv1.1 | TLS v1.1 or later
#   TLSv1.2 | TLS v1.2 or later
#   TLSv1.3 | TLS v1.3 or later
#
#   Default: TLSv1.2
#
#TLSMinProtocolVersion=TLSv1.2

#
# Specify the maximum TLS version that the Print Provider uses. The following
# versions are available, which are case insensitive.
# More information about configuring the PaperCut NG/MF Application Server
# is available here: https://www.papercut.com/kb/Main/SSLCipherConfiguration/
#
# Note: As per the above KB article, "server.ssl.using-strong-defaults" must be
# enabled to use TLSv1.3.
#
#   Available values: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
#
#   Default: TLSv1.2
#
#TLSMaxProtocolVersion=TLSv1.3

#
# Specify whether the Print Provider verifies the PaperCut NG/MF Application
# Server's HTTPS certificate. By default the Application Server uses a
# self-signed certificate. If certificate verification is enabled, the Application
# Server must be using a trusted certificate.
#
# More details available here:
# https://www.papercut.com/help/manuals/ng-mf/common/tools-ssl-key-generation-certificate-authority/
#
#   Default: false
#   Examples: on, true, yes, off, false, no
#
#TLSVerifyCertificate=true

#
# Specify the list of cipher suites to use for TLS connections. The names of
# cipher suites are capital letters. It consists of one or more cipher suite
# strings separated by commas. This list doesn't allow using !, - and + as
# operators. It is acceptable to specify a mixture of those that can only be
# used with TLS 1.2 or earlier and those that can only be used with TLS 1.3. The
# list used by default or cipher suites that can be specified depend on the OS
# that Print Provider is running. Please refer to
# https://curl.se/docs/ssl-ciphers.html to see what chipher suites can be used.
# Print Provider uses the following TLS library.
#
#   Windows: Schannel
#   Mac:     Secure Transport
#   Linux:   OpenSSL
#
#   Default: Refer to CURL documentation and TLS library documentation
#
#TLSCipherSuites=

#
# Linux Only. Specify the path to the CA certificate bundle file where root and
# trusted certificates are included. Not used for Windows and macOS
# Required when TLSVerifyCertificate=true
# Default:  The application will attempt to find a suitable certificate bundle from the following paths,
#           typically compatible with most Debian/Red Hat based distributions.
#           If none of the paths listed below is accessible, the path will be set to empty by default, which will cause
#           a TLS handshake failure.
#           - /etc/ssl/certs/ca-certificates.crt (available in the most of Debian based distributions)
#           - /etc/ssl/certs/ca-bundle.crt (available in the most of Redhat based distributions)
#TLSCABundlePath=/custom-path/ca-certificates.crt

#
# WINDOWS ONLY: To ignore/monitor printers on other platforms see the manual.
#
# Define a list of printers to ignore. The list is defined by a comma separated
# list of string values.  Note: Do not prefix the name with the server
# or use the share name.  Use the full local name only.
#
# Wildcard expressions can also be used.
# Use '*' to ignore any span of characters, and '?' to ignore a single character.
# For example, to ignore any printers which start with the phrase Copy Room:
# IgnorePrinters=Copy Room*
#
# On Windows, restart the "Print Provider" service to apply changes.
#
#   Default: none
#   Examples:  hplaserj,HP Color Laser,sci_lab,PdfPrinter
#
IgnorePrinters=

#
# Define if debug logging is enabled.
#   Default: off
#   Examples: on, development
#   Example (Unix): snapshot (do debug and save the last spool file)
#
#debug=on

#
# The print-provider.log* file size in Kilobytes for the log rotation.
# Defaults to 10 Megabytes.
#
#LogRotateSizeKBytes=1024

#
# The number of print-provider.log* files that are kept as part of rotation
# before the oldest log file is overwritten.
# Defaults to 10 files.
#
#LogRotateNumber=10


#
# The timeout in seconds associated with parsing printer spool files.
#   Default: 5 minutes.
#   Unit: seconds
#   Examples: 600
#
#ParseTimeout=300


#
# The system name reported by this server.  By default this is the current
# host name, however it may be useful to override this in some situations.
# For example, to alias printers under the name of an old server, or to report
# printers under the virtual name of a cluster rather than as an individual
# node.  For advanced users only.
#
# IMPORTANT: Changing the server name can have adverse affects on the system.
#            Please take care when making changes, and first discuss
#            options with the support team. The features most affected by
#            this change are: web print, find-me printing, printer load
#            balancing, watermarking and force color/duplex jobs.
#
#   Default:  <the systems current host name provided by the OS>
#   Examples: OldServer
#
#ServerName=

#
# WINDOWS ONLY: This setting is used to hide document names in the windows
# print queues.  This can be useful when there are privacy concerns of allowing
# other users to see the document names from other users. Note: this feature
# can also be enabled for individual printers via a configuration setting on the
# app server. However, if this feature is enabled here, the hide document names
# settings on the app server will be ignored.
#
# The document name will be changed to the value of the 'HideDocumentNamesText'
# setting.
#
#   Default: off
#   Examples: on, off
#
HideDocumentNames=off

#
# WINDOWS ONLY: If the 'HideDocumentNames' setting is enabled, this setting
# determines what the document name is changed to.
#
#   Default: [hidden]
#
HideDocumentNamesText=[hidden]

#
# Archive Dir specifies the full path to the print job archive directory.
# On the primary server this is automatically configured to the server's
# archive directory.  On a secondary print server or site server, it will need
# to be set to the centrally shared archive location.  On Windows you'll need
# to use a UNC path.  On Mac and Linux, you'll need to ensure the network
# location is automatically mounted on system startup.
#
# Before changing this setting please consult the print archiving section
# in the manual.
#
# Example (MS Windows): \\my-primary-server\print-archive
#
# Example (Mac):        /Volumes/print-archive
#
# Example (Linux):      /mount/print-archive
#
ArchiveDir=

#
# WINDOWS ONLY: This setting can be used to change the name of the
# server used when binding to print queues.  By default the current
# host name is used.  It may be useful to change this in a selected
# cluster environments where queues are hosted under a different
# virtual host name. Prefix the name with "\\" indicating a Windows network
# resource.  For advanced users only.
#   Default:  <the systems current host name provided by the OS>
#   Examples: ClusterName
#
#PrintServerName=\\MyServer

#
# Define a list of document names to ignore.  If any of these
# values partially match the document name, the document will be printed and
# not logged to the application server.
# The list is defined by a comma separated list of string values.
#   Default: none
#   Examples:  EPSON EBAPI Dummy Document Data,Other Ignored Document Name
#
#IgnoreDocumentNames=


#
# WINDOWS ONLY: Used to enable or disable pre-notifications of printed
# documents.  Pre-notifications are used to speed up the client print
# popups, by notifying the client when the document arrives in the queue
# instead of after the document has spooled and been analyzed.
#   Default: on
#   Examples:  on, off
#
PreNotifications=on

#
#  Turn off printing of spooled jobs on this print provider. e.g. for Google Cloud Print
#   Default: on
#   Examples: on, off
#
#SpooledJobsManagerDisable=off

#
# Maximum number of processes to use to print spooled jobs. e.g. for Google Cloud Print
#  - Lower values may decrease responsiveness of printing and decrease CPU load.
#  - Higher values may increase responsiveness of printing and increase CPU load.
#   Default:  5
#   Examples: 2
#
SpooledJobsManagerJobProcessLimit=

#
# Period on which the print-provider calls the Application Server to get a list of all
# spooled jobs waiting to be in in milli-seconds.  e.g. for Google Cloud Print
#  - Lower values may increase the load on the network and the Application Server.
#  - Higher values may decrease responsiveness of printing in some cases, though this usually
#     should have little effect.
#
#   Default:  300000
#   Examples: 600000
#
#SpooledJobsManagerPollTimeoutMillis=

#
# WINDOWS ONLY: Used for highest quality PostScript printing when providing
#  printing e.g. for Google Cloud Print
#  This may lead to incorrect printing on some non-Adobe PostScript printer
#  drivers.
#   Default: off
#   Examples: on, off
#
#BestPSPrinting=on

#
# UNIX ONLY: The directory where the CUPS system "backends" are located.
#   Default: <system search>
#   Examples: /custom/lib/cups/backend
#
#CupsBackendDir=/usr/lib/cups/backend

#
# UNIX ONLY: The directory where the CUPS places spool files.
#   Default: <system search>
#   Examples: /custom/var/spool/cups
#
#CupsSpoolDir=/var/spool/cups

#
# UNIX/CUPS ONLY:
#   The directory where the Print Provider places its spool files that it received from CUPS.
#   Default: /tmp
#   Examples: /var/tmp
#
#TmpCupsSpoolDir=/tmp

#
# UNIX ONLY:
#   The directory where the Print Provider places its snapshot spool files created when "debug=snapshot" is set.
#   Default: /tmp>
#   Examples: /var/tmp
#
#SpoolSnapShotDir=/tmp

#
# UNIX ONLY: The full path to the CUPS printers.conf conig file.
#   Default: <system search>
#   Examples: /custom/etc/printers.conf
#
#CupsPrintersConfFile=/etc/cups/printers.conf

#
# UNIX ONLY: Only enable if directed by support.
#   Default: true
#   Examples: false
#
#CupsForceSingleCopy=false

#
# UNIX ONLY: The command used to redirect jobs to other queues.
#   Default: lp -h %server% -d "%printer%" -t "%docname%" -o raw \
#   	"%spoolfile%" 2>&1 > /dev/null
#
# The command should not output any standard output or error.
# The commands exit code is checked to verify successful redirection.
# Any non-zero exit code indicates an error.
#
#  Valid replacements include:
#     %server%    - server name to redirect to (optional)
#     %printer%   - printer name to redirect to
#     %docname%   - document name
#     %username%  - the username associated with the print job
#     %spoolfile% - the spool file to print
#
#RedirectCommand=lp -h "%server%" -d "%printer%" -t "%docname%" -U "%username%" -o raw "%spoolfile%" > /dev/null 2>&1

#
# UNIX ONLY: The command used to remove jobs from the queue.
#   Default: cancel -U "%username%" "%jobid%" "%printer%" >/dev/null 2>&1
#
# The command should not output any standard output or error, however,
# you can redirect the stderr to a file for debug testing of the command.
# The commands exit code is checked to verify successful removal.
# Any non-zero exit code indicates an error.
#
#  Valid replacements include:
#     %printer%   - destination printer name to remove job from
#     %jobid%     - the job id
#     %username%  - the username associated with the print job
#
#JobDeleteCommand=cancel -U "%username%" "%jobid%" "%printer%" >/dev/null 2>&1

#
# The number of lines per page in a plain text print (advanced).
#   Default: 66
#   Examples: 60
#
#PlainTextLinesPerPage=60

#
# Sets the polling period in seconds for printers currently in error and will
# override the recommendation of the Application Server.
# If set to 0 then the Application Server's recommendation will be used.
#   Default: 0 (use Application Server's recommendation)
#   Example: 10
#ErrorPollInErrorPeriodSecs=10

#
# UNIX ONLY: Sets the polling period in seconds for printers NOT currently in error.
# Setting this to a lower value will speed up error detection but may result
# in higher resource consumption.
#   Default: 120 (= 1 minute mean detection time)
#   Example: 60
#ErrorPollPeriodSecs=60

#
# WINDOWS ONLY: Error Polling Active Period
# Sets the polling period in seconds for printers NOT currently in error and
# have recently had a job sent to them.
# Setting this to a lower value will speed up error detection but may result
# in higher resource consumption.
#   Default: 120 (= 1 minute mean detection time)
#   Example: 60
#ErrorPollActivePeriodSecs=60

#
# WINDOWS ONLY: Error Polling Inactive Period
# Sets the polling period in seconds for printers NOT currently in error and
# have NOT recently had a job sent to them.
# Setting this to a lower value will speed up error detection but may result
# in higher resource consumption.
#   Default: 600
#   Example: 60
#ErrorPollInactivePeriodSecs=60

#
# WINDOWS ONLY: Error Polling Method
# Choose which method to use for polling of errors on printers.
#
# If set to "windows" then the Print Provider will use whatever the Windows Printing
# System believes the state of the printers to be in. This could be done via SNMP if
# using the Windows Standard TCP/IP Port Monitor with the SNMP tick box checked on.
#
# If set to "snmp" (which is the only method on Mac/Linux) then the Print Provider
# will look at the SNMP OID value of hrPrinterDetectedErrorState (1.3.6.1.2.1.25.3.5.1.2.1).
# It will also use the HWCheckIgnoreErrors configuration setting (described below)
# in order to decide if the error is critical or not and likely to block the print jobs from proceeding.
#
# If set to "both" then if either method reports an error then consider the printer is in error.
#
#   Possible values: windows, snmp, both
#   Default: windows
#ErrorPollMethod=snmp

#
# WINDOWS ONLY: Use Port's Printer Address from registry for SNMP Error Polling
# Whether to use the Printer Address stored in the registry for the Port for the
# SNMP fetches when doing printer error monitoring.
# The Print Provider uses many ways to infer the address of a printer from the registry
# in order to come up with a printer URI. Sometimes, this may come up with a possible
# printer address but without as much certainty. This setting is to err on the
# side of more confidence, and if "on", only uses an address that is explicitly marked
# as such in the registry for the port. This should do the right thing in the
# case of Standard TCP/IP Ports and PaperCut ports.
#
#    Possible values: on, off
#    Default: on
#
# ErrorPollUsePortPrinterAddress=off

#
# WINDOWS ONLY: Common/popular virtual printers such as PDF Writers
# and Virtual FAXs are ignored (not monitored) by default.
#   Default: On (ignore common virtual printers)
#   Example: Off (monitor virtual printers)
#IgnoreVirtualPrinters=On

#
# Used in Hardware Check Validation and in SNMP Error Monitoring on Unix,
# list the set of SNMP error conditions to ignore because they are not deemed critical
# and won't cause the printer to hold up printing.
# Note: Other errors which are critical, such as "No Paper" will hold up printing (it needs more paper)
#       and so the hardware checking code will wait for the printer error to be rectified.
# Add any additional errors to the end of this list separated by a "|" character.
# You can use "pc-printer-monitor -h printerip -p" to see any printer errors on the printer
# so that you know the exact name of the error to use.
# Note: the following commented out list is the currently configured ignored errors and should generally
#       only be appended to.
#
#HWCheckIgnoreErrors=Service Requested|Input Tray Empty|Low Paper|Low Toner|No Toner|Marker Supply Missing|Output Near Full|Overdue Prevent Maintenance

#
# Change the SNMP community string that is used at the Print Provider layer when communicating
# to printers via SNMP.
# For example, this setting will be used by Hardware Check Validation to retrieve SNMP printer state data.
#   Default: public
#
#SNMPCommunity=public

#
# UNIX ONLY: The base directory where the print provider is installed.
# i.e. where the executables, config file, logs, etc are located.
#
# This setting is automatically configured during installation.
#
# Do not change without contacting support.
#
#BaseDir=

#
# The PaperCut spool directory is the full path for the directory where the
# PaperCut Print Provider puts its auxiliary working files.
# For example, the settings files for the printers and analysis documents to be
# sent to the App Server on reconnection.
# Despite its name, it does NOT store any printer spool files used for printing.
#
# A particular use of this config variable is for specifying a common path
# to a shared resource for PaperCut's Print Provider data
# for use in a clustered environment.
#
# By default the directory path is $BaseDir/spool
#
# Do not change without being instructed to do so.
#
#SpoolDir=

#
# Not currently supported on Novell.
# Extract username from spool file using a custom pattern and replace the system provided
# username with it.
# This can be used by programs that print on behalf of users using their own system account.
# If these programs put the usernames in the spool files then those usernames can be extracted
# using this method.
#
# There are 2 types of patterns:
#   1) UsernameOverridePrefix + UsernameOverrideSuffix captures text between the first occurence
#       of the values of these keys in the spool file
#       e.g.  The lines
#           UsernameOverridePrefix=@PJL USERNAME="
#           UsernameOverrideSuffix="
#       would capture John Wayne from @PJL USERNAME="John Wayne"
#   2) UsernameOverrideRegex<n> for n=1..5 captures text with regular expressions
#       e.g. The line
#           UsernameOverrideRegex1=@PJL\s+SET\s+USERNAME\s*=\s*\"(.+?)\"
#       would capture Carey Grant from @PJL SET USERNAME="Carey Grant"
#       The line
#           UsernameOverrideRegex3=/Author\s*\((\w+)\)
#       would capture Charles from /Author (Charles) def
#       but would not capture anything from /Author (Charles Dickens) def
#
#UsernameOverridePrefix=
#UsernameOverrideSuffix=
#UsernameOverrideRegex1=
#UsernameOverrideRegex2=
#UsernameOverrideRegex3=
#UsernameOverrideRegex4=
#UsernameOverrideRegex5=

#
# NOVELL ONLY: Remove any specified suffixes from the username for the print job.
#
# List any suffixes (comma or space separated) that should be removed from the job's username.
# For example, this may be used to remove some standard domain names.
# e.g. ".abc.def.com, .ghi.jkl.gov"
# Note: the leading dot must be specified as it is part of the suffix to remove.
#
# Note: when this config parameter is specified, any built-in suffix removal
# (such as removing dot suffixes) will be disabled.
# The potential problem with the built-in suffix removal is if the username
# has legitimate dots in it, such as "firstname.lastname".
#
NovellUsernameRemoveSuffixes=

#
# WINDOWS ONLY: Do a daily service refresh and remonitor of printers around 2-4am in the morning
#   Default: On
#   Example: Off (useful if site wants to do own scheduling of restarting of the Print Provider)
#
#DoDailyServiceRefresh=off

#
# WINDOWS ONLY: As part of print provider startup, add a delay in registering all the printers.
# The delay is a randomly chosen time in minutes up to a maximum value provided in the configuration value.
# This may be useful if one wants to spread the load on the Application Server in a large
# DPM (direct print monitor) setup and cause the DPMs to start their printer registering at
# different times over a certain period.
#   Default: O (there will still be no random delay but only a small fixed delay before starting up)
#   Example: 240 (delay a random chosen amount up to 4 hours)
#
#RandomDelayRegisterPrintersMins=240

#
# WINDOWS ONLY: Enable the registration of all the printers during a service refresh.
# If this is turned off then no immediate register printer requests (RPCs) will happen and
# no printer settings requests will happen for all printers on a refresh.
# Instead, the requests will happen when a print job is detected for the first time since a refresh.
# This may be useful in a large DPM (direct print monitor) setup and will stop a flood of printer
# registrations at DPM start up or refresh, and instead delay the registration until the
# first print job happens.
#   Default: on (register all printers after a refresh)
#   Example: off (only register printers and get printer settings when doing first print job on
#                 the printer since refreshing)
#
#EnableRegisterPrinters=off

# CUPS ONLY (Mac/Linux): How long to wait for a CUPS backend to finish in seconds.
#   Default: 300
#
# It when running the original backend for a CUPS job and it takes longer than ExecBackendTimeoutSecs
# then kill the backend.
#
#ExecBackendTimeoutSecs=300

# CUPS ONLY (Mac/Linux): The polling interval in seconds for looking at the activejobs directory for held jobs
#   Default: 1
#
# Controls how frequent we check for new held jobs.
#
#ActiveJobsPollIntervalSecs=1

# WINDOWS ONLY: Do pdf rendering with scaling of contents to fit the printed page to be used by
#               "Email To Print" and "Cloud Print" on Windows.
#   Default: on
#   Values: on, off
#
#PdfFitToPage=on

# WINDOWS ONLY: Provide support for Google Cloud Print (GCP)
#   Default: off (as GCP is no longer supported since the start of 2021)
#   Example: on (Print Provider will provide supported files for GCP)
#EnableGoogleCloudPrint=on

# UNIX ONLY: The timeout in seconds associated with waiting for the App Server to be ready.
#            i.e. The Print Provider will give up waiting for the App Server after the timeout.
#   Default: 3600 (wait up to 1 hour)
#   Example: 600 (wait up to 10 minutes)
#
#WaitForServerAtStartupTimeoutSecs=600

# CUPS ONLY (Mac/Linux): Turn on/off the persistence of held jobs.
#   Default: off
#
# If the printing system is stopped or restarted then with this option off, held print jobs
# can be lost. With this config enabled, then the held jobs will be persisted in the filesystem
# and so can survive reboots.
#
#JobHoldPersistence=on
