Configuring Mobile Print Server
Overview
There are two sources of the configuration in the YSoft SafeQ Mobile Print Server (further MPS):
Local configuration
There are two configuration files mps.config and conversion.config. Their purpose is to define specific options of one Mobile Print Server installation. All local values are loaded as soon as the Mobile Print Server service is started. Both files are located in <MobilePrintFolder>\Service\conf\. Without valid and fully defined local configuration the Mobile Print Server service can not run.
CML configuration
User can also configure some Mobile Print Server options in the CML web interface. The configuration is loaded to the Mobile Print Server during startup and is refreshed every 15 minutes. If the CML configuration is not available during startup the Mobile Print Server waits indefinitely to receive any. In order to propagate changes immediately to Mobile Print Server, restart of the service YSoft SafeQ Mobile Print is needed (Open services.msc, select service YSoft SafeQ Mobile Print and restart this service)
Some fields from the CML configuration can be overridden in the local configuration.
To configure CML configuration options, use YSoft SafeQ web interface. Follow the instructions below:
Open YSoft SafeQ web interface http://SAFEQ_IP:SAFEQ_HTTP_PORT/ (for example http://192.168.1.1:80/) and login as administrator
On page navigate to System than System settings
To access all of the options for Mobile Print Server, Expert views have to be set
Open category Mobile Print Server
Configuring Mobile Print Sever via CML web interface
Yellow marked settings can be overridden in the local configuration.
Functional settings
Option | Default | Description |
Allow mobile print for anonymous users | Disabled | System accepts jobs for mobile print from user without authentication. |
Force B/W for Mobile print | Disabled | Mobile Print Server will force black/white printing.
|
Force duplex for Mobile print | Disabled | Mobile Print Server will force duplex printing. |
Ignore e-mail body | Enabled | If enabled and document contains any attachment, only attached file will be converted and email body will be ignored. If disabled, both body and attached file will be converted. It can be overridden in the local configuration: <mps ignoreMailBody="true">... |
Print job title prefix | "Mobile print" | String that will be used as prefix for all print jobs received via Mobile Print feature. |
Enable Mobile Print Server | Disabled | Enables or disables the Mobile Print Server.
|
Enable release of job on printers with direct queue from mobile interface. | Disabled | If enabled, user will see list of printers in mobile web interface and can choose one for print.
|
Ignored attachments | ATT0000?.txt | Pattern of email attachments, that are ignored. Some email clients create unwanted attachments which shouldn't be printed by YSoft SafeQ. For example some iOS clients create ATT00001.txt attachment even if email is sent with no attachment. There is a functionality in the MPS that helps to get rid of these unwanted attachments. It is configurable via Ignored attachments (ignoredAttachments) property in the System settings. You can specify ignored attachments here. Values must be separated by comma "," character. To insert a comma into the file name, you can use wild card characters "?" and "*" (similar to file search). Default value of the property is "ATT0000?.txt" to prevent unwanted attachments that come from iOS email clients by default. All attachments matching Ignored attachments values will be ignored and MPS will not send any notification about this event (it is only logged). |
MPS default encoding | UTF-8 | Default encoding used for txt files and non-HTML body. Mobile Print Server tries to detect encoding of mentioned files and if the detection fails, this encoding is used during conversion. |
Mailbox check timeout | 10000 | Time interval to check mailbox in milliseconds. It can be overridden in the local configuration: <mps generalSourceCheckTimeout="5000">... |
Fixing of PowerPoint files page size | Enabled | Correct incorrectly generated slide size in the PowerPoint files.
It can be overridden in the local configuration: <mps correctSlideSize="false">... |
Regional settings
Open category Regional settings instead of Mobile Print Server
Option | Default | Description |
Default paper size | A4 | The value uses Mobile Print Server as a default paper size for printed documents where no paper size is encapsulated in it (i.e. HTML, MHTML, TXT, Email). Supported values are: A4, Letter. It can be overridden in the local configuration: <mps defaultPaperSize="Letter">... |
Web interface settings
Option | Default | Description |
Allow guest user registrations | Disabled | Allows user self registration in the Mobile Print Server web interface.
|
Template user for permanent guest users accounts | N/A | Enter a username of a user that will be used as a template when creating accounts for the guest users. In case this field is empty, no template will be used and users will be created with default values. |
Guest users expiration period | N/A | Specifies how long self registered users (guest users) will exist in YSoft SafeQ before they are deleted. All permitted letters are: m - month, w - week, d - day, h - hour. For example 2m 3w 2d 21h. If this field is left empty, guest users accounts are created as permanent. |
Template user for temporary guest users accounts | N/A | Enter a username of a user that will be used as a template when creating accounts for the temporary guest users. In case this field is empty, no template will be used and users will be created with default values . |
Notification settings
Mobile Print Server provides highly customizable email notification about job processing. By setting the options listed below the administrator can customize and/or localize the notification emails sent to the user.
Settings for SMTP connection (for sending emails) Mobile Print Serveruses general SafeQ SMTP settings. Ensuring that mail sending from MPS via SMTP works is crucial, as it is the only way how Mobile Print Server informs user about jobs processing results.
If secured connection for SMTP is used, pay attention if your server uses explicit or implicit security. In most cases, it can be recognized by port number used for SMTP. Port 587 is usually used for explicit security, which is supported by MPS, but port 465 is usually used for implicit security, which is not supported by Mobile Print Server. ![]()
For more information about the notification email composition see Mobile Print Server - User mail notification composition.
Option | Description |
Finish option black-white | Description of finishing option B/W set. |
Finish option duplex | Description of finishing option Duplex set. |
Job conversion failed | Description when a job failed to convert. |
Job list footer | Text below the jobs list, should contain the link to the Mobile Print Server Web Interface (placeholder #MOBILEWEBINTERFACE#). |
Job list header | Text above the jobs list. |
Job processing failed | Description when a job failed to process (in case of general or unknown error). |
Job send failed | Description when a job failed to be sent to SafeQ. |
Job was successfully processed | Description when a job was successfully processed and sent to SafeQ. |
Mail authentication failed | Text when the sender's email address is not registered to any user in SafeQ. |
Mail duplicate address | Text when the sender's email address is registered to more than one user in SafeQ. |
Mail header | General notification mail header. |
Mail footer | General notification mail footer. |
Mail send failed | Text when the sender's email address could not be verified, because of no connection to SafeQ. |
Mail send was successful | Text when the email was accepted by the SafeQ Mobile Print Server. |
Notify finish option forced | Text about which finishing options are set. |
Local configuration - mps.config
In general local configuration is used to define job sources (email and folder sources) and communication channels. An administrator is to set different local configuration values per every instance of the Mobile Print Server. Most of the local configuration values are defined during installation.
Folder sources
Folder source is a local or network path where users can upload jobs via web or 3rd party interface. Mobile Print Server checks those folders periodically and transfers them to the SafeQ. There can be one or more folder sources defined. Each source is defined by one add tag with its attributes which is inside folderSources tag.
If the CML is installed on different IP from the Mobile Print Server Path to source folder location. For installation on the CML server default setting can be used without any changes, otherwise proper IP address and path has to be defined.
Options
Option | Default | Description |
host | N/A | IP address of the CML server. |
path | N/A | Absolute local path on the CML server where the jobs are uploaded. host and path fields together builds the UNC network path to the folder.
|
userName | N/A | Optional. Credentials of the user who is authorized to access the folder. If the userName is not defined it uses credentials the Mobile Print Server is running under. In this case folder sources has to be created with the same read/write rights as the Mobile Print Server credentials. |
password | N/A | Optional. Password can be defined by plain text or encrypted (i.e. code,3,52,90,-91,44,-90,62,-101 - see section Password encryption). |
downloadInterval | 1000 | Interval in milliseconds of checking the folder. |
Examples
<folderSources> <!-- CML running on the same IP as MPS --><add host="127.0.0.1" path="c:\SafeQ5\cml\server\mobile\"><!-- CML running on the different IP than MPS. Credentials provided. --><add host="168.192.0.11" path="C$\SafeQ5\cml\server\mobile\" userName="Administrator" password="code,3,52,90,-91,44,-90,62,-101" downloadInterval="1000" /></folderSources>Email sources
Mobile Print Server can operate one or more email sources that are checked periodically. Each source is defined by one add tag with its attributes which is inside emailSources tag.
Options
Option | Default | Description |
type | N/A | Protocol for retrieving emails from a mailbox. Supported values are Imap, Pop3, Exchange. (Exchange web services - EWS is used to connect when Exchange connection is chosen) |
host | N/A | Host name or IP address of the mail server. |
domain | N/A | Domain of the user, this is necessary only for Exchange type |
userName | N/A | Mailbox address, that is checked periodically for new emails. Only local part of address (username) is needed for some systems (typically for Exchange). |
password | N/A | Password of the mailbox. It can be defined by plain text or encrypted (i.e. code,3,52,90,-91,44,-90,62,-101 - see section Password encryption). |
port | 993 | Port number of the mail server. This setting is ignored for Exchange type. Standard email ports are:
|
secure | True | Enables secure communication to the mail server. This setting is ignored for Exchange type. Supported values are:
|
implicitSecurityMode | True | Mobile Print Server uses this parameter for secure communication (secure is set to True). False value means communication with email server starts without SSL/TLS and secure layer is set during the communication, True value means that SSL/TLS is used from the beginning of the communication with email server. For ports 995 and 993, implicitSecurityMode normally has to be true and for 110/143 it normally has to be false. This setting is ignored for Exchange type. |
ignoreCertificateChainErrors | False | In case of an mail server with a self-signed certificate and secure communication (including Exchange communication which is secure by default), you have to set this value to True.
|
maxEmailsPerBatch | 50 | Maximum number of emails downloaded at once (in one tick of the mpsCheckTimeout set). |
networkOperationTimeout | 60 | Timeout in seconds for download of all email batch including all attachments. This setting is ignored for Exchange type. |
failedFiles |
| Settings for files that weren’t processed successfully (folder where the files should be moved, time in seconds after which the files should be deleted). If no settings provided, the default values are used (default folder is „Failed“, default time is 7 days). |
Examples
<emailSources><!-- IMAP secure default--><add type="Pop3" host="168.192.0.10" userName="mps1@company.com" password="code,3,52,90,-91,44,-90,62,-101" implicitSecurityMode="false" /><!-- POP3 insecure --><add type="Pop3" host="168.192.0.11" userName="mps2@company.com" password="code,3,52,90,-91,44,-90,62,-101" port="110" secure="false" /><!-- IMAP secure, port 993 implicit security defined by 993 --><add type="Imap" host="imap.company.com" userName="mps3@company.com" password="1234" port="993" secure="true" implicitSecurityMode="true" ignoreCertificateChainErrors="true" /><!-- IMAP secure, port 143 explicit security must be defined by implicitSecurityMode="false" --><add type="Imap" host="imap.company.com" userName="mps4@company.com" password="1234" port="143" secure="true" implicitSecurityMode="false" ignoreCertificateChainErrors="true" maxEmailsPerBatch ="30" networkOperationTimeout="60"/><!-- Exchange secure --><add type="Exchange" host="exchange.company.com" userName="mps6@company.com" domain="someDomain" password="1234" /></emailSources>Exchange connection via Exchange web services is possible only with MS Exchange Server 2013 and newer.
Print servers
Print server is a CML or ORS server that communicates to the MPS. It serves three purposes - it accepts jobs transferred from MPS, authenticates users and provides CML configuration. There can one or more print servers defined in the configuration. Each print server is defined by one add tag with its attributes which is inside printServers tag (see Examples). If there are more print servers (CML cluster or ORS near roaming group) the Mobile Print Server is able to operate on all of them, but just one is connected at the same time. Once the connected print server is unavailable the MPS tries to reconnect to another one.
Options
Option | Default | Description |
hostIP | 127.0.0.1 | IP address of the print server (CML or ORS).
|
port | 9100 | Port number for a job transfer and a user authentication. |
webPort | 80 | Port number for HTTP communication used to receive the CML configuration.
|
secure | False | Enables secure HTTP communication used to receive the CML configuration.
|
Examples
<printServers><!-- Default settings - CML on the same IP address. --><add /><!-- CML IP address specified. --><add hostIP="168.192.0.1" port="9100" webPort="80" secure="true" /></printServers>Error recovery
During processing of new jobs at one point a converted PDF file is created and sent to print server (CML or ORS), this is usually the time where occasionally Antivirus SW can lock the converted file and the the printing process fails. To circumvent this situation a retry mechanism exists in Mobile Print, that will attempt to access the file multiple times with defined delay in between attempts.
Options
Option | Default | Description |
fileReadAttempts | 10 | Number of attempts to open file before giving up. |
fileReadAttemptDelaySeconds | 2 | Delay between attempts to open a file. |
Examples
<errorRecovery fileReadAttempts="10" fileReadAttemptDelaySeconds="2"/>Windows service recovery settings for the Mobile Print Windows service
Since SafeQ6 MU26 the Windows service of Mobile Print is installed with error recovery settings set to:
First, second and subsequent failures of the service result in restarting of the service after 1 min
(Forceful) stopping of the Mobile Print Windows service
Either when MPS Windows service gets manually stopped or an unhandled exception occurs a stopping routine within the service is initiated
This stopping routine has a timeout for its graceful completion defined in seconds, that is configurable locally in mps.config with recovery errorRecovery → gracefulServiceStopTimeoutSeconds
If the stopping routine is unable to finish gracefully in the defined timeout the service is forced to shutdown (to avoid possible deadlock or hanging during stopping of itself)
Options
Option | Default | Description |
gracefulServiceStopTimeoutSeconds | 30 | Timeout that is given internally to Mobile Print Window service stopping routine to stop the service gracefully, after the timeout the service is internally terminated |
Examples
<errorRecovery gracefulServiceStopTimeoutSeconds="30"/>Password encryption
To additionally encrypt email password, use CML web interface. Otherwise, the password will be displayed as plain text and will be legible. To do so, use Text encryption tool in SafeQ CML web interface Dashboard.
Put the email password into the field and press Encode button.
Copy and paste your encrypted password into the mps.config file.
Example of mps.config
<?xml version="1.0" encoding="utf-8"?><mps defaultPaperSize="A4" correctSlideSize="false"> <!-- Use the parameter to overwrite the global SafeQ settings --><!-- AFTER CHANGING THIS CONFIGURATION PLEASE RESTART OR START THE "YSoft SafeQ Mobile Print" SERVICE MANUALLY. --><folderSources><!--<add host="" path="" userName="" password="" downloadInterval="1000"/>--><add host="127.0.0.1" path="C$\SafeQ5\server\mobile" userName="administrator" password="code,-3,5,98,45,18,-7,-125,-92" downloadInterval="1000" /></folderSources><emailSources><!-- Supported "type" values: Imap, Pop3 --><!--<add type="" host="" userName="" password="" port="" secure="true" implicitSecurityMode="true" numberOfConnections="5" ignoreCertificateChainErrors="false"/>--><add type="Imap" host="192.168.1.1" userName="mps@company.com" password="code,-41,-62,68,-106,13,21,-111,-57" port="143" secure="False" /></emailSources><printServers><!--<add hostIP="" port="9100" webPort="80"/>--><add hostIP="127.0.0.1" port="9100" webPort="80" /></printServers><failedFiles folder="Failed" maxAge="604800" /></mps>
Conversion configuration - conversion.config
In the conversion.config file two types of elements are present.
Option | Description |
For extension | This element describes the rules for processing the files according their types. Files not defined by this rule will not be processed. .pdf files are not converted and passed on to SafeQ without change, as it is a standard output format. All other formats need conversion to .pdf. By default, all the extensions are converted by the built-in:
If you want to configure Mobile Print Server to convert certain documents with other conveters, you can use:
|
Options | Here you can define a few options for the converters. For example if you want to use Libre Office application for conversion, you have to set a path to it. MS Office path is stored in the Windows registry and the Mobile Print application is able to get it automatically. Other converters don't need this as they are embedded in Mobile Print application. Also, if you want to convert plain text files (.txt) with Aspose using a specific font, specify it in options as in the example below. If not specified, Arial Unicode MS will be used, which can handle unicode characters like cyrylic, hiragana and others. |
Example
<?xml version="1.0"?><conversionConfig><!-- Mapping between extensions (use .ext format) and converters. --><for extensions=".doc, .dot, .docx, .dotx, .docm, .dotm, .rtf, .xml, .odt, .ott, .htm, .html, .xhtml, .mht, .mhtm, .mhtml, .xls, .csv, .xlsx, .xlsm, .xlsb, .xltx, .xltm, .ods, .ppt, .pptx, .pps,.ppsx, .pot, .potx, .odp, .txt, .fo, .svg, .xps, .epub, .bmp, .jpeg, .jpe, .jpg, .tif, .tiff, .png, .gif, .emf, .ico, .wmf" convert-by="aspose" /><!--Other converters:<for extensions=".ods, .odt, .odp" convert-by="libreOffice" /><for extensions=".bmp, .jpeg, .jpe, .jpg, .tif, .tiff, .png, .gif convert-by="iText" /><for extensions=".bmp, .jpeg, .jpe, .jpg, .tif, .tiff, .png, .gif convert-by="imageMagickCmd" /><for extensions=".txt" convert-by="textFile" />--><options><!--These options are supplied to all the converters when initialized. for example:<add key="conversionTimeout" value="300000" /><add key="asposePlainTextFont" value="Arial Unicode MS" /><add key="libreOfficePath" value="C:\Program Files (x86)\LibreOffice 3.6\program"/><add key="ensurePdfA" value="true"/><add key="pdfAConversionTimeout" value="120000" />--></options></conversionConfig>Tips and tricks
LibreOffice documents (.odt, .ods, .odp)
Some of more complicated LibreOffice documents may be converted incorrectly by Aspose converter. In this case please use LibreOffice converter (suported version LibreOffice 3.6) for the file conversion.
Images (.jpg, .gif, .png)
For .jpg, .gif and .png image formats, the default Aspose converter is slower than the alternative converters, especially with large files. If you expect high volumes of these and performance is critical, consider using ImageMagic converter for .gif and .png images and iText converter for .jpg images. Note that there might be some differencies between the converters especially in regards to page layout.
Text file (.txt)
If you expect processing large .txt files (exceeding 400 kB or 100 pages), consider using textFile converter which is significantly faster for large .txt. files than the default Aspose converter.
ensurePdfA
This option is disabled by default. When is enabled, a second conversion will run for every processed file (this will prolong the time of document processing). The output file will be a PDF/A-1a. Enabling this option (setting it to true) could help when special (national) characters are wrongly printed. Aspose conversion is usually used for this conversion, but if Ghostscript (version 9 and higher) is installed, it is automatically used instead of aspose.
This option could be also set to "try". It means that conversion to PDF/A-1a is run, but if this conversion fails, original pdf is used (so the overal processing result is still sucessfull).
When ensurePdfA option is enabled it will prolong the conversion time.
conversionTimeout and pdfAConversionTimeout
This options are timeouts used for basic conversion (conversionTimeout) and PDF/A-1a conversion (pdfAConversionTimeout). Option is set in miliseconds. If options is not set, not timeout is used.
Fonts configuration
Mobile Print Server uses fonts that are available in the system font folder as well as fonts stored in MPS custom folder (standard path is: <MobilePrintFolder>\Service\Fonts). Fonts used in LibreOffice and OpenOffice are distributed with Mobile Print Server in this folder.
If there is a need to use company specific fonts or more unusual ones not being part of the system distribution nor MPS distribution it is necessary to install these fonts on server where Mobile Print Server is running.
To install fonts you can either:
Copy fonts to directory <windir>\Fonts
ORInstall every font by double clicking on its source file
ORCopy fonts to directory <MobilePrintHome>\Service\Fonts
Encoding and fonts of text documents
While converting text documents to the PDF format Mobile Print Server needs to detect character encoding of the document, which is not always reliable. If the Mobile Print Server successfully detects the encoding it uses it for the text document conversion. On the other hand, if the detection fails, an encoding defined in the configurable property mpsDefaultEncoding (default value UTF-8) is used. Except from the default value administrator can define any other national encoding that best fits for his purposes (i.e. WINDOWS-1250, WINDOWS-1251 etc.)
Do not forget to set also proper font (for text files converted with Aspose convertor) that supports national characters if you encounter problems with encoding. This could be done within conversion.config file in options part: Arial Unicode MS or Calibri is recomended. The font must be present in the system.
<options><add key="asposePlainTextFont" value="Calibri"/></options>