Hello,
I used this code to convert this xlsx file to a pdf. But this pdf is missing a bit of content:
I used this code:
using GemBox.Spreadsheet;
class Program
{
static void Main()
{
// If using Professional version, put your serial key below.
SpreadsheetInfo.SetLicense("FREE-LIMITED-KEY");
// In order to convert Excel to PDF, we just need to:
// 1. Load XLS or XLSX file into ExcelFile object.
// 2. Save ExcelFile object to PDF file.
ExcelFile workbook = ExcelFile.Load("ComplexTemplate.xlsx");
workbook.Save("Convert.pdf", new PdfSaveOptions() { SelectionType = SelectionType.EntireFile });
}
}
And also tried to set each worksheet from the Workbook to:
foreach (var workSheet in _excelFile.Worksheets)
{
workSheet.PrintOptions.FitWorksheetWidthToPages = 1;
workSheet.PrintOptions.FitWorksheetHeightToPages = 1;
}
TypeOfFileThatIsWrapped = DocumentType.SpreadsheetFile;
But that also didn’t work. How can I fit the excel file on a single pdf page?
Greetings Brian
File: