9 Save XML File
9.1 Overview ¶
Save XML file is only available in the "Extract XML from PDF file" processing mode (see chapter 8.7). In this mode, the program automatically extracts the embedded XML invoice to a temporary folder - this task then stores the extracted XML file permanently at the selected target. The subsequent tasks then refer to the saved file.
Save XML file task with the Storage location, File date, and Subsequently tabs
Note: Without this task, the extracted XML file remains in the temporary folder and is cleaned up at the next program start. If the profile only evaluates the XML data (e.g., save extract as CSV, save to database), that is perfectly fine - the task is only needed if the XML file itself is to be kept.
9.2 "Storage location" tab ¶
The storage location tab has the same layout for all saving tasks:
| Field |
Meaning |
| Directory (empty = source folder) |
Target folder of the file. Via Insert placeholder, invoice data can be used in the path, e.g. a subfolder per seller (see chapter 70.1). |
| File name (empty = original name) |
New file name, also with placeholders - e.g. <InvoiceDateComplete> <SellerName> <InvoiceId>. |
| Preview |
Shows the resolved target path based on the selected example invoice (see chapter 8.9). |
| If a file with this name already exists |
Conflict behavior, see section 9.3 |
9.3 Conflict behavior ¶
| Option |
Effect |
| Overwrite |
Replaces the existing file |
| Add numbering |
Appends a running number to the file name (default) |
| Add date processed |
Appends the processing date to the file name |
| Add time processed |
Appends the processing time to the file name |
| Do not execute this task only |
Does not save. The following tasks of the profile continue (as of version 2.6.0). |
| Do not execute this task and the following tasks |
Does not save. The following tasks of the profile no longer run for this file either (see chapter 8.3.2). |
"Cancel" became two choices (as of version 2.6.0)
Up to version 2.5, the choice was called "Cancel". The task was not executed, and the following tasks continued. After the update, profiles with "Cancel" have the choice Do not execute this task and the following tasks. If the following tasks should run as before, switch to Do not execute this task only.
Which choice fits:
- Do not execute this task and the following tasks protects against follow-up errors. Example: The profile moves the invoice and then deletes the source file. If the move does not take place, the deletion must not run any more.
- Do not execute this task only fits if the following tasks do not depend on this task. Example: The profile copies the invoice and then sends it. If sending fails, the copy is already in the target. When the file is processed again, the program skips copying and sends.
File already has the name of the target: If, on renaming or moving, the file already has the name of the target and is already located there, this is not a conflict. The task counts as successful, and the file remains unchanged (as of version 2.6.0).
9.4 "File date" tab ¶
Optionally sets the file timestamps of the saved file:
- Set creation date to: and/or Set modification date to:
- Available sources: Original date (of the source file), File creation date, File modification date, Invoice date
Tip: With "Set modification date to: Invoice date", filed invoices can be sorted chronologically by invoice date in Explorer.
9.5 "Subsequently" tab ¶
Optionally runs a program after saving:
| Setting |
Meaning |
| Execute program |
Enables the program execution |
| Program |
Path to the executable |
| Parameters |
Command-line arguments; placeholders: <PathIncludingFilename>, <ParentDirectory>, <Filename> |
| Hide program window |
Starts the program invisibly |
| Execute only once (after completion of the run) |
Starts the program not per file but once at the end of the processing cycle |
Typical use: handing the saved file over to a follow-up system (import script, archiving tool).
Special characters in the file name (version 2.7.1 or later): The name of the saved file often comes from the invoice, for example via a placeholder in the target name. Batch files (.bat, .cmd), the command prompt (cmd.exe) and PowerShell, however, read characters such as &, ; or $ as commands. The program therefore checks before each call whether the file path arrives unchanged. If this is not certain, it does not start the program. The task then ends with an error, and the log names the change needed.
This is how the path arrives safely:
- If the Parameters field contains no quotation marks, the program puts quotation marks around the placeholders itself.
- If you write quotation marks yourself, put them around every placeholder.
- A batch file uses the value in quotation marks:
"%~1".
- Call a PowerShell script with
-File. Example of the Parameters for the Program powershell.exe:
-NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\Import.ps1" "<PathIncludingFilename>"
The program never passes executable files (for example .exe, .bat or .ps1) to another program. If the program does not start, for example because the path under Program is wrong, the task also ends with an error.