Wrong conversion from xls/html file to pdf

Hi, I have the attached xls/html file. If from Excel I go in the print preview section I can correcty see the pages.

With this function:

Public Function Xls2Pdf(ByVal inputFile As String, ByVal outputFile As String) As Boolean
Try
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US")
Dim licence As Aspose.Cells.License = New Aspose.Cells.License()
licence.SetLicense("Aspose.Cells.lic")

Dim opts As New HTMLLoadOptions(LoadFormat.Html)
Dim workbook As New Workbook(inputFile, opts)

Dim so As New PdfSaveOptions
workbook.Save(outputFile, so)

Return True

Catch ex As Exception
ScriviLog("Errore Xls2Pdf: inputFile: " & inputFile & " outputFile: " & outputFile & " " & ex.Message, CStr(Now))
Return False
End Try
End Function

I was able to save it as pdf (attachment n.2), but I get only 8 pages instead of 60 and I have to zoom the pdf a lot of times to see the content.

Can you try?

Thank you.

Hi,


Thanks for the template files.

After an initial test, I observed the issue as you mentioned by using your template
HTML file and sample code. I found it renders 8 pages instead of 60
pages and we have to set the zoom or scaling factor to higher value in
Adobe reader to view the data properly in those pages in the rendered PDF.

e.g


Sample code:


HTMLLoadOptions opts = new HTMLLoadOptions(LoadFormat.Html);


Workbook workbook = new Workbook(“e:\test2\Template.xls”, opts);


PdfSaveOptions so = new PdfSaveOptions();


workbook.Save(“e:\test2\out1.pdf”, so);


I have logged a ticket with an id “CELLSNET-43413” for your issue. We will look into it to figure it out soon.

Thank you.


Thank you, We’ll waiting for a solution.

Hi,


Please try our latest version/fix: Aspose.Cells for .NET v8.4.0.1 (attached).

We have fixed your issue “CELLSNET-43413” now.

Let us know your feedback.

Thank you.

Thank you very much, I try with new version and now it’s working!

Hi Stefano,


It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

The issues you have found earlier (filed as CELLSNET-43413) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.