Free Support Forum - aspose.com

Need help- save to pdf error

Hi,

I'm using pdf.dll 3.6.2.0 and cell.dll 4.4.3.1.

I have a workbook with some photo, when I try to save to pdf using the code:

myWorkBook.Save(xml_stream, FileFormatType.AsposePdf)

It show me the error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

when I try to save the workbook to excel:

myWorkBook.Save(xml_stream, FileFormatType.Excel2003)

It's ok.

I need to save the workbook into pdf. Any quick method / any code that can show me?

I have demo tomorrow. Thanks a lot.

Paul.

Hi,

Could you post your sample template file to reproduce the issue, it will really help us to figure out the issue soon.

And by the way could you try the latest fix 4.4.3.7 attached @: http://www.aspose.com/community/forums/thread/125710.aspx if it works fine.

Thank you.

cell.dll 4.4.3.7 can not fix this issue.

template attached. I have demo today later, please help.

I using the following code to reproduce the issue:

Dim workbook As Aspose.Cells.Workbook = New Aspose.Cells.Workbook()

Dim fstream As FileStream = New FileStream("c:\\test2\\error.xls", FileMode.Open)
workbook.Open(fstream)

workbook.Save("c:\\test2\\error.xml", Aspose.Cells.FileFormatType.AsposePdf)

Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()

pdf.BindXML("c:\\test2\\error.xml", Nothing)

pdf.Save("c:\\test2\\error.pdf")
fstream.Close()

Hi,

Thanks for your file. We have found this error. We will fix it soon.

Hi,

please try this fix.

Yes, It's work,

Thank you very much.

Best Regards,

Paul.