0

I have a 13 column xlsx and I want convert to pdf. I use this code: "soffice" ,"--headless","--convert-to", "pdf" , filepath ,"--outdir",outpath. I can convert to pdf but the columns too many so they have been showed on four pages. I need they show on one page. And it show on straight , I need it show on horizontal. Thanks

abby_520
  • 11
  • 2

1 Answers1

0

XLSX printout settings (PDF export) are part of the file contents so here is the same file saved with different settings but same export command. (convert-to implies headless, so not generally needed. The author decides a cell content and shape and also sets how many rows and columns will fit in a standard page such as A4 portrait or A4 Landscape etc. Thus only a macro can change print layout area. The best that may be possible externally is to scale it up or down on to bigger or smaller paper.

soffice --convert-to pdf:calc_pdf_Export "DataTables example Default.xlsx"
soffice --convert-to pdf:calc_pdf_Export "DataTables example A3.xlsx"

You need to change layout for printing and export in the preview screen if you want 13 columns you set area from A:1 to M:Y where Y is your desired number of lines (whatever their variable height may be.)

enter image description here

enter image description here

K J
  • 8,045
  • 3
  • 14
  • 36