I have been experimenting with a third party jar for converting my .RTF files to .PDF...
It is working, but leaves me puzzled.
Here is where I got the jar and instructions:
Here is my code to execute the jar:
My issue is that I MUST include the 2 jar files (vPDFcCL.jar and itext.jar) in the Objects ( sh.WorkingDirectory = File.DirApp ) for it to work.
I tried in Main - but shell was unable to locate them...
#AdditionalJar: vPDFcCL.jar
#AdditionalJar: itext-2.0.2.jar
Is there a better way?
Thanks
It is working, but leaves me puzzled.
Here is where I got the jar and instructions:
vPDFc – RTF to PDF Converter / News: vPDFcCL v1.0 released
sourceforge.net
Here is my code to execute the jar:
B4X:
Dim sh As Shell
sh.Initialize("sh","java", Array As String("-jar", "vPDFcCL.jar", fn2&"/"&fn1, fn1.Replace(".rtf",".pdf") ))
sh.WorkingDirectory = File.DirApp
sh.Run(10000)
' the array params: "-jar" _(obvious), "vPDFcCL.jar" _(the jar to call), fn2&"/"&fn1 _(the path and file name of .RTF), fn1.Replace(".rtf",".pdf") _(the output PDF file converted)
My issue is that I MUST include the 2 jar files (vPDFcCL.jar and itext.jar) in the Objects ( sh.WorkingDirectory = File.DirApp ) for it to work.
I tried in Main - but shell was unable to locate them...
#AdditionalJar: vPDFcCL.jar
#AdditionalJar: itext-2.0.2.jar
Is there a better way?
Thanks