First, thanks for your packages, they're really usefull.
I have a simple xls file, that i want to convert into a pdf file, to print on a specific printer.
When i use FreeSpire.Xls to convert the file, i have no problems, it works fine.
But if i print the pdf with the Spire.Pdf version include in the FreeSpire.Xls package, i have the "evaluation warning" on the top of my page.
So i added the freespire.pdf to print without this "warning", but in that case i have the following excetpion to the line
- Code: Select all
Workbook wb = new Workbook();
"Could not load type 'spr᠔' from assembly 'Spire.XLS, Version=11.8.6.0, Culture=neutral, PublicKeyToken=663f351905198cb3' because it attempts to implement a class as an interface.":"spr᠔"
After some research, i found that i have to use FreeSpire.Office if i need more than one "Spire Package".
But when i use this last one, i have no more errors, but the created pdf is blank.
My Workbook contain a single sheet, with 13 cols and 49 rows. I don't know what to do...
Here's my code :
- Code: Select all
Workbook wb = new Workbook();
wb.LoadFromFile(pathXls);
wb.SaveToFile(pathPdf, FileFormat.PDF);
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(pathPdf);
doc.PrintSettings.PrinterName = printerName;
doc.Print();
Thanks for your time,
Kind Regards