Documents4j - RemoteConverter Invalid Input

473 views Asked by At

We have tried to use Documents4j for converting docx to pdf.

I have tried it with LocalConverter, it runs perfectly as expected. But when i tried to run with RemoteConverter, facing errors "com.documents4j.throwables.ConversionInputException: The input file seems to be corrupt". Same file works in LocalConverter in same machine

To run the RemoteConverter:

  1. java -jar **\Downloads\documents4j-server-standalone-1.1.3-shaded.jar http://127.0.0.1:9998 -log **\Downloads\Documents4jlog.txt -level DEBUG

  2. java -jar **\Downloads\documents4j-client-standalone-1.1.3-shaded.jar http://127.0.0.1:9998 -log **\Downloads\Documents4jlogClient.txt

ERROR: com.documents4j.throwables.ConversionInputException: The sent input is invalid

Below is the server log:

2020-06-05 18:11:04,939 INFO [pool-3-thread-2] c.d.c.msoffice.MicrosoftWordBridge - Requested conversion from C:\Users\DIVYAL~2\AppData\Local\Temp\1591360694906-0\5b54b28b-b20d-4f41-9647-18b89f154c28\temp3 (application/msword) to C:\Users\DIVYAL~2\AppData\Local\Temp\1591360694906-0\5b54b28b-b20d-4f41-9647-18b89f154c28\temp4 (application/pdf) 2020-06-05 18:11:04,939 DEBUG [pool-3-thread-2] org.zeroturnaround.exec.ProcessExecutor - Executing [cmd, /S, /C, ""C:\Users\DIVYAL~2\AppData\Local\Temp\1591360694906-0\word_convert1288062732.vbs" "C:\Users\DIVYAL~2\AppData\Local\Temp\1591360694906-0\5b54b28b-b20d-4f41-9647-18b89f154c28\temp3" "C:\Users\DIVYAL~2\AppData\Local\Temp\1591360694906-0\5b54b28b-b20d-4f41-9647-18b89f154c28\temp4" "17""] in C:\Users\DIVYAL~2\AppData\Local\Temp\1591360694906-0. 2020-06-05 18:11:04,952 DEBUG [pool-3-thread-2] org.zeroturnaround.exec.ProcessExecutor - Started java.lang.ProcessImpl@8f30115 2020-06-05 18:11:05,189 DEBUG [WaitForProcess-java.lang.ProcessImpl@8f30115] org.zeroturnaround.exec.WaitForProcess - java.lang.ProcessImpl@8f30115 stopped with exit code -2 2020-06-05 18:11:05,196 INFO [pool-3-thread-2] c.d.w.e.AsynchronousConversionResponse - Sending exceptional response for org.glassfish.jersey.server.ServerRuntime$AsyncResponder@250891f5 com.documents4j.throwables.ConversionInputException: The input file seems to be corrupt at com.documents4j.util.Reaction$ConversionInputExceptionBuilder.make(Reaction.java:159) at com.documents4j.util.Reaction$ExceptionalReaction.apply(Reaction.java:75) at com.documents4j.conversion.ExternalConverterScriptResult.resolve(ExternalConverterScriptResult.java:70) at com.documents4j.conversion.ProcessFutureWrapper.evaluateExitValue(ProcessFutureWrapper.java:48) at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:36) at com.documents4j.conversion.ProcessFutureWrapper.get(ProcessFutureWrapper.java:11) at com.documents4j.job.AbstractFutureWrappingPriorityFuture.run(AbstractFutureWrappingPriorityFuture.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)


Kindly let me know, if I'm missing anything...

Thanks in advance

0

There are 0 answers