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

Go Back   Mirth Community > Mirth Connect > Development

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2018, 04: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


Here:
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);}}));
thread.start();
while(pr.getErrorStream().read() != -1);
thread.join();
pr.waitFor();


Mirth version: 3.5.1

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

Thanks in advance!!
Reply With Quote
  #2  
Old 02-23-2018, 09:18 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,054
narupley is on a distinguished road
Default

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
Reply

Tags
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 04:24 AM.


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