Convert excel to PDF from command line

Hello Everyone,

I am trying to convert one excel to pdf using following command from command line.

soffice.exe --headless -convert-to pdf --outdir “outputdir” “inputfile”.

Is there any way to provide the pagelayout option also in command prompt where i want provide page layout option as single page.

No such option exist.

is it always default page layout when we convert to pdf from command line? can we change the setting permanently to single page layout in any xml or ini file?

It will use whatever is chosen in PDF save dialog last time. You may look at registrymodifications.xcu for what XML entry gets changed at the change, and you may use a dedicated user profile for your exports to be independent from your main profile that you could change later.