We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

XlsIO and DocIO to PDF conversion errors

Hello,

I am finding few flaws when converting XlsIO and DocIO to PDF. Below is the code I use and attached is the orignial file and the associated pdf. If anyone can notice a flaw in the code or help it anyway it would be great.

Thanks.


Dim od As New OpenFileDialog()

If od.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim excelEngine As New ExcelEngine

' Instantiate the excel application object.

Dim application As IApplication = excelEngine.Excel

Dim myWorkbook As IWorkbook = application.Workbooks.Open(od.FileName)

Dim ms As New System.IO.MemoryStream()

myWorkbook.SaveAsXml("out.xml", ExcelXmlSaveType.DLS)
Dim pdfDocument As PDFLogicDocument = New PDFLogicDocument()
pdfDocument.OpenXml("out.xml")
'Save as PDF.
pdfDocument.Save(System.IO.Path.GetFileName(od.FileName.Remove(od.FileName.Length - 4, 4)) + ".pdf")
End If

PDF Documents.zip

10 Replies

AD Administrator Syncfusion Team December 8, 2006 12:00 AM UTC

Hi Nick,

I was able to reproduce the issue. I have forward this issue to the development team and will update you as soon as I hear back.

Sorry for the inconvenience caused.

Regards,
Prakash.


AD Administrator Syncfusion Team December 8, 2006 04:48 PM UTC

Hello Prakash,

Thank you for the quick reply. On another note, I am trying to find a way to avoid going though the trouble of save an out.xml file just to load back into memory a moment later. I tried using a memory stream but it returns an error Is there a way to avoid this step by using a stream?

Nick


AD Administrator Syncfusion Team December 11, 2006 04:34 PM UTC



>Hello Prakash,

Thank you for the quick reply. On another note, I am trying to find a way to avoid going though the trouble of save an out.xml file just to load back into memory a moment later. I tried using a memory stream but it returns an error Is there a way to avoid this step by using a stream?

Nick

I found my problem. I had to reset the memory stream to beginning of the stream.

ms.Seek(0, System.IO.SeekOrigin.Begin)



AD Administrator Syncfusion Team December 11, 2006 10:03 PM UTC

Hi Nick,

I am glad to know that your problem has been resolved and thanks for your update.

Regards,
Prakash.


AD Administrator Syncfusion Team December 12, 2006 06:52 PM UTC

The streaming problem has been resolved, but there is still a problem with PDF creation as mentioned in the very first post. Please let me know of your results as you find them.

Thanks,

Nick


AD Administrator Syncfusion Team December 12, 2006 08:18 PM UTC

Hi Nick,

I was able to see the problem. However could you please send me your sample C# application which would help me further investigating on this issue.

Regards,
Prakash.


AD Administrator Syncfusion Team December 12, 2006 09:13 PM UTC

Here is the sample VB .Net Application. It now uses a memory stream instead of the out.xml file.

Nick

TestSyncFusionWord2.zip


AD Administrator Syncfusion Team December 13, 2006 10:31 PM UTC

Hi Nick,

I was able to reproduce the issue. It looks that there are some bugs in XL to PDF conversion. However, I have forward this issue to the development team for getting their thoughts regarding this issue. I will update you with in a day or two.

I regret for the inconvenience caused.

Regards,
Prakash.


AD Administrator Syncfusion Team December 21, 2006 10:37 PM UTC

Hello Prakash,

I was wondering if there has been any progress on the issue?

Thanks.

Nick


DK Dhivya K Syncfusion Team December 22, 2006 07:40 AM UTC

Hi Nick,

Sorry for the confusion.

Currently we do not have full support for XlsIO and DocIO to PDF conversions.

We provide these features as utility for those who own all the three products. We can only convert simple Excel and word document into PDF. I could find that your Excel file to be very complex. This is the problem with Excel to PDF conversion.
Also, in your word document,I could find some shapes in it which are not currently supported.

We do not have any immediate plans of implementing these features in the near future.However we do have plans of improving this utility in the future.

Sorry for the inconvenience.

Regards,
Dhivya.

Loader.
Live Chat Icon For mobile
Up arrow icon