Cannot export docx/excel to svg

I was using libreoffice7.3.3.2 on mac or centos, I failed to export docx to svg from command line. do you guys know what is going on? The feature was disabled now? Thanks a lot.

The error I met:
Error: Please verify input parameters… (SfxBaseModel::impl_store <file:///tmp%E9%A2%84%E7%AE%97%E8%AE%A1%E7%AE%97%E9%80%BB%E8%BE%91.svg> failed: 0xc10(Error Area:Io Class:Write Code:16))

First to check: Can you do the intended task with the gui? If that is not possible, command-line will fail too.
.
Second: As it is already noted Please verify input parameters you could do this or consider to copy the command-line here, in case you can’t understand your own commands. It is a bit unusual to see a bunch of %-encoded chars as name for your svg-file. Did you type them? If not, where did they come from?
.
PS: More out of curiosity: Why convert Text or Spreadsheets to Scalable-vector-graphics?

1 Like

This specific bit is OK, only showing that a non-ASCII file name was percent-encoded in the URL (not IRI) internally.

Which specific command line? You never mentioned it.

This seems to imply that it worked at some stage (which I can’t confirm by brief check using a couple of randomly picked old versions). When and where (which specific version) did it work for text documents?

0xc10(Error Area:Io Class:Write Code:16) is ERRCODE_IO_CANTWRITE; and together with the file:///tmp%E9%A2%84%E7%AE%97%E8%AE%A1%E7%AE%97%E9%80%BB%E8%BE%91.svg file URL (which translates to /tmp预算计算逻辑.svg local path), it looks suspicious - indeed, it is very unlikely that you could write into root directory. Have you maybe mis-configured your TEMP/TMP environment variables? (But the error is not that specific, would more likely appear for internal reasons, not because of permissions, which is what ERRCODE_IO_ACCESSDENIED is for.)

Sorry for missing the command line.

/Users/samuel/Downloads:/Applications/LibreOffice.app/Contents/MacOS/soffice --convert-to svg ~/Downloads/1111.docx
convert /Users/samuel/Downloads/1111.docx → /Users/samuel/Downloads/1111.svg using filter : writer_svg_Export
Error: Please verify input parameters… (SfxBaseModel::impl_store <file:///Users/samuel/Downloads/1111.svg> failed: 0xc10(Error Area:Io Class:Write Code:16))

For the docx, there is no svg option in File->export. Only the pptx has svg output option.

I haved renamed the file in English as below, still failed. But I can convert to png/pdf for the same file.

/Users/samuel/Downloads:/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to pdf ~/Downloads/1111.docx
convert /Users/samuel/Downloads/1111.docx → /Users/samuel/Downloads/1111.pdf using filter : writer_pdf_Export
Overwriting: /Users/samuel/Downloads/1111.pdf
/Users/samuel/Downloads:/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to png ~/Downloads/1111.docx
convert /Users/samuel/Downloads/1111.docx → /Users/samuel/Downloads/1111.png using filter : writer_png_Export
/Users/samuel/Downloads:/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to svg ~/Downloads/1111.docx
convert /Users/samuel/Downloads/1111.docx → /Users/samuel/Downloads/1111.svg using filter : writer_svg_Export
Error: Please verify input parameters… (SfxBaseModel::impl_store <file:///Users/samuel/Downloads/1111.svg> failed: 0xc10(Error Area:Io Class:Write Code:16))

This I assumed.
.
My only Idea to “solve” this would be to convert to pdf. The try to convert from pdf to svg. Have not tried, if Draw can do this…

That would be a solution, thanks.

There indeed is a writer_svg_Export internal filter. But it is explicitly only supports “selection only” mode; and you can’t export a selection from a command line.

And as @Wanderer hinted, it is not possible to use that filter from Save As UI, hence it’s unreasonable to expect it to work from the command line.

Is it possible that I modifed the code to remove the “selection only” check and iterate all the elements on that document just like the svg feature works on pptx?

As I wrote: no way from command line. You can do it using a macro, of course.

Thanks. I need this work done in headless mode.

Btw, I am curious that why the drawing or impress (pptx) works well and no need to limit some specified mode.

Because they are implemented so.

Only guessing, but for generating pdf you have separate pages. Graphics oriented programs often can not handle pages. So converting a selected area can be an “acceptable” way to avoid solving this problem.
.
Btw: You didn’t tell why it is necessary to have a converter for “any writer-file” to svg…

SVG files can be easy handled in web-browser.

There I would either provide a pdf, or convert to html, if re-flow is desired.

1 Like