Convert excel to PDF from command line

asked 2018-02-19 11:40:39 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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.

edit retag flag offensive close merge delete


No such option exist.

Mike Kaganski gravatar imageMike Kaganski ( 2018-02-19 11:42:44 +0200 )edit

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?

Alokdash11 gravatar imageAlokdash11 ( 2018-02-19 11:48:30 +0200 )edit

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.

Mike Kaganski gravatar imageMike Kaganski ( 2018-02-19 12:00:15 +0200 )edit