After the conversion of an Excel file to PDF there is an empty space on the right side of a merged cells region filled in with text.
Are there any conversion settings that can be applied to make an entire region width to be used like in the original Excel file?
We plan to use a commercial version of Spire.XLS for conversion, but testing the library using the trial commercial version 14.6.2 to check if it fully meets our needs first.
Our code:
- Code: Select all
val excelFilePath = ...
val pdfFilePath = ...
val workbook: Workbook = new Workbook()
workbook.loadFromFile(excelFilePath)
workbook.getConverterSetting.setSheetFitToWidth(true)
workbook.setCustomFontFileDirectory(Array(<fontsFolder>))
val worksheet: Worksheet = workbook.getWorksheets.get(0)
worksheet.saveToPdf(pdfFilePath)
Attaching original Excel and screenshot of output PDF files.
Thanks, Lesya.