Print Server Presentation and Operation Guide

The SAFE X3 print server processes the print requests coming from the different entities of one or more SAFE X3 solutions in a concurrent manner.

Depending on global system availability, each print request saved at the server level is addressed in a dedicated print process.

The entity that has submitted a request can ask the print server to either recover its current status, modify certain attributes, or delete it at any moment.

The following table shows the different sections of this document:

Installation / Uninstallation Configuration Server startup / stop Monitoring Technical architecture Printer management and error lists Support and troubleshooting

Installation / Uninstallation

Prerequisites

Before starting the installation of a print server, check the configuration requirements.

Installation

The installation program allows you to place the executable files, libraries, and other resources necessary for the correct execution of the Print Server in the folder of your choosing. The following tree structure is then created in the installation folder:

Uninstallation

Before uninstalling the Print Server, you first need to unpublish the SAFE X3 solutions attached to the Print Server by using the SAFE X3 Administration Console. After, you can go to the control panel and click Add/Remove programs.

Configuration

Like the other Server components of an X3 solution, the Print Server is configured using the Administration Console.

Users should not manually modify the configuration files produced and updated by the Administration Console.

For more information, refer to the Administration Console documentation.

Startup setup

These parameters allow the configuration of the technical execution environment of the Print Server.

They are stored in the adxeditionserverconfig.xml file in the Config folder and include:


Example of the adxeditionserverconfig.xml file:
    
      <AdxSrvImp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <config cap="Default configuration" id="DEFAULT">
          <general AdxSolPrf="DEFAULT" lang="ENG" log="0" port="1890" restartrpts="1" OdbcUserDSN="0" prefixname="Safe_X3_SE_V2" prefixtitle="Safe_X3_SrvEdt_V2_EDT_" description="Sage X3 PrintServer" user="FranckDep" pwd="" hostname="" installPath="" />
          <jobs max="300" purgetime="300" SuccessfulJobsStatusRetention="10" FailedJobsStatusRetention="15" vpalloc="40" />
          <log number="3" size="2000000" />
        <processes killtime="20" max="5" min="1" maxjobsbyprocess="10" />
      </config>
      </AdxSrvImp>
    
  

Parameters for the description of the attached SAFE X3 solutions

The print server can only process print requests coming from a SAFE X3 technology application that belongs to a published solution.

The parameters used to describe the SAFE X3 solutions attached to the print server are stored in the adxeditionserversolutions.xml file in the Config subfolder.

This file is updated by the SAFE X3 administration console after the publication of a solution.

The tree structure of the file describes a solution profile. This notion is reserved for future use. Currently, only the ADMIN profile code is used.

Each profile has 1 to n solutions, and each solution contains:

Advanced settings

To be able to run a print server Windows service with a non-administrator user, you can add or modify the REG_DWORD registry entry with a suitable value:


To be able to turn on debug mode for the Crystal Report U212Ltext.dll embedded functions, you can add or modify the REG_SZ registry entry with a suitable value:


Server startup / stop

A Print Server can be started in Console mode or in Windows service mode.

The function of the server is strictly identical in both modes.

The only difference is that in Console mode, server activity is displayed on the screen in the Windows panel.

During the first server configuration from the SAFE Administration Console, the Console automatically creates a Windows Service, associated with the server by default.

You can start and stop this service from the administration console. You can also use standard tools in the Windows system to administer and control the service.

Note: The Print Server startup options described below are available both in Console and Windows Service modes.


Example of a command for server startup and the corresponding output:
    AdxSrvImp.exe /noservice /d /verbose /noodbc
  

Launching PrintServer

Monitoring

You can follow the server activity by consulting the activity log file, Windows Events Viewer, or by accessing the Print Monitor function available in each SAFE X3 folder. This function is available even if the server has not been started with the /d log file option.

Monitoring window

Connect to the print monitor function (PSIMP) in Classic mode to display this window. Enter the name and port of the Print Server to display data related to the server activity.


PSIMP function

From this screen, you can:

Monitoring: Service REST

To monitor the Print Server with REST, you need the latest Syracuse Web server.

Note: It is only possible to monitor the Print Server with REST from Print Server 2.29 (2023.10 - 2023 R2) and SyracuseWeb Server 12.0.34 (2023.09 - 2023 R2).

You can monitor the Print Server with REST through the PSIMP page:


PSIMP

Example:

GET http://SyracuseHostname:8124/print/PrintServerHostName:1890/$jobs
  
    
    [
      {
        "order": 1,
        "rank": 15,
        "processId": 0,
        "state": "Finished",
        "serverDuration": 883,
        "processDuration": 10,
        "status": "OK",
        "phase": "Printing is completed.",
        "destination": "File",
        "report": "ATABLIST.rpt",
        "application": {
          "folder": "SEED10",
          "host": "FRPO402328.sagefr.adinternal.com",
          "port": "20130"
        },
        "user": "ADMIN",
        "workstation": "FRPO402328.sagefr.adinternal.com",
        "linked": null
      }
    ]
    
  

You can also interrogate the REST Web service with a web browser or with Postman.

To do this, you need to authenticate with admin/admin online.

After anthenticating, you can interrogate the REST webservice.

Example of an interrogations with PrintJobs:

http://aws-x3-indcloud.sagex3rd.local:8124/print/aytrad.sagex3rd.local:1890/$jobs
  "processId": number [0- 65535]. If processId == 0, means the Print process is finished, otherwise, processId > 0
  "state": string ["Finished" / "InProgress" / "Standby"]
  "status": string ["OK" / "Error"]. Current status of the process. "OK" doesn't mean the process is finished. 
  "serverDuration": time elapse since the process was started. This time is incrementing as long as the job or its status are in the list, even if the process is finished.
  "processDuration": processing time for this job
  

Activity log file and exception log file

The activity log file records saving, submission, termination, and deletion events related to a print request.

The exception log file records all errors and anomalies detected by the server.

These log files are activated and set up by the server administration console.

Note: The exception log file automatically inherits the setup of the activity log file. Refer to Configuration for more information.

Windows Events Viewer

All the information, warnings and error messages issued by the print server or one of the print processes are displayed in the Windows Events Viewer.

Technical architecture

The diagram below shows the simplified technical architecture of the print server.

Technical architecture

Principles

The Print Server is a multiprocessing server which maintains and controls a pool of specialized processes.

The production of Crystal Report reports is the only function of these processes.

The server manages the preparation and formatting of all the information necessary for the correct production of printouts and the execution of the print processes.

The main logical components of the server are described below:

Printer management and error lists

The following set of rules make sure the printing operation is carried out correctly:

Error codes and messages

The message associated with an error code refers to the following:

The error codes generated by the Print Server are referenced below:

Print Server error codes

Code Explanation
251 Waiting time exceeded when an attempt is made to access a shared memory segment.
252 An attempt to access a shared memory segment was stopped.
253 Failure during an attempt to access a shared memory segment.
254 Unable to release the synchronization object to access a shared memory segment.
255 Unable to write data in a shared memory segment.
256 Unable to read data in a shared memory segment.
257 Unable to delete data in a shared memory segment.
258 Unable to recover the reference associated with the print request number.
259 Too many requests in the pending request stack.
260 Error during the submission of a file transfer request.
261 The SAFE X3 solution description has not been found in the solutions description file.
Check values for parameters received '__APPLICATION=', '__APPRPT=', '__ADXSOL=', '__DBSERVER=', '__DBDATABASE='.
Check if this solution is descrived in config `file adxeditionserversolutions.xml`
262 The connection to the SAFE X3 file server has failed.
263 Unable to open the configuration file of the print server.
264 Error during the initialization of the print server configuration file.
265 Error during the analysis of the print server configuration file.
266 The total length of the execution parameters for the report is too large. Contact the system administrator.
267 Error during the storage of the execution parameters of the report. No group memory available.
268 Error during the reading of the execution parameters for the report.
269 Error during the deletion of the execution parameters for the report.
270 Error during the memory transfer of the execution parameters for the report.
271 Unable to launch a print process.
272 The initialization context for a print process is absent or has failed.
273 The print request could not be submitted (request not ready).
274 The print request could not be submitted (unable to activate the thread).
275 Error generated by the print engine.
276 The command line option is unknown.
278 Unknown error.
279 Error upon log file initialization.
280 Error upon opening the "Recovery" files.
281 Unable to recover a Web preview request.
282 Unable to recover an already faulty request.
283 Error upon reading the "Recovery" files.
284 Error upon saving a "Recovery" request.

Error codes in the cache management module

Code Explanation
181 Root folder for the cache is not found.
182 "Application" folder not found.
183 Unable to access the registry database.
184 Sage X3 server type unknown.
185 Transfer type not supported.
186 File type unknown.
187 Error upon access/transfer with SAFE X3 (SADFSQ) file server.
188 Error during the conversion of a character string in Unicode.
189 Error during the creation of the cache structure.
190 The current session of the cache manager is not initialized.
191 Error on opening a local file.
192 The file server requested does not exist.
193 Unable to open the local file.
194 Unable to open the server file.
196 The local file requested does not exist.
199 Unable to establish a connection with the distant server.
200 Error in the reading/writing of the file.
201 Unable to compare the Timestamps.
202 Error during the conversion of a Timestamp to the system date.
203 Error upon deletion of an "Archive" type folder.
204 Error upon restoration of an "Archive" type folder.
205 The server archive files could not be found.
239 Unknown error.

Error codes for the Windows service management module

Code Explanation
361 Unable to open the "Service Control Manager".
362 Unable to open the requested service.
363 Unable to delete the service.
364 Unable to stop the service.
365 Unable to stop the service. Number of attempts exceeded.
366 Unable to start the service.
367 Unable to start the service. Number of attempts exceeded.
368 Unable to perform the operation. The service is already started or in the process of being started.
369 The service already exists.
370 Unable to create the service.

Error codes of the SAFE X3 solutions management module

Code Explanation
231 Unable to determine the installation folder for the 'SAFE X3 Solutions' file.
232 Unable to open the 'SAFE X3 Solutions' file.
233 Unable to start the analysis of the 'SAFE X3 Solutions' file.
234 An error has occurred during the analysis of the "SAFE X3 solutions" file.

Error codes in the ODBC management module

Code Explanation
311 Unable to determine the installation folder for the 'SAFE X3 ODBC Description' file.
312 Unable to open the 'SAFE X3 ODBC Description' file.
313 Unable to start the analysis of the 'SAFE X3 ODBC Description' file.
314 An error has occurred during the analysis of the "SAFE X3 ODBC Description" file.
315 The driver description has not been found in the "SAFE X3 ODBC Description' file.
316 Error during the deletion/creation operation for the ODBC data sources.
317 Error during the creation of an ODBC data source.
318 Error during the call to an ODBC configuration API.
319 Unable to open the "TnsNames.ora" file.
320 Unable to read the "TnsNames.ora" file.
321 Unable to update the "TnsNames.ora" file.
322 Unable to recover the installation information for the Oracle*Net client.
323 Unable to find the Oracle*Net "Tnsnames.ora" configuration file.
324 Unable to allocate a temporary file to backup the Oracle*Net "Tnsnames.ora" file.
325 Unexpected error during the configuration of an ODBC source.
326 Error during the call to a Sql ODBC API.
327 The connection test for the ODBC data source has failed.
328 The description parameters for the source have errors or are incomplete.
329 Unable to create the ODBC data source.
330 The data source specified does not exist.

Support and troubleshooting

Printer management

The following rules must be observed for the Print Server to be able to print correctly:

Cannot detect previous installed version after a setup crash

When a Print Server setup crashes, it sometimes cannot detect the previous version anymore.

When that happens, we need to restore registry entries.

To restore registry entries, a file needs to be created and executed with the following content:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sage Safe X3 V2 Print Server]
    "DisplayName"="Sage Safe X3 V2 Print Server"
    "UninstallString"="\"C:\\Program Files\\Java\\jre1.8.0_77\\bin\\javaw.exe\" -jar \"D:\\Sage\\SafeX3\\PRTSRV\\uninstaller\\uninstaller.jar\""
    "DisplayVersion"="EDT.226"
    "Publisher"="Sage"
    "DisplayIcon"="D:\\Sage\\SafeX3\\PRTSRV\\Uninstaller\\UninstallerIcon.ico"
  

No installed Printer

By default, no printer is attached to the Windows account Local System.

In case the Print Server is started in Windows Service mode, it is essential to specify a startup account different from the Local system account so that the Print Server can address one of the printers in your organization.

The user account under which the Print Server has been started in either Console mode or Windows Service mode must at least have a printer configured.

Activation of the log files

All errors are logged in the application log of the Windows Event Viewer, even if the Print Server trace mode has not been enabled.

If an issue cannot be reproduced, the customer needs to activate traces, play the issue, and send SAGE the traces.

Example:

    C:\Sage\SafeX3\EDTV2\EDTSRV\srvedit\Temp\AdxSrvImp_Trace.log
    C:\Sage\SafeX3\EDTV2\EDTSRV\srvedit\Temp\RPT_Trace_ZTESTKO_CrDll_SBELU92.log
    

Example to modify the Print Server service:

    sc config "Safe_X3_SE_V2DEFAULT" binPath= "\"c:\Sage\SafeX3\EDTV2\EDTSRV\srvedit\AdxSrvImp.exe\" /d"
    [SC] ChangeServiceConfig réussite(s)
    

Example to modify the arguments in Service:

Add traces

Note: In this case, the debug mode will be effective only for the first time you launch the service.

Excerpt of the C:\Sage\SafeX3\EDTV2\EDTSRV\srvedit\Temp\AdxSrvImp_Trace.log file:


    **** Function : SrvImpSuper_newRptJob - [3/20 12:53:52:750] ****
        - Receipt of a new print request - JobId : 1 - [Date : 3/20 12:53:52:750]
        - JobId Settings 1 :
          _FormatExport=_28
          __REPORT=_TABCOUNTRY.rpt
          __DESTINATION=_3
          __TYPDBA=_2
          __DBDATABASE=_v12026x3
          __DBUSER=_SEED
          __DBPASSWORD=***
          +X3IMP=_matrixw19sql.sagex3rd.local:1890
          __wJobID=_SEED-9945-20230320125352-28
          __WSTATION=_MATRIXW19SQL.sagex3rd.local
          __CDUSER=_ADMIN
          __ADXSOL=_V12026X3
          __APPLICATION=_SEED;matrixw19sql.sagex3rd.local;20100
          __APPRPT=_X3;matrixw19sql.sagex3rd.local;20100
          __RPTLAN=_ENG
          X3DOS=_SEED;matrixw19sql.sagex3rd.local;20100;150;ENG
          __RUNTIME=_MATRIXW19SQL.sagex3rd.local;20100
          __JOBLINKED=_
          __REQUETE=_2322986
          _PreVisuOptions=11111111111111111111
          _Orientation=_0
          _PaperSize=_1
          X3CLI=_SEED folder
          X3EDT=_Report Sage Copyright
          X3ETA=_TABCOUNTRY
          X3TIT=_Country
          X3OPE=_System Administrator
          X3USR=_ADMIN
          X3LAN=_ENG
          X3SIT1=_*
          X3SIT2=_z
          X3PRF=_ADMIN
          X3FCT=_ 
          X3SIT=_
          paysdeb=_ 
          paysfin=_zzzzzzzzzz
          impselections=_0
  
Excerpt of the C:\Sage\SafeX3\EDTV2\EDTSRV\srvedit\Temp\RPT_Trace_TABCOUNTRY_CrDll_SEED1.log file:
     File destination: preparing Crystal Report
     Issue file: c:\Sage\SafeX3\PRTSRV\Temp\SEED-9945-20230320125352-28_
     Excel format, data only: preparing Crystal Report
     CrystalReport start process Document -  3/20/2023 12:53:54 PM
     File destination: processing by Crystal Report
     ** Stage: CrystalReport Document has been processed - Duration: 00:00:01.7220328
     ** Stage: CrystalReport Document completed - Duration: 00:00:01.7230337
     Dispose CrystalReport Document - 3/20/2023 12:53:54 PM 
     Memory current process : 74 MB / Total Memory: 10399 MB / Free Memory: 907 MB  -  3/20/2023 12:53:55 PM
     Current process CPU usage : 19.983 % CPU  /  Global CPU usage : 48.39094 % CPU 
    End of print process - 3/20/2023 12:53:55 PM
  

Trace mode of UFLs DLLs

u212ltext.log is generated in Temp folder below the Print Server install path.

Example:

c:\Sage\SafeX3\EDTV2\EDTSRV\srvedit\Temp

Notes:

Example of activating the file via key in the registry:

  HKEY_LOCAL_MACHINE\SOFTWARE\Adonix\SRVIMP\0,1,5,0\REPORT\U2LTEXT_TraceMode : ON/OFF
  

Modules.exe

CR tools allow to see the versions of DLLs/Assemblies loaded in memory. These are used for:

Enable logs in SAP VS Studio Crystal Report

For Crystal Report 2016 and 2020. To use Crystal Reports Designer 2016 and 2020, the Print Server version must be ≥ 2.18.

To enable logs in Crystal Report, save this file with the .reg extension (for example, with the name enableLog.reg) and execute it.

    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
    [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
    "Destinations"=dword:00000003
    "Position"=dword:00000003
    "LogErrorsOnly"=dword:00000000
    [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
    "Destinations"=dword:00000003
    "Position"=dword:00000003
    "LogErrorsOnly"=dword:00000000
    [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
    "Destinations"=dword:00000003
    "LogErrorsOnly"=dword:00000000
    "Position"=dword:00000003
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
    "Destinations"=dword:00000003
    "Position"=dword:00000003
    "LogErrorsOnly"=dword:00000000
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
    "Destinations"=dword:00000003
    "Position"=dword:00000003
    "LogErrorsOnly"=dword:00000000
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
    "Destinations"=dword:00000003
    "LogErrorsOnly"=dword:00000000
    "Position"=dword:00000003
  
Logs are located in the User Profile TEMP directory: C:\Users\[userId]\AppData\Local\Temp. The UserId is the account Id linked to the Print Server service. It is this account that launches the Print processes. Inside that folder, log files show up with the .glf extension.
  AdxImpNet_bkgrnd_51664_2020_05_06_12_07_24_340_trace.glf
  AdxImpNet_Diagnostics_51664_2020_05_06_12_07_23_199_trace.glf
  AdxImpNet_functions_51664_2020_05_06_12_07_23_205_trace.glf
  
How to disable logging:
  Windows Registry Editor Version 5.00
  [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
  [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
  "Destinations"=dword:00000000
  "Position"=dword:00000000
  "LogErrorsOnly"=dword:00000000
  [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
  "Destinations"=dword:00000000
  "Position"=dword:00000000
  "LogErrorsOnly"=dword:00000000
  [HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
  "Destinations"=dword:00000000
  "LogErrorsOnly"=dword:00000000
  "Position"=dword:00000000
  [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging]
  [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.bkgrnd]
  "Destinations"=dword:00000000
  "Position"=dword:00000000
  "LogErrorsOnly"=dword:00000000
  [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.diagnostics]
  "Destinations"=dword:00000000
  "Position"=dword:00000000
  "LogErrorsOnly"=dword:00000000
  [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Logging\crpe.functions]
  "Destinations"=dword:00000000
  "LogErrorsOnly"=dword:00000000
  "Position"=dword:00000000
  

Font size reduced when exporting to PDF

When you use some specific fonts like BarCodes (BarcodeEAN13) and export a report to PDF format, the font size can be slightly reduced compared to the size that appears in the Crystal Reports designer and in printed output.

The CrystalReport PDF export engine can be modified to incorporate a new algorithm that positions characters precisely to prevent truncation from ocurring while maintaining the correct font size. This algorithm can be activated and controlled by two new registry keys. These keys are:

The UsePrecisePositioningForText key turns on the new functionality when it is set to 1. When this functionality is activated, the ForceLargerFonts key is ignored.

The TruncationAdjustment key controls a width calculation rounding function in the new algorithm and accepts values between 0 and 10 inclusively.

The default value of 2 has been tested to sufficiently eliminate most truncation issues. If truncation is still observed, this value can be increased for added granularity.

Known Limitations

When the UsePrecisePositioningForText key is turned on, there are several side-effects:

Chinese characters not correctly displayed in PDF

Chinese or arabic characters are not correctly displayed in PDF document generated by the Print Server.

These characters could come from formula or the database, or be stored in localmenus.



Example of a field containing a formula:

  textofchapter("SEED;matrixw19;20101",{?X3LAN},1,2)
  

See the SAP Crystal Report for this issue

To fix this issue, please edit your report with Crystal Report Designer, choose the field containing the formula and change the font from Arial to Arial Unicode MS.

Since Print Server 2.24 (2021.07 - 2021 R3), a new feature avoids all your reports and replaces every text field using Arial and replacing Arial font by Arial Unicode MS automatically.

To activate this feature, pleace edit your registry and this key:

    Subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ADONIX\SRVIMP\0,1,5,0\GENERAL
      - Entry: ForceUnicodeFont
      - Value Type: REG_SZ, string
    Valid values Range: [0-1] or [ON - OFF] 
    0: Conversion feature is turned OFF 
    1: Convert all fields using "Arial" font to "Arial Unicode MS" to avoid any issues with Asian characters
    
    The default font used for unicode is 'Arial Unicode MS',  to change this default font, create or edit this registry key 'UnicodeFont' : 
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Adonix\SRVIMP\0,1,5,0\REPORT
    UnicodeFont : "Arial Unicode MS"
    UnicodeFont : "GNU Unifont"
  

Since Print Server 2.25 (2022.01 - 2022 R1), you can force every field to use a specific Non Unicode font. To active this feature, please edit your registry and this key:

    Add registry parameter:
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Adonix\SRVIMP\0,1,5,0\REPORT
    ForceNonUnicodeFont : 1

    Add registry 'NonUnicodeFont' to specify NON UNICODE fonts to use. 
    The default font used for non unicode is 'Courier New',  to change this default font.
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Adonix\SRVIMP\0,1,5,0\REPORT
    NonUnicodeFont : "Courier New"
  

PrintServer registry

Special fonts embedded in PDF documents

If you're using non standard fonts in your reports for BarCodes, specific fonts for icons, bank checks and so on, you need to check the licence and properties of the font.

The licence determines if the font can be embedded in PDF documents or not.


Special fonts

To verify the embedded security level of a font, review the font properties.

If the security level contains No-embedding permissions, then exporting to PDF will not be successful.

For the utility to allow you to view the embedded security level of a font, download the font properties extension from Microsoft's web site.

True Type Fonts (TTF) has embedding permissions that determine if they can be converted into an embedded font format.

The permissions associated with the embedded security level of a font are as follows:

You can find more information on special fonts in the following links:

User function Libraries U212LText.dll and U212ltoword

Crystal Report extensions to publish proprietary functions from a SAP Crystal Report form field.

Depending on the use case, these DLLs are loaded by Crystal Report Designer and/or CRPE .Net.

They are never directly loaded by the Print Server (AdxSrvImp and AdxImpNet), but called by SAP CR Engine or SAP CR Designer.

Location on the Sage Print Server station:

  C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
  and Print Server <= 2.27. Note: C:\Windows\crystal doesn't exist since Print Server 2.25.
  C:\Windows\crystal
  

Directory C:\Windows\crystal, containing U212IText.dll, U212Itoword.dll and u2lbcode.dll, is no more created and used by the Print Server >= 2.28. For Print Server >= 2.28:

  C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64
  used by SAP Crystal Reports Designer 2020
  
  C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
  used by X3 Print Server and SAP Crystal Reports Designer < 2016
  
  C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86
  used by SAP Crystal Reports Designer 2016
  

U212LText.dll

Supports menu-local and translatable text fields.

It is applied to cache-managed resource files.

These specialized functions allow you to insert or perform specific calculations on data managed by the X3 information systes and can be incorporated into Crystal Reports intended to run in an X3 application.


Behavior of U2LText functions when there is no local menu description:

Menus are downloaded by the Print Server from the current X3 folderID and stored in its filesytem: c:\\Sage\srvedit\Data\[Folder]_[Hostname]_[Runtime Port]\GEN\ALL\MENL. For example:

  C:\Sage\SafeX3\EDTV2\EDTSRVFRDEP\srvedit\Data\SEED_po027493_20192\GEN\ALL\MENL
  

The dir C:\Sage\SafeX3\EDTV2\EDTSRVFRDEP\srvedit\Data\SEED_po027493_20192\GEN\ALL\MENL file contains the following data:

    menuarb
    menuaus
    menubra
    menubri
    menuchi
    menueng
    menufra
    menuger
    menuita
    menupol
    menupor
    menus
    menuspa
    textraarb
    textraaus
    textrabra
    textrabri
    textrachi
    textraeng
    textrafra
    textrager
    textraita
    textrapol
    textrapor
    textraspa
  

Excerpt of the menueng file:

    1
    NO
    No
    Yes
    |
    2
    RCMAD>< Previous
    > Last
    X Sel
    Table
    # Code
    Page +
    Page -
    End
    Ex
    |
    3
    123
    Yes / No
    Total / Inquiry
    Object
    |
    4
    DOH
    Decimal
    Octal
    Hexadecimal
    |
    5
    35
    3 ½ inches
    5 ¼ inches
  

Function TextForCode

This function returns the label associated with the message number of a SAGE X3 field.

By default, the description is returned in the connection language.

Parameters:


Note: The function uses the menus and menu [lang] files as input. For example:
  TextForCode("PRODV140;prodsrv;1940;140;ENG","ACONSULT.MODULE", 8)
  

Function TranslatedTextForCode

is function returns the label associated to a message number from an X3 field, in the requested language.

Parameters:


For example:
  TranslatedTextForCode("PRODV140;prodsrv ;1940;140","FRA","ACONSULT.MODE", 8)
  

Function TextOfChapter

This function returns the label associated with the message number of an X3 local menu, in the requested language.

Parameters:

For example:

  TextOfChapter("PRODV140;prodsrv;1940;140","FRA", 2229, 8)
  

An example with variables:

  textofchapter({?X3DOS},{?X3LAN},1,3)
  

Function X3TranslatedText

This function returns the label associated with the alphanumeric key of an application text, in the requested language.

Parameters:

For example:

  X3TranslatedText ("PRODV140;prodsrv ;1940 ","SPA", "PFOOTINV~SHOAXX~50~ ~" )
  

Example:


X3TranslatedText

Debug U212LText:

U212LText.dll offers support for menu-local and translatable text fields.

It is applied to cache-managed resource files.

Registry:

  HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Adonix\SRVIMP\0,1,5,0\REPORT
  PrintEngine : 0
  U2LTEXT_TraceMode : OFF
  U2LTOWORD_TraceMode : OFF
  

U2LTEXT_TraceMode can be set to ON or OFF depending if trace is activated or disabled.

If trace is activated, the resulting log file name is named U212ltext.log and is generally saved in the temp directory Documents & Settings of the user profile.

Example:


  C:\Users\frdepo\AppData\Local\Temp\U212ltext.log
  

Example of a U212ltext.log file:

        *****************************************
        *	Sage® X3 Print Services	*
        *	 U212LText.dll Trace File		*
        *****************************************

  ==> Start Fct [InitForJob] - Id [4]
    - INFORMATION : DLL Version  [EDT.2.999]
    - INFORMATION : DLL Location [C:\windows\crystal\U212LText.dll]
    - INFORMATION : Caller Module Name[Edition Server V5 (220000)]
    - INFORMATION : Caller Module Full Name[C:\Source\X3\print-server224\src\server\bin\Debug\ConsolePrintNet.exe]
    - INFORMATION : Start Time   [3/30 21:33:40:958]
    - WARNING : Unable to find Default Language in General Registry [Software\Adonix\x3\0,1,4,0\]
  

Note: The Dll file was located in C:\windows\crystal\U212LText.dll until Print Server 2.27.


U212ltoword.dll

AmountToWord: Conversion of amounts into letters (multi-language/multi-currency) relies on language/currency description files delivered.

Special Features:

The supported languages are:

File location: The U212ltoword.dll library must be placed under C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86 of Program Files (x86) installation directory.

The 8 text files .txt must be placed in the sub-directory lan from the installation directory of the Print Server.

  X3CurFRA.txt
  X3CurENG.txt
  X3CuDEU.txt
  X3CurSPA.txt 
  X3CurITL.txt 
  X3CurPOR.txt 
  X3CurNLD.txt 
  X3CurDFT.txt
  

Each text file contains the definition of currencies of a managed language. The X3CurDFT.txt file contains the default language as well as the definition of the default currencies.

File structure:

  #FRA
  BEF;franc belge;francs belge;centime;centimes
  ESP;peseta;pesetas;;
  EUR;euro;euros;centime;centimes
  DEM;deutsche mark;deutsche marks;pfennig;pfennig
  FRF;franc;francs;centime;centimes
  FRS;franc suisse;francs suisse;centime;centimes
  GBP;livre;livres;penny;pence
  GRD;drachme;drachmes;;
  ITL;lire;lires;centesimo;centesimi;
  JPY;yen;yens;sen;sen
  LUF;franc luxembourgeois;francs luxembourgeois;centime;centimes
  PTE;escudo;escudos;;
  USD;US dollar;US dollars;US cent;US cents
  

Note: FRA is the default language. It is only used in the X3CurDFT.txt file. The other lines define the currencies for a language.

Function AmountToWord

Description of the AmountToWord formula.

Arguments:

Note: If the language set as parameter to AmountToWorld is not supported, the program will look for the default language in the default currency file. The default language is indicated in file X3CurDFT.txt.

Example:

  #ENG define English as default language.
  

Example:

  AmountToWord("PRODV140;prodsrv;1940 ", "SPA" "EUR", 256.80)
  

Function AmountToDigit

Description of the AmountToDigit formula.

Arguments:

Note: If the decimal display flag is equal to True, the note for the AmountToWord formula also applies here.

Debug U212ltoword

Registry:

  HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Adonix\SRVIMP\0,1,5,0\REPORT
  U2LTOWORD_TraceMode: ON/OFF
  
Print-server U2LTOWORD_TraceMode DEBUG

If the value of the key U2LTOWORD_TraceMode is ON, DebugMode is activated.

This means every call to the U212ltoword library, from SAP Crystal Report Designer or from the Print Server calling SAP Crystal Report Engine, will write to a log file named u212lToWord.log localized in the TEMP to the user running the dll.

Example:

C:\Users\frdepo\AppData\Local\Temp\u212lToWord.log

Example of the content of u212lToWord.log:

            *****************************************
            *   Sage® X3 Print Services *
            *    U212LText.dll Trace File       *
            *****************************************
  ==> Start Fct [InitForJob] - Id [2]
      - INFORMATION : DLL Version  [EDT.9.9]
      - INFORMATION : DLL Location [C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\U212IText.dll]
      - INFORMATION : Caller Module Name[Unknown (0)]
      - INFORMATION : Caller Module Full Name[C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win64_x64\crw64.exe]
      - INFORMATION : Start Time   [5/15 14:12:19:566]
  ==> End Fct [InitForJob] - Id [2]
  ==> Start Fct "TextForCode" - [5/15 14:12:19:609]
          - Keys : SEED10;frpo402328;20130 (Folder/Host/Port) SEED10/frpo402328/20130
      - Application parameter : [SEED10;frpo402328;20130] with final CdLang [ENG]
      - Application version is : [150]
      - INFORMATION : Before to load Menu [645] from [c:\Sage\SafeX3\PRTSRV\Data\SEED10_frpo402328_20130\GEN\ALL\MENL\menuENG] - [5/15 14:12:19:651]
      - INFORMATION : Statement processed without error. Raw value: 'Invoice' -  UTF8 Value returned: 'Invoice'
  ==> End Fct "TextForCode" -  - [5/15 14:12:19:668]
  ==> Start Fct "TextForCode" - [5/15 14:12:19:681]
      - Application parameter : [SEED10;frpo402328;20130] with final CdLang [ENG]
      - Application version is : [150]
      - INFORMATION : Menu [645] found in cache
      - INFORMATION : Statement processed without error. Raw value: 'Debit note' -  UTF8 Value returned: 'Debit note'
  ==> End Fct "TextForCode" -  - [5/15 14:12:19:737]
  ==> Start Fct [TermForJob] - Id [2]
  ==> Release gpMenu
      - INFORMATION : Stop Time [5/15 14:13:33:962]
  ==> End Fct [TermForJob] - Id [2]
  

Note: Since Print Server >= 2.28, AmountToWordTest calls the function AmountToWord() contained in the library U212ltoword.dll in the command line:

  AmountToWord TU
  Usage AmountToWordTest.exe -lang [ENG, FRA, ITA... ] -cur [EUR, USD, ...]  -start [number]   -end [number]

  AmountToWordTest.exe -lang FRA -cur EUR -start 3 -end 10

  AmountToWord 3.000000 EUR  ENG  three Euros
  AmountToWord 4.000000 EUR  ENG  four Euros
  AmountToWord 5.000000 EUR  ENG  five Euros
  AmountToWord 6.000000 EUR  ENG  six Euros
  AmountToWord 7.000000 EUR  ENG  seven Euros
  AmountToWord 8.000000 EUR  ENG  eight Euros
  AmountToWord 9.000000 EUR  ENG  nine Euros
  AmountToWord 10.000000 EUR  ENG  ten Euros
  

Parameters sent to the Print Server

**** Function : SrvImpSuper_newRptJob - [1/17 15:38:10:6] ****
    - Réception d'une nouvelle demande d'impression - JobId : 1 - [Date : 1/17 15:38:10:7]
    - Paramètres du JobId 1 :
      _FormatExport=_29
      _PrinterName=_\\ser-psafo02\SAGEPRINTER
      _PrinterServer=_vcsx3v11.sagefr.adinternal.com:1890
      _PrinterDriver=_KONICA MINOLTA C364SeriesPCL SP
      _PrinterPort=_SECURE,SECURE2
      _PrinterDescriptionEx=_1|000258|000009|||
      _Orientation=_0
      _PrinterCopies=_1
      _PrinterCollate=_0
      _PrinterStartPage=_1
      _PrinterStopPage=_9999
      __REPORT=_TABCOUNTRY.rpt
      __DESTINATION=_1
      __TYPDBA=_2
      __DBDATABASE=_x3v11sql
      __DBUSER=_SUPERV
      __DBPASSWORD=***
      +X3IMP=_vcsx3v11.sagefr.adinternal.com:1890
      __WSTATION=_VCSX3V11.sagefr.adinternal.com
      __CDUSER=_ADMIN
      __ADXSOL=_V11SQL
      __APPLICATION=_SUPERV;vcsx3v11.sagefr.adinternal.com;18111
      __APPRPT=_X3;vcsx3v11.sagefr.adinternal.com;18111
      __RPTLAN=_FRA
      X3DOS=_SUPERV;vcsx3v11.sagefr.adinternal.com;18111;150;FRA
      __JOBLINKED=_
      __REQUETE=_5042306
      _PreVisuOptions=11111111111111111111
      X3CLI=_SEED folder
      X3EDT=_Etat Sage X3 Copyright Sage
      X3ETA=_TABCOUNTRY
      X3TIT=_Pays
      X3OPE=_Administrateur système
      X3USR=_ADMIN
      X3LAN=_FRA
      X3SIT1=_*
      X3SIT2=_z
      X3PRF=_ADMIN
      X3FCT=_ 
      X3SIT=_
      paysdeb=_A
      paysfin=_A
      impselections=_0
  
Print-server destinations

_FormatExport

Exports a file to a specific format. By default, the export format is PDF.

The main supported formats in the Print Server engine and Crystal Report are:

A default export format is stored for each destination (PREVIEW, EXCEL, PRINT, etc) in the database.

    _FormatExport=29
    CRYSTAL_FORMAT_RPT					1	// Seagate Crystal Reports (RPT)
    CRYSTAL_FORMAT_WORDWIN				3	// Word for Windows
    CRYSTAL_FORMAT_RTF					5	// RTF
    CRYSTAL_FORMAT_TEXT					9	// Text 
    CRYSTAL_FORMAT_EXCEL8TAB			28	// Excel 8 étendu
    CRYSTAL_FORMAT_PDF					29	// PDF
  

A default export format is stored for each destination (PREVIEW, EXCEL, PRINT, etc) in the database.

The default format is linked to a destination is stored in table [SCHEMA].[APRINTER], field PRTFMT_0:


Print-server destinations

__DESTINATION

  __DESTINATION=_1 
  CRYSTAL_DESTINATION_WINDOW: 0, 
  CRYSTAL_DESTINATION_PRINTER: 1, 
  CRYSTAL_DESTINATION_MAILMAPI: 2, 
  CRYSTAL_DESTINATION_FILE: 3, 
  CRYSTAL_DESTINATION_MAILVIM: 4, 
  CRYSTAL_DESTINATION_NOTES: 5, 
  CRYSTAL_DESTINATION_EXCHANGEFOLDER: 6
  

__TYPDBA

  __TYPDBA=_2 (ODBCCFG_DB_ORACLE: 1, ODBCCFG_DB_SQLSERVER : 2)
  

__DOCUMENT

Manages printing attachments.

One or several files separated by character ";" can be linked to a report.

Example with two attached documents:

  __DOCUMENT=_c:\\Sage\\LOCAL95\\dossiers\\SEED\\DEC\\ATTACHED1.pdf;c:\\Sage\\LOCAL95\\dossiers\\SEED\\DEC\\ATTACHED2.pdf"
  

These files are printed if destination==Printer. Otherwise, the destination is considered as file, and they are copied to a folder specified in the parameter _ExportFile.

_ExportFile

_ExportFile is linked to the parameter __DOCUMENT to indicate a destination folder for attached documents.

This value is read only if CRYSTAL_DESTINATION_FILE is set to 3. Otherwise, it will be ignored if the destination is a real printer (CRYSTAL_DESTINATION_PRINTER: 1).

Example:

  _ExportFile="C:\\Sage\\LOCAL95\\dossiers\\SEED\\EINV\\"
  

Note: Attached documents specified in the parameter __DOCUMENT will be copied to this folder.

_Orientation

  -1 = Default orientation
  1 = PORTRAIT
  2 = LANDSCAPE
  

_PaperSize

If destination is a Printer (__DESTINATION=1), this parameter will not be read.

If it's a real Printer, the parameter _PrinterDescriptionEx is required to exist for _PaperSize to be read.

Note: The parameters _PrinterName, _PrinterServer, _PrinterPort, _PrinterDescriptionEx, _Orientation, _PrinterCopies appear only if the destination is a Printer.

_PrinterName

Specifies the IP adress or hostname of the print.

Example:

  \\ser-psafo02\SAGEPRINTER
  

_PrinterServer

Specifies the hostname and port where SAGE X3 PrintServer software is available.

The PrintJob will be sent to this PrintServer.

Example:

  vcsx3v11.sagefr.adinternal.com:1890
  

_PrinterDriver

Specifies the name of the Printer as shown in the list of Printers in Windows.

Example:

  _PrinterDriver=KONICA MINOLTA C364SeriesPCL SP
  

_PrinterPort

Specifies the authentication protocol to use.

Example:

  _PrinterPort=SECURE,SECURE2
  

_PrinterDescriptionEx

Specifies the kind of papersize and cassette to use on the Printer.

Example:

  parameter _PrinterDescriptionEx=1|000258|000009||| 
  Pattern : duplex|paper source|paper size|paper height|paper width|
  

Duplex

Duplex printing means that you can print on both sides of the paper with your printer either automatically or manually by turning the paper over after the first side has printed.

To duplex print, your model will need to have the functionality built-in.

Simplex printing, on the other hand, only allows for printing on one side of the paper.

  empty value, 0 or 1
  1 = Duplex mode is supported by the printer.
  

Paper source

Value depends of the Printer and its capabilities.

  -1 : AutoSelect / Default paper source on the printer device.
  XX : Cassette 1
  XX : Cassette 2
  XX : Cassette 3
  

Paper size

    if value equals -1 or empty = default format paper
    1 = letter US
    8 = A3
    9 = A4
    11 = A5
    256 = defined by the 3 following parameters
  

Example A:

  _PrinterDescriptionEx=1|000258|000009||| 
  Pattern : duplex|paper source|paper size|paper height|paper width|
  

This pattern means that:

Example B:

  _PrinterDescriptionEx=1|000258|||| 
  Pattern : duplex|paper source|paper size|paper height|paper width|
  

This pattern means that:

Example C:

  _PrinterDescriptionEx=1|000258|256|15840|12240| 
  Pattern : duplex|paper source|paper size|paper height|paper width|
  

This pattern means that:


Note: Most measurement in Crystal Reports are in twips. A twip is 1/20 of a point or 1/1440 of an inch. There are aproximately 567 twip in a centimeter. This means a standard 8.1/2 x 11 inch sheet of a paper is 12240 x 15840 twips, or 21.6 cm x 27.9 cm.

Full range of values:

  1  = Letter 8 1/2 x 11 in
  2  = Letter Small 8 1/2 x 11 in
  3  = Tabloid 11 x 17 in
  4  = Ledger 17 x 11 in
  5  = Legal 8 1/2 x 14 in
  6  = Statement 5 1/2 x 8 1/2 in
  7  = Executive 7 1/4 x 10 1/2 in
  8  = A3 297 x 420 mm
  9  = A4 210 x 297 mm
  10 = A4 Small 210 x 297 mm
  11 = A5 148 x 210 mm 
  12 = B4 (JIS) 250 x 354
  13 = B5 (JIS) 182 x 257 mm
  14 = Folio 8 1/2 x 13 in
  15 = Quarto 215 x 275 mm
  16 = 10x14 in
  17 = 11x17 in
  18 = Note 8 1/2 x 11 in
  19 = Envelope #9 3 7/8 x 8 7/8
  20 = Envelope #10 4 1/8 x 9 1/2
  21 = Envelope #11 4 1/2 x 10 3/8
  22 = Envelope #12 4 \276 x 11
  23 = Envelope #14 5 x 11 1/2
  24 = C size sheet
  25 = D size sheet
  26 = E size sheet
  27 = Envelope DL 110 x 220mm
  28 = Envelope C5 162 x 229 mm
  29 = Envelope C3  324 x 458 mm 
  30 = Envelope C4  229 x 324 mm
  31 = Envelope C6  114 x 162 mm
  32 = Envelope C65 114 x 229 mm
  33 = Envelope B4  250 x 353 mm 
  34 = Envelope B5  176 x 250 mm
  35 = Envelope B6  176 x 125 mm
  36 = Envelope 110 x 230 mm 
  37 = Envelope Monarch 3.875 x 7.5 in
  38 = 6 3/4 Envelope 3 5/8 x 6 1/2 in
  39 = US Std Fanfold 14 7/8 x 11 in
  40 = German Std Fanfold 8 1/2 x 12 in
  41 = German Legal Fanfold 8 1/2 x 13 in
  

More information on paper sizes can be found on the official documentation on the Microsoft site.

Example:



  Pattern : duplex|paper source|paper size|paper height|paper width|
  ZEBRA   |000004|000256|000508|001680| 
  

It is important to configure the default parameters correctly to be able to use the Printer:



    Pattern : duplex|paper source|paper size|paper height|paper width|
    ECT   |000004|||| 
    The value "paper size" is empty, so the Print Server will use the default parameters for the printer and driver.
  

The parameter _PrinterDescriptionEx is automatically filled by the Printer an its driver when the printer is created.

The Print Server request the printer and its driver and the result is created in table APRINTDES.

Exemple of one entry of the table APRINTDES:


    See fields [APRINTDES].[PRTDES_0] and [APRINTDES].[PRTDESEX_0]
    
    [X3].[APRINTDES], [UPDTICK_0] [int], [COD_0] [nvarchar](10), [NUM_0] [int],[PRTDES_0] [nvarchar](250), [PRTDES_1] [nvarchar](250), [CREUSR_0] [nvarchar](5),	[UPDUSR_0] [nvarchar](5),	[CREDATTIM_0] [datetime],	[UPDDATTIM_0] [datetime],	[AUUID_0] [binary](16),	[PRTDESEX_0] [nvarchar](100),	[ROWID] [numeric](38, 0),
    1	IMPRIM	1	5C005C00730061006700650069006D0070005C004C0049004C00410053000000/*00740000006500200064006500200050007200/*0074002C004C006F00000001040006.,00-,1F430/)!070100090000000000640001000F005802010001005802030000004100340000000000000	 	XPSB	XPSB	2015-07-24 17:16:25.000	2015-07-24 17:16:25.000	<Binary data>	3|000257|000009|||	29
    
  

_PrinterCopies

Number of copies of the document to print. Default value = 1.

_PrinterCollate

Collated printing refers to how prints are arranged as they print, and is useful if you are printing more than one large document that needs to be kept in the right order. Default value = 0.

When a file is too big and needs to be printed across several pages, collated printing will give you page after page and sheet of paper after sheet of paper, while respecting the original series of the pages in the document.

Collating documents creates consistency. For example, if you have a document that is five pages long and you wanted to print multiple copies, collating enables it to print pages 1,2,3,4 and 5 in the correct order and then repeat this again if you need more than one copy.

_PrinterStartPage

First page to print. Default value = 1.

_PrinterStopPage

Default value = 9999.