web stats
Mirth Community - View Single Post - Test for presence of PDF file
View Single Post
Old 08-08-2018, 09:00 AM
mcampanella@rimirad.com mcampanella@rimirad.com is offline
Mirth Newb
Join Date: Apr 2009
Location: RI
Posts: 12
mcampanella@rimirad.com is on a distinguished road
Default Test for presence of PDF file


I found this code from a previous post that can go into a deploy script to read in a PDF file;

globalChannelMap.put('pdf', FileUtil.encode(FileUtil.readBytes('/path/to/pdf')));

I would like to use this to send the pdf data as an attachment in an SMTP sender

The problem is there wont always be a pdf created in a previous step. The pdf will only be created in some instances

How can I test to make sure the PDF exists before sending the email out?

Reply With Quote