New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS scripts for Excel and Word #142
Conversation
Allow for reading exit code from standard output.
Two minor nits, but otherwise this is looking good! |
Glad you like it! What nits? I tested a lot, so there might be some leftovers or so... ;-) |
I commented inline in the code, above. |
I don't see any comments?? They should show up in "Conversations" right? For me it's empty. |
Weird, they are right there for me. I was wondering if you:
|
- OsUtils.myos made final - fixed comments in AbstractExternalConverter - fixed missing else part in MicrosoftOfficeAssertionEngine
The comments was a left over, is fixed. OsUtils.myOs is now final. |
Hi guys, So how do you use this on Mac now? I have Mac, Word, and these dependencies, but it is defaulting to cmd/vbs (windows)
this code:
but it is defaulting to vbs cmd... Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. java.lang.IllegalStateException: Failed to execute CommandLineRunner �[2m2023-12-07T00:19:31.137+01:00�[0;39m �[32m INFO�[0;39m �[35m13046�[0;39m �[2m---�[0;39m �[2m[.LocalConverter]�[0;39m �[36mcom.documents4j.job.ConverterAdapter �[0;39m �[2m:�[0;39m Tried to deregister shut down hook in shut down period java.lang.IllegalStateException: Shutdown in progress Exception in thread "Shutdown hook: com.documents4j.job.LocalConverter" java.lang.NullPointerException: Cannot invoke "java.util.concurrent.ExecutorService.shutdown()" because "this.executorService" is null UPDATE: But it's still failing here: with res being empty "" command is: [/usr/bin/osascript, /var/folders/bj/qz0h21d50tb1b5dx0cfh6grw0000gn/T/tmp15971541498883610131/word_start1394010188.vbs] |
Can you check what OSUtil produces on your system? |
@raphw I've switched over to another solution (openoffice jodconverter), but if you look at the end of my comment you will notice the path the code took on my mac, i went into isMac and then res was empty while command variable had a vbs script reference: But it's still failing here: with res being empty "" command is: [/usr/bin/osascript, /var/folders/bj/qz0h21d50tb1b5dx0cfh6grw0000gn/T/tmp15971541498883610131/word_start1394010188.vbs] sorry for not being of more help since i had to move on. Cheers and good luck! |
I do not own a Mac, so this is hard to debug for me. Could you attempt s fix? It does not seem there's a lot øot missing. |
Here my changes for Issue #126, Support for MacOS.
I've added .applescripts for Word and Excel. These work on the command line. I've also added the code for execution in documents4j, plus retrieval of the return value as you proposed.
I still have problems running the test-cases (on windows and mac), however in my own application the conversion works as intended.