web stats
rtf to pdf using shell script: - Mirth Community

Go Back   Mirth Community > Mirth Connect > Development

Thread Tools Display Modes
Old 02-23-2018, 03:54 AM
bandheli bandheli is offline
Mirth Newb
Join Date: Jul 2017
Posts: 9
bandheli is on a distinguished road
Default rtf to pdf using shell script:

I have a shell script and if I run it manually I am getting correct output i.e pdf.
However if I try to invoke same shell script using bat file through Mirth getting encoded content(may be base64) not exact result.

bat file code:

PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command D:\RTF-PDF3\convert\rtf2pdf_v3.ps1"
DEL *.rtf

rtf2pdf_v3.ps1 ...... I have exact logic to convert rtf to pdf.

Code in mirth's source connector:

var pr = java.lang.Runtime.getRuntime().exec("D:\\RTF-PDF3\\convert\\convert.bat");
var thread = new java.lang.Thread(new java.lang.Runnable({run:function(){while(pr.getInp utStream().read()!=-1);}}));
while(pr.getErrorStream().read() != -1);

Mirth version: 3.5.1

Can someone help me to run bat file using Mirth connect.

Thanks in advance!!
Reply With Quote
Old 02-23-2018, 08:18 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

This may help: https://www.mirthcorp.com/community/...7649#post47649
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote

bat, pdf, rtf, shell

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 10:52 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation