How to convert a huge xls to pdf using LO CLI

asked 2018-10-02 10:53:55 +0200

BinoyCherian gravatar image

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

edit retag flag offensive close merge delete

Comments

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

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-02 11:00:03 +0200 )edit

@Mike, 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 gravatar imageBinoyCherian ( 2018-10-02 11:53:42 +0200 )edit

@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).

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-02 12:08:02 +0200 )edit

@Mike, 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.

BinoyCherian gravatar imageBinoyCherian ( 2018-10-02 17:52:57 +0200 )edit

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.

Mike Kaganski gravatar imageMike Kaganski ( 2018-10-02 18:27:17 +0200 )edit