I asked about splitting multiple page PDF in another thread and I am trying one option using Python that I found futzing around in google.I am trying to run a python script with LEP and am having problems on a Mac (this will eventually be running on windows). The following works in terminal
/pathToThePythonScript/splitPDF.py /PathToADoument/BestInCategory_JR\ 2.pdf 1 2 3 4 5 6 7 8 9
The script splits the pdf and the numbers tell the script how to split the pdf.
So in 4D I first tried to run it like I do in terminal
$execute:= $pathToScript+" "+$pathToDocument+" 1 2 3 4 5 6 7 8 9" SET ENVIRONMENT VARIABLE("_4D_OPTION_BLOCKING_EXTERNAL_PROCESS";"false") Launch External Process($execute)
That did not work. I copied the $execute to the pasteboard, pasted it into Terminal, and it worked fine
So then I tried it like this…
C_BLOB($inputStream;$output;$error) TEXT TO BLOB($pathToDocument +" 1 2 3 4 5 6 7 8 9";$inputStream) SET ENVIRONMENT VARIABLE("_4D_OPTION_BLOCKING_EXTERNAL_PROCESS";"false") LAUNCH EXTERNAL PROCESS($pathToScript;$inputStream;$output;$error)
I am not sure if the script is running or not. I must be missing something
The script doies have an output, but that blob is empty as is the error blob. The fact that _4D_OPTION_HIDE_CONSOLE is windows only, does that mean that their is no way to show terminal and thus no way to see what is happening?
Any help is greatly appreciated.