OUT OF MEMORY convert xls to pdf (Urgent Production Issue)

Good morning,

We are getting out of memory when we convert xls to pdf. It was mention that this was fixed I had this problem back in 2003 and before I received a fix from your company the report causing the issue was split out. The problem is back because the report has now grown and a split does not look likely. It was mentioned that newer version of pdf correct this issue so we installed pdf.7 .3 and we are using cells. 4.3.0.2. This is an ASP.net website, Framework 2.0. The xml file is approx 50,000kb.. Please advise, Sincerely, Georgette Innamorato

Hi,


It looks like you are using Aspose.Cells for .NET product and Aspose.Pdf product to convert the Excel spreadsheets to PDF files. This is an older approach and it has its own drawbacks(performance, efficiency and reliability etc.)

We have introduced new and direct approach now. Aspose.Cells for .NET supports conversion from spreadsheets to PDF independently of other software. Save an Excel file to PDF using the Workbook class’ Save method. The Save method provides the SaveFormat.Pdf enum member that converts the native Excel files to PDF format.
Converting directly from spreadsheet to PDF, instead of using a third-party tool or external API, has several advantages:
  • Direct conversion does not require temporary files because the whole process can be done in memory.
  • No XML file is needed so large files can easily be converted.
  • The conversion speed is much faster.
Please see the topic for your reference:
http://www.aspose.com/docs/display/cellsnet/Converting+to+PDF+Files

So, we recommend you to kindly upgrade to latest Aspose.Cells for .NET versions that support direct conversion with enhancements, you may download the latest version here:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry420470.aspx

Also, we are afraid, we cannot provide any support or cannot fix any issue if you find any in your older versions like v4.3.x.x. We can only fix issues based on latest versions, so we recommend you to use/upgrade to latest Aspose.Cells for .NET version(s). If you still find the issue, kindly provide your source Excel file, we will check it soon.

Thank you.

Thank you for getting back to me so quickly. Ok we downloaded version 7.3.3 of cells and we are attempting to convert .xlsx 839 KB to pdf with the code below and the PDF creation never stops it keeps growing and growing.. we also tried this with the pdfsaveoptions

body { margin: 0 0 0 0; padding:0 0 0 0 } td,div { font-family:Tahoma;font-size:8pt;vertical-align:top } /* Copyright IBM Corp. 2011 All Rights Reserved. */ body { margin: 0 0 0 0; padding:0 0 0 0; overflow:hidden; } .transcript { background-color:#d2d2d2; } .messageBlock { padding-left:10px; padding-right:10px; margin-bottom:3px } .message { padding-left:20px; margin-left:95px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre; white-space:pre-wrap;} .messageCont { padding-left:20px; margin-left:95px; word-wrap:break-word; white-space:-moz-pre-wrap; _white-space:pre;white-space:pre-wrap;} .other { font-size:11px;color:#39577a;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .myself { font-size:11px;color:#da8103;font-style:normal;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont { font-size:8px;text-align:right; color:#39577a;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .myselfCont { font-size:8px;text-align:right; color:#da8103;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .system { font-size:11px; word-wrap:break-word;color:#da8103;font-style:normal;font-weight:normal; white-space:-moz-pre-wrap; _white-space:pre;white-space:pre-wrap; } .showTimestamp { padding-left:20px; font-size:11px; float:right; color:#999999;font-style:normal;font-weight:normal; } .other1 { font-size:11px; color:#ac2000;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont1 { font-size:8px;text-align:right; color:#ac2000;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .other2 { font-size:11px; color:#3c9fa8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont2 { font-size:8px;text-align:right; color:#3c9fa8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .other3 { font-size:11px; color:#e25614;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont3 { font-size:8px;text-align:right; color:#e25614;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .other4 { font-size:11px; color:#0b6ac8;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont4 { font-size:8px;text-align:right; color:#0b6ac8;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .other5 { font-size:11px; color:#b23290;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont5 { font-size:8px;text-align:right; color:#b23290;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .other6 { font-size:11px; color:#02e7c7;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont6 { font-size:8px;text-align:right; color:#02e7c7;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .other7 { font-size:11px; color:#5b3284;vertical-align:top;font-weight:bold;font-style:normal;float:left; width:95px; } .otherCont7 { font-size:8px;text-align:right; color:#5b3284;font-family:Arial,Lucida Grande;font-style:normal;vertical-align:top;font-weight:bold;float:left; width:95px; } .highlight { background-color:#bed6f8; } .datestamp { padding-right:0px; font-size:11px; cursor:default; margin-bottom:1px; background-color:#c0c0c0; width:100%; float:left; text-align:right; color:#ffffff; font-weight:bold; font-style:italic; } #chatAlert { float:left; border-bottom:1px solid #E8D091; padding:6px; width:100%; color:#A5754C; } #chatAlertImage { float:left; } #chatAlertText { float:left; margin-left:6px; } #chatAlertClose { float:right; margin-right:10px; padding-right:6px; margin-top:0px; } #chatAlertText a { color:#A5754C; } #chatAlertText a:hover { color:#A5754C; text-decoration:none; }

.tsDisplay { display:block }.dsDisplay { display:block }
Sub Main()
Dim fileName As String = “D:\AppShare\mmip\09302012_PIACLFSG_Capital_Shares_Proof_10252012_140509”
Dim objExcel As New Aspose.Cells.Workbook(fileName + “.xlsx”)
Dim license As Aspose.Cells.License = New Aspose.Cells.License
license.SetLicense(“Aspose.Total.lic”)

Dim pdfSaveOptions As New PdfSaveOptions()
pdfSaveOptions.Compliance = PdfCompliance.PdfA1b

Console.Write("Before pdf create")
objExcel.Save(fileName + ".pdf", pdfSaveOptions)
Console.Write("After pdf create")

End Sub

Hi,


Please attach your template XLSX file here, we will check your issue soon.

Thank you.