How to convert a huge xls to pdf using LO CLI

I have this problem where the xls file is pretty long and wide too and the resulting pdf has data with split coloumns. Like in the problem mentioned here

I also tried converting the xls file using the GUI and the result was the same. Is it because of the images in my excel file that I’m getting such an issue. I did check some other posts and verified that I also have the carlito fonts on my system which I read where the substitution fonts for calibri.

the fonts used in the excel file is calibri.

Any help would be appreciated. Please let me know if you need any info regarding my tests.

Libre office version: 5.4.2.2

As mentioned in the question you linked to: use page print setup (FormatPageSheetScale) to define how many pages wide you need.

@Mike2, Is it possible to do the same with Cli by passing some options. I have a scenario to convert all docs to pdf irrespective of the coloumn width and opening GUI for each files would defeat my purpose of trying to automate a few things.

@BinoyCherian: not directly - CLI doesn’t provide this possibility; but you could either create a macro doing that, and call it using CLI; or you could use something like PyUno to control LO (which then would be a script in Python, for instance).

@Mike2, I was able to convert the xls file using cli without any issues when I used the latest version. I have a question, like the images in the pdf have reduced quality. Do you have any options to control the quality of images after conversion.

When you use File->Export as PDF, you can setup the image quality. The value is saved in user configuration, and should be used when you use CLI.