Skip to content
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

The unoconv conversion path contains a space conversion failure #445

Closed
zxwxiaohe1 opened this issue Mar 15, 2018 · 4 comments
Closed

The unoconv conversion path contains a space conversion failure #445

zxwxiaohe1 opened this issue Mar 15, 2018 · 4 comments

Comments

@zxwxiaohe1
Copy link

The Linux service users Java code to execute unoconv to change the command, and when the output or input path contains Spaces, the conversion fails.If the path containing the space is caused by double quotes, the conversion fails.What is the solution to a successful transition with contains Spaces?

@githublovered
Copy link

将空格可以转义\ \

@regebro
Copy link
Member

regebro commented Feb 15, 2019

I can't duplicate this-

@anasred
Copy link

anasred commented Jan 8, 2020

@regebro
if you tried to convert, say an image, where the image name contains spaces, like so

unoconv -f pdf -o /home/anasred/storage/1.pdf /home/anasred/storage/Simulator Screen Shot - iPhone 11 Pro - 2019-12-28 at 13.43.15.png

you will get this feedback

unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL </home/anasred/storage/Simulator**>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <Screen>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <Shot>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <->: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <iPhone>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <11>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <Pro>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <->: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <2019-12-28>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <at>: "from LoadEnv::initializeLoading"
unoconv: RuntimeException during import phase:
Office probably died. Unsupported URL <13.43.15.png>: "from LoadEnv::initializeLoading"

it seems like the logic behind the scene is trying to chunk the image path into separate pathes

I tried again like the below but, the same error above is showing:

unoconv -f pdf -o /home/anasred/storage/1.pdf /home/anasred/storage/"Simulator Screen Shot - iPhone 11 Pro - 2019-12-28 at 13.43.15.png"

AND

unoconv -f pdf -o /home/anasred/storage/1.pdf /home/anasred/storage/'Simulator Screen Shot - iPhone 11 Pro - 2019-12-28 at 13.43.15.png'

@anasred
Copy link

anasred commented Jan 8, 2020

It worked finally 😎
For anyone with a similar issue:
1- Replace spaces with a \ slash and one space after it
2- Surround the hole path name with "

Example:

unoconv -f pdf -o /home/anasred/storage/1.pdf "/home/anasred/storage/Simulator\ Screen Shot\ -\ iPhone\ \11\ Pro\ -\ 2019-12-28\ at\ 13.43.15.png"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants