Cannot open after convert to pdf from excel

Hi, I am evaluating aspose .net assembly for converting ms office files, image files, and html file to pdf file. One problem i have is that when I convert an excel file, some of our application cannot open the converted file. Can you help me with this?
This message was posted using Banckle Live Chat 2 Forum

Hi,

I assume you are using Aspose.Cells for .NET product.

See the document on how to convert the Excel files to PDF format:
Convert an Excel file to PDF format

If you still find any issue regarding conversion, attach your template Excel file and code to reproduce the issue on our end. We will check your issue soon.

Also, try our latest version v5.3.3.

Thank you.

I am using the latest version(5.3.3) and passing the stream to the WorkBook object instead file path. Here’s my code.

public Stream Convert(Stream input)
{
MemoryStream result = new MemoryStream();
Workbook workbook = new Workbook(input);
workbook.Save(result, Aspose.Cells.SaveFormat.Pdf);
return result;
}

Also, I tried to couple of different files but the results are same.
And I wish I can upload the excel file here but I cannot find a way.

Thanks,

Hi,


When you reply the post by clicking “Reply” button, if you scroll down you will find “Add/Update” just above “Post” button. After clicking “Add/Update” a window will open, browse to your file by clicking “Choose File” and save it. You can attach anything here after zipping it.

Regarding your said issue, with my below source code I was able to produce a readable PDF file using MemoryStream and Aspose.Cells for .Net v.5.3.3. Also attached are my input and output files in an archive. I am using Acrobat Reader to view PDF on Windows 7 64bit platform.

C# code

var result = new System.IO.MemoryStream();

var workbook = new Workbook(“C:\temp\in.xls”);

workbook.Save(result, Aspose.Cells.SaveFormat.Pdf);

var ofs = System.IO.File.OpenWrite(“C:\temp\out.pdf”);

result.WriteTo(ofs);

ofs.Close();

Please share with us your sample excel file and also explain which application is unable to open the converted (PDF) file as mentioned in your first post. It would be of great help that you provide us a simple console application that can reproduce the said issue.
Thank you

Thank you for your response.

The application we are using to open pdf file is RAD PDF.
I attached files I was working to evaluate Aspose PDF convertor library.

Thanks,

Hi,

I am not sure about your RAD PDF tool. But, your converted PDF file (by Aspose.Cells for .NET) opens fine in Adobe Acrobat e.g 8, 9 etc. So, the converted PDF file is a standard file and is fine tuned.

Thank you.

When I convert the excel file to PDF using MS Office 2007 and open with the RAD PDF application, there was no problem. However, when I use aspose PDF to convert the excel file and open with RAD PDF, I have an error.

Thanks,

Hi,

Please attach your source excel file and your converted pdf (s) by Aspose.Cells and by MS Office 2007.

And screenshots showing error on your RAD Pdf tool. We will investigate the issue.

Hi There,
The attachment has source excel file, converted pdf file by aspose.cells, converted pdf file by MS office 2007, and error message when I open the pdf file converted by aspose.cells with RAD PDF.

Please let me know what is the issue.

Thanks,

Hi,


Thanks for the investigation material.
As Amjad has mentioned, we do not ensure the compatibility of Aspose.Cells generated PDF files with tools like RAD PDF tool. If the exported file opens in Adobe Acrobat then the file is fine and well tuned.

But we are curious of the difference between the two PDF files [One through Aspose, other by MS Office]. For this purpose, I have attached an archive containing two PDF files along with the input XLSX file. Aspose-PivotTable.PDF file is exported out using Aspose.Cells for .NET v 5.3.3.1 and MSOffice-PivotTable.PDF is saved using Excel 2010.

Can you please check with RAD tool, if it can open both files?
Thank you

Hi There,
With RAD PDF application, I can open the MSOffice_PivotTable.PDF but I cannot open the Aspose-PivotTable.PDF.

Thanks,


Corio

Hi Corio,


Thanks for your findings. Will you be kind enough to provide us a simplest project to show your problem with Aspose.Cells generated PDF files and RAD tool. We will look into it and may be we can figure it out.

Thanks again for your cooperation.

Hi,
I cannot give it to you since there is license key embedded but you can test their evaluation version.
Here’s Rad Pdf website;
http://www.radpdf.com/

We simple convert excel file to pdf file and view using Rad Pdf viewer.

Thanks,

Corio

Hi Corio,

Thanks for your input.

It is ok for us, if you provide us a sample project with simplest relevant code using the evaluation version of RadPdf. This will help us sorting out the issue as well as it will speed up everything.

Thanks for your cooperation.