We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Printing via Aspose.Cells.Rendering much different than printing from Excel

I have a web application that is opening excels, consolidating sheets into one excel, then sending to the printer. If I save the newly created excel as a file, and print from within excel, it prints exactly as expected. If I send to the same printer via Aspose.Cells.Rendering, it looks much different. Is there any known issues with the Renderer? I can provide an example excel file that demonstrates the issue if that helps. Some of the issues I have noticed are: large left margin, cells that are wrapped don't print the wrapped text & wordart doesn't print in the same color.

Thanks.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please provide us your sample file and the source code to replicate this issue.

Please also download and try the latest version: Aspose.Cells
for .NET v7.3.4.3
and see if it makes any difference.

Once, you will provide us your source files and the source project/code, we will investigate your issue at our end and help/advise you asap.

Thanks for your response. I have attached a test file. If you print this via excel, then print via the logic below, you should notice the difference. I am having difficulty coming up with an example of the wrapping issue however. I have examples generated by our system, but when I change the data in the excel (manually) to be something I can distribute, the problem can't be produced. I will continue to try and build an example for that, but if you could check into why the wordArt is off, and the font sizes don't match that would be helpful.

Code:

Workbook wkbPrintTest = new Workbook(@"C:\printTest.xlsx");

System.Drawing.Printing.PrinterSettings printSettings = new System.Drawing.Printing.PrinterSettings();
string strPrinterName = printSettings.PrinterName;
Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();
options.PrintingPage = PrintingPageType.Default;

Aspose.Cells.Rendering.WorkbookRender wr = new Aspose.Cells.Rendering.WorkbookRender(wkbPrintTest, options);
wr.ToPrinter(strPrinterName);

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

After initial investigation, we were able to observe this issue. Please see the following test code below.

I have also attached the output pdfs generated directly and via printer using Aspose.Cells for a reference.

We have logged this issue in our database. We will look into this issue and fix it. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-41285.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\printTest.xlsx”;


Workbook wkbPrintTest = new Workbook(filePath);

wkbPrintTest.Save(filePath + “.out.pdf”);


System.Drawing.Printing.PrinterSettings printSettings = new System.Drawing.Printing.PrinterSettings();

string strPrinterName = printSettings.PrinterName;

Aspose.Cells.Rendering.ImageOrPrintOptions options = new Aspose.Cells.Rendering.ImageOrPrintOptions();

options.PrintingPage = PrintingPageType.Default;


Aspose.Cells.Rendering.WorkbookRender wr = new Aspose.Cells.Rendering.WorkbookRender(wkbPrintTest, options);

wr.ToPrinter(strPrinterName);

Hi again,


First of all, please accept our apologies for the delayed response.

Please give a try to the latest version of Aspose.Cells for .NET 16.12.8 against the problem logged earlier as CELLSNET-41285 and share your feedback.