I using Spire.XLS 10.3.0.
When converting .xltx to PDF, I am facing an issue with incorrect scaling.
In the Excel template used, Scale to Fit is Scale = 100%, Width = Automatic, Height = Automatic.
It fits on one page in MS Excel print preview, but when converted to PDF with Spire.XLS, it is split into four pages instead of one.
See the attached file for details.
The following code was used when converting to PDF.
- Code: Select all
using (var workbook = new Workbook())
{
workbook.LoadTemplateFromFile("src.xltx");
workbook.SaveToFile("out.pdf", FileFormat.PDF);
}
If you lower the value of Scale To Fit, it will fit on one page even if converted to PDF.
However, we need a PDF that fits on one page while maintaining 100% scaling.
Is there a solution for this problem?
Thanks in advance.