Where do I change default page size in headless libreoffice?

asked 2020-02-13 11:15:39 +0100

rishi gravatar image

updated 2020-02-13 11:18:24 +0100

I am using following command to convert xlsx to pdf: /usr/lib/libreoffice/program/soffice --headless --convert-to pdf:calc_pdf_Export --outdir test/ gor_convert_3.xlsx

I have two separate systems and in both the systems I get different number of pages through this command. It is because in one system it is converting to pdf using A4 size & in another using letter size. I have checked files in /etc/libreoffice in both the systems and they are same. I also copied user config files (~/.config/libreoffice/4) from system 1 to system 2 but still the output is different. Do I need to restart the libreoffice to get the change to take place or is there any other config file where this info is stored? Thanks for your help.

edit retag flag offensive close merge delete

Comments

Are the systems really identical? For example, if you have different Language / Locale settings which affect printer settings. Having one as English - (UK) and the other as English - (USA) would have default printer for UK International size (A4) and the American as US Letter. These differences could also be found in the default template with their own default page, paragraph and character styles.

petermau gravatar imagepetermau ( 2020-02-13 13:01:04 +0100 )edit

I also copied user config files (~/.config/libreoffice/4) from system 1 to system 2

That would only help if you initially made changes in LO on system 1 to set LibreOffice locale from, say, Default - English (UK) to English (UK) (without default). Then the config files (specifically registrymodifications.oxt) would contain the entry (default means "not configured, detect from system"), and thus have effect on the target system 2.

Mike Kaganski gravatar imageMike Kaganski ( 2020-02-14 07:22:29 +0100 )edit