ONYX - 9.0 - Utilisation
XPS file concatenation
This documentation describes the function to concatenate all XPS files in a directory into one or more XPS files.
Sommaire
Interface description
To access the initial XPS interface, double-click on the command in question, choose "XPS Toolbox", select "Concatenate folder".
Onglet standard
Input directory: Root directory where the files to concatenate are located, with or without support for subdirectories depending on the value of Recursive mode.
Output file: Path + name of the XPS file(s) generated
Maximum number of original files in one output file: Allows you to create batches of XPS files. See example below.s.
Remove original files: Allows you to delete the source files
Recursive mode: Disabled, Normal, or Advanced. See example below.
Filters tab
Filters allow you to take into account only certain XPS files in the input directory
Filter on the files name: based on the name with meta-character * (example: DOCXPS*)
Filter on date From (yyyy/mm/dd): start date of XPS file selection (file creation date)
Filter on date To (yyyy/mm/dd): end date of XPS file selection (file creation date)
Output action tab
This tab allows you to send the result of the concatenation to an entry point.
Entry name: The value of this parameter is the name of an entry point defined in Mapping. Each time the concat folder is executed, the result(s) of the concatenation will be sent to the specified entry point
Hold document: This parameter defines the state of the job upon arriving in the “Entry name” queue. Either in “Ready to print” (unchecked) or in “Suspended” (checked)
Keep document: This parameter defines the state of the job once printed. Either the job disappears (unchecked), or we keep it in “saved” state (checked)
Keep current userdata: If checked, this parameter allows you to keep the userdata initialized in a previous workflow so that they are sent to the job on the “Entry point”
Add current parameter: If checked, this parameter allows you to add the userdata initialized in the current workflow so that they are sent in the job to the “Entry point”
The title (MAP_TITLE) of the jobs sent is equal to either the name of the generated (specified in the “Standard / Output file” parameter, or the entire path (depending on configuration in the mapping.conf. See note No. 6)
Examples
The examples below are based on the following directory structure:
Variant 1: Basic settings
Let's take the following function for example:
In each directory (TestConcatFolder, REPx and REPxSOUSx), there are 3 XPS files:
FileXPS1.xps, FileXPS2.xps, FileXPS3.xps
- Input directory:
C:\wrkf\TestConcatFolder
- Output file name:
C:\wrkf\TestConcatFolder_sortie\fileXPS.xps
- Recursive mode:
There are 3 different recursion modes:
- Disabled
- 1 single XPS file generated by the concatenation of the XPS files contained in the “TestConcatFolder” input directory only
- Normal
- 1 single XPS file generated by the concatenation of all the XPS files contained in the “TestConcatFolder” directory as well as the XPS files in the subdirectories
- The concatenated files are sorted in ascending order according to their names following this order: 0123456789ABCDEFGHI…
->Ex: Let's take 2 XPS files in the TestConcatFolder directory: 0BONJOUR.xps and ABONJOUR.xps
->The concatenation will be 0BONJOUR.xps and then ABONJOUR.xps (because if we sort the file names in ascending order, the 0 is before the
A,
so the XPS file whose name starts with "0" will be concatenated before the XPS file whose name starts with "A")
- Advanced
- 1 XPS file is generated per directory or subdirectory with the name DIRECTORYNAME_XPSFILENAME. In this example, there are 9 XPS files (because 9 directories or subdirectories) - Names of the 9 XPS files created in the C:\trash\TestConcatFolder directory:
- XPSfile.xps
- REP1_XPSfile.xps
- REP1SOUS1_XPS file.xps
- REP2_XPSfile.xps
- REP2SOUS2_fileXPS.xps
- REP3_XPSfile.xps
- REP3SOUS3_fileXPS.xps
- REP4_XPSfile.xps
- REP4SOUS4_XPSfile.xps
Each of these files comprises the concatenation of the XPS files located in their respective directories.
Delete original files:
The box is not checked so the files are kept.
Variant 2: Batching
This feature allows you to create batches of concatenated files.
Let's take for example 3 different files located in the C:\wrkf\TestConcatFolder directory
XPSFile1.xps, XPSFile2.xps and XPSFile3.xps
Maximum number of original files in an output file: “2”
The result of this concatenation is the creation of an XPS file containing two different XPS files and another XPS file for the third file.
- XPS_1 file containing the concatenation of XPS1.xps file and XPS2.xps file
- XPS_2 file containing the concatenation of the XPS3.xps file
Variant 3: Adding filters
The Filters tab allows you to add file selection filters based on their name or date.
Note: It is not possible to specify multiple values for the same filter.
Filter on file names
This feature allows you to select XPS files to concatenate based on their name.
Example :
Filter value: DOC*
- This value takes all XPS files starting with “DOC”, “DOC1.xps” for example
Filter value: *DOC*
- This value takes all XPS files containing “DOC” in their name, “MYDOC1.xps” for example
Filter on file creation date
This feature allows you to select XPS files to concatenate based on their creation date.
Example 1 :
- This setting only takes into account XPS files created between April 2 and December 31, 2019.
Note: If one of the two dates is not specified, its default value is * (infinite)
Example 2 :
- This setting only takes into account XPS files created from 04/02/2019 (inclusive).
Example 3 :
- This setting takes into account all XPS files with a creation date prior to or equal to 04/15/2019.
Variant 4: Sending to an entry point
After concatenation, the generated files can be sent to an Onyx Server entry point. In the example below, the concatenated file(s) will be sent to the Mapping entry point MY_ENTRY_POINT and these spools will be saved after processing (“Keep document” box checked)
Notes
Note 1 – File type other than XPS
If a file of type other than XPS is present in the directory to be concatenated, an error message appears, without however putting the queue in error:
USER DB 01/04/2019-15:10:38 5956 Do Render... USER EE 01/04/2019-15:10:38 5956 No _rel/.rels, document C:\wrkf\TestConcatFolder\formation4.pdf is not an XPS file USER DB 01/04/2019-15:10:38 5956 Done.
Note 2 – No XPS file
If there are no XPS files in the directory, there is no error message and no XPS file is created.
Note 3 – XPS file without extension
If there is an XPS file with no extension ("doc1.xps" named "doc1"), no file is created because the concat folder uses the file extension to determine if it is an XPS file or not.
Note 4 – Order of concatenation
XPS files are concatenated in ascending order based on their name (0123456789ABCDE…). The same logic applies to files placed in subdirectories for "Normal" or "Advanced" recursion mode.
Note 5 – Output File Name
By default, when an entry point is defined in the "Output action" tab, the "Output file name" is equal to the file name without the path or extension (MAP_TITLE variable), below “concatroot”.
On the other hand, it is also possible to obtain the full path and the extension by setting the environment variable CONCATFOLDER_TITLE_FULLPATH to “ON”, below D:\MCO\00002414\ concatroot.xps
Note 6 – No index value in file name
It is not intended to generate a dynamic name using the value of the indexes present in the files to be concatenated in the name of the output file(s):
USER DB 19/04/2018-18:36:18 9676 Used parameters : directory=C:\wrkf\TestConcatFolder, outfilename=C:\wrkf \TestConcatFolder_Sortie\fichierXPS1_[[IND_PAGE]].xps, recursivemode=Disabled SYST EE 19/04/2018-18:36:20 13292 Process 9676 stopped with return code 255 SYST WW 19/04/2018-18:36:20 13292 Device devTEST_DUPLEX on error: default
Note 7 - Environment variable in file name
It is possible to include environment variable values in the names of generated files. To do this, you must call the name of the variables with [%...%], for example [%MAP_JOBNUM%] for the variable MAP_JOBNUM (job number).
Input directory c:\wrkf\TestConcatFolder
Output file name c:\wrkf\TestConcatFolder_S\fileXPS1[%MAP_JOBNUM%].xps