I expect the header will auto stretch keep the header only 3 lines.
But it may be keep the center header's width around 1/3 the whole sheet's width. So the header has 5 lines....
- Code: Select all
Workbook book = new Workbook();
var fi = new FileInfo(txtSource.Text);
var newFileName = fi.FullName.Substring(0, fi.FullName.Length - fi.Extension.Length) + ".pdf";
book.LoadFromFile(txtSource.Text);
book.SaveToFile(newFileName, Spire.Xls.FileFormat.PDF);