Unspecified Application Error While xlsx to pdf

I use

 soffice --convert-to 'pdf:calc_pdf_Export:{"SinglePageSheets":{"type":"boolean","value":"true"}}'  a.xlsx

to convert xlsx to pdf, but I got error like this

javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
convert /tmp/a.ods as a Calc document -> /tmp/a.pdf using filter : calc_pdf_Export:{"SinglePageSheets":{"type":"boolean","value":"true"}}
/usr/include/c++/13.2.1/bits/unique_ptr.h:453: typename std::add_lvalue_reference<_Tp>::type std::unique_ptr<_Tp, _Dp>::operator*() const [with _Tp = ScPrintState; _Dp = std::default_delete<ScPrintState>; typename std::add_lvalue_reference<_Tp>::type = ScPrintState&]: Assertion 'get() != pointer()' failed.
Unspecified Application Error

xlsx to pdf is correct while without SinglePageSheets, please help how can I use SinglePageSheets?

version: LibreOffice 7.6.7.2 60(Build:2)

UPDATE(2024-09-19):
After I install the jre, I still get error

convert /tmp/a.ods as a Calc document -> /tmp/a.pdf using filter : calc_pdf_Export:{"SinglePageSheets":{"type":"boolean","value":"true"}}
/usr/include/c++/13.2.1/bits/unique_ptr.h:453: typename std::add_lvalue_reference<_Tp>::type std::unique_ptr<_Tp, _Dp>::operator*() const [with _Tp = ScPrintState; _Dp = std::default_delete<ScPrintState>; typename std::add_lvalue_reference<_Tp>::type = ScPrintState&]: Assertion 'get() != pointer()' failed.
Unspecified Application Error

How to install Java (JRE/JDK) so that LibreOffice could use it?

The “Could not find a Java Runtime Environment!” is completely harmless warning (I don’t know why we emit it - or maybe it’s not “we”, but some third-party library).

Please avoid suggesting Java installation in response to this. Only when using some functionality that really needs Java, it should be installed.

Install jre still not work for me

Created an account just to comment

Im having exactly same error converting xlsx with pdf:calc_pdf_Export:{"SinglePageSheets":{"type":"boolean","value":"true"}} using 7.6.7.2 60(Build:2) in an alpine linux docker container. The extremely weird thing that i’m only getting this error while using nodejs package libreoffice-convert which basically only creates a command for nodejs child_process exec. If I copy the command it creates:
libreoffice -env:UserInstallation=file:///tmp/soffice-81-9MeDp7L5MDWZ --headless --convert-to pdf:calc_pdf_Export:{"SinglePageSheets":{"type":"boolean","value":"true"}} --outdir /tmp/libreofficeConvert_-81-fDKMiRoUsBKs /tmp/libreofficeConvert_-81-fDKMiRoUsBKs/source
and run it manually with docker exec in the same running docker container using the same exact env variables than everything works fine for some reason.

:information_source: And downgrading to 7.5.5.2-r0 fixes everything

1 Like