I've read following and many more:
- print xlsx file from command line using ghostscript and libreoffice
- Print chosen worksheets in excel files to pdf in python
- Python Converting an Excel file (.xlsx) to a PDF (.pdf)
- Python - Converting XLSX to PDF
- Can you hard print an .xlsx file on Linux with Python? (unasnwered)
- Python library to open existing .xlsx workbook with charts
- I have an xlsx file that contains lots of charts, tables and pictures (png watermarks inserted into the excel sheet as picture). E.g. see this sample template.
- I want to print this to a pdf.
- I'm on Linux and preferably want to use Python.
Closest I came was using libreoffice
as described in answer #1 (Command used: libreoffice --headless --invisible --convert-to pdf ./Book1.xlsx
) in list above. But all the text/formatting is messed up (whether I open the pdf file on Linux where I printed it or on Windows where I created the original xlsx file):
Same xlsx file printed on Windows using Excel App's print to pdf:
File does look ok when I open it in libreoffice-calc on linux: