I need to merge multiple documents into a single PDF in a web application running on Ubuntu Server. I've merged PDFs in the past so that shouldn't be an issue, but the documents can also contain doc, docx, xls, and xlsx files. I'm guessing my best bet it to convert those to PDF first.
After searching around a bit it seems the most popular way of doing this is to run LibreOffice from the command line to convert them. I've tested it and it works, however it seems that installing that requires installing X11 on the server, which is less than ideal.
Even beyond that issue, when I've tested it will Excel documents it seems to just page break the spreadsheet by columns in a way that makes it impossible to follow.
So I guess my questions are:
- Is approach the best choice for this?
- If so, is there a way to install LibreOffice without x11?
- Is there a way to more gracefully handle how it converts spreadsheets?