Skip to content

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 ​

  1. Files are placed (or moved/renamed) into the monitored drop folder.
  2. The Drop Monitor detects the new file, waits briefly to ensure the file is fully written, then processes it.
  3. For PDF files, it can optionally convert pages to PNG images (if <ConvertToPNG> is enabled) or create montage images.
  4. The processed file is staged in a temporary directory and then injected into the DP2 queue/ directory as a job file.
  5. 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>
SettingDefaultDescription
Path<CommonBasePath>/dropThe folder to monitor for incoming files.
ConvertToPNGfalseEnabled unless set to false: PDF pages are converted to PNG images before injection.
MontagefalseEnabled unless set to false (and ConvertToPNG is also enabled): creates a single montage image from all PDF pages.
PdfConversionTimeoutMs5000Maximum 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.
RetryIntervalSeconds5How long to wait before retrying a failed file.
MaxRetryAttempts3Maximum number of retry attempts for a failed file before giving up.
LayoutrawThe layout format for generated job files.
LineEndingsunixLine ending style for generated text files (unix, dos, or mac).
MetadataEncodingutf-8Character encoding for PDF metadata extraction.
MetadataOutputFormatplaintextFormat for extracted metadata (plaintext or base64).
TextFileEncodingutf-8Character encoding for generated text (job) files.

Note: ConvertToPNG and Montage are enabled by any value except the literal false (case-insensitive). To disable them you must write exactly false — values like 0, no, or off will 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 service

The 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 .env files. For installed site profiles, check %ProgramData%\Flux Inc\DICOM Printer 2\.env first, then config\.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 MaxRetryAttempts failures, the file is abandoned. Check the Drop Monitor log for error details. Common causes include file permission problems or corrupted input files.