Posted by
Sabine Manaa on
Jun 07, 2016; 7:31am
URL: https://forum.world.st/OSProcess-command-non-responding-image-when-calling-often-tp4899540.html
Hi,
sorry but I have another issue with OSProcess.
For my app, I want to show small .png previews from my .pdfs. For this reason, I use an external software, currently pdfbox. It works fine, but regularly, I get a hanging image. I tried to reproduce it and found out, that it is not a problem with pdfbox (
http://pdfbox.apache.org), because from command line, I can call it often without problems. There can be (hopefully) many users in my app with many previews at one time. So I have to call it often.
For reproduction of the OSProcess issue, I used another simple command (from my other OSProcess umlaut issue :-)) to test it.
calling this, results in a non responding image:
20 timesRepeat: [OSProcess command: ('cp /Library/WebServer/Documents/reports/bar.pdf /Library/WebServer/Documents/reports/test-c.pdf').].
also this:
20 timesRepeat: [OSProcess command: ('echo "Hi there"').]
My original code is similar to this but here only for information:
OSProcess
command:
('{1} -jar {2} PDFToImage -format PNG -page 1 -dpi 100 {3}'
format:
{'Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java'.
'/Users/sabine/Desktop/pdfbox-app-2.0.1.jar'.
'/Library/WebServer/Documents/reports/201411121510-112859865-3378921/20150605_170_IFA_Berlin_Reisekostenabrechnung.pdf'}).
So, my question is: is it wrong, calling OSProcess like this? How to do it instead?
I am sorry to ask again and hope that there is a simple solution.
Or is it a bug in OSProcess?
Regards
Sabine