Appearance
Drop Monitor
10.1. Overview
The DICOM Printer Drop Monitor is a companion Windows service (DICOMPrinterDropMonitorService) that watches a designated folder for incoming files (images, PDFs, DICOM files) and automatically converts and injects them into the DP2 processing queue. It is distributed as a separate installer and runs alongside the main DP2 service.
10.2. How It Works
- Files are placed (or moved/renamed) into the monitored drop folder.
- The Drop Monitor detects the new file, waits briefly to ensure the file is fully written, then processes it.
- For PDF files, it can optionally convert pages to PNG images (if
<ConvertToPNG>is enabled) or create montage images. - The processed file is staged in a temporary directory and then injected into the DP2
queue/directory as a job file. - DP2 picks up the job file and processes it through the configured workflow.
Subfolders within the drop folder are supported. When a file is found in a subfolder, the job name is prefixed with the subfolder path using a configurable path separator (default /).
10.3. Configuration
The Drop Monitor reads its settings from the same config.xml used by DP2, inside a <DropMonitor> element at the top level of <DicomPrinterConfig>:
xml
<DicomPrinterConfig>
<!-- ... ActionsList, Workflow, etc. ... -->
<DropMonitor>
<Path>${DP2_DROP_PATH:-C:\DICOM\drop}</Path>
<ConvertToPNG>false</ConvertToPNG>
<PdfConversionTimeoutMs>5000</PdfConversionTimeoutMs>
<PathSeparator>/</PathSeparator>
</DropMonitor>
</DicomPrinterConfig>| Setting | Default | Description |
|---|---|---|
Path | <CommonBasePath>/drop | The folder to monitor for incoming files. |
ConvertToPNG | false | Enabled unless set to false: PDF pages are converted to PNG images before injection. |
Montage | false | Enabled unless set to false (and ConvertToPNG is also enabled): creates a single montage image from all PDF pages. |
PdfConversionTimeoutMs | 5000 | Maximum time in milliseconds to wait for a PDF-to-image conversion to complete. Increase this for large or complex PDFs. |
PathSeparator | / | The separator character used to join subfolder names into the job name prefix. |
RetryIntervalSeconds | 5 | How long to wait before retrying a failed file. |
MaxRetryAttempts | 3 | Maximum number of retry attempts for a failed file before giving up. |
Layout | raw | The layout format for generated job files. |
LineEndings | unix | Line ending style for generated text files (unix, dos, or mac). |
MetadataEncoding | utf-8 | Character encoding for PDF metadata extraction. |
MetadataOutputFormat | plaintext | Format for extracted metadata (plaintext or base64). |
TextFileEncoding | utf-8 | Character encoding for generated text (job) files. |
Note:
ConvertToPNGandMontageare enabled by any value except the literalfalse(case-insensitive). To disable them you must write exactlyfalse— values like0,no, oroffwill enable the feature.
Drop Monitor resolves ${VAR} and ${VAR:-default} placeholders with the same environment loader as the main DICOM Printer service. Values can come from the process environment, the base directory .env / .env.local, or config/.env / config/.env.local; process environment values have the highest precedence. This means a site-profile install that writes %ProgramData%\Flux Inc\DICOM Printer 2\.env can drive <Path> and other Drop Monitor settings without a Drop Monitor-specific config file.
10.4. Drop Monitor Service Management
The Drop Monitor is installed and managed as a separate Windows service:
DICOMPrinterDropMonitorService.exe --install — Install the service
sc start DICOMPrinterDropMonitorService — Start the service
sc stop DICOMPrinterDropMonitorService — Stop the serviceThe service logs to <CommonBasePath>/log/dicom_printer_drop_monitor_service.log.
10.5. Troubleshooting the Drop Monitor
- Files not being picked up. Verify the
<Path>setting points to the correct folder. The Drop Monitor also handles files that are moved (renamed) into the folder, so atomic move operations are supported. - A literal
${...}appears in the configured path. Confirm the variable is present in the process environment or one of the DP2.envfiles. For installed site profiles, check%ProgramData%\Flux Inc\DICOM Printer 2\.envfirst, thenconfig\.env. - PDF conversion timeout. If large PDFs fail to process, increase
<PdfConversionTimeoutMs>. The default of 5000 ms may be insufficient for documents with many pages or complex graphics. - Uppercase file extensions. The Drop Monitor accepts uppercase extensions (e.g.,
.PDF,.DCM). - Retry failures. After
MaxRetryAttemptsfailures, the file is abandoned. Check the Drop Monitor log for error details. Common causes include file permission problems or corrupted input files.