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.
Unfortunately, activation email could not send to your email. Please try again.

Can't open storage on LockBytes.

Thread ID:

Created:

Updated:

Platform:

Replies:

117068 Aug 4,2014 02:11 AM Aug 7,2014 05:05 AM Windows Forms 3
loading
Tags: DocIO
Narsa
Asked On August 4, 2014 02:11 AM

Hi,

I am trying to convert word binary data to PDF binary data , but Unable to convert.

It is giving an error "Can't open storage on LockBytes." at    Dim pdfDoc As PdfDocument = converter.ConvertToPDF(stream)


                                Dim stream As Stream = New MemoryStream(buffer)
                                Dim converter As New DocToPDFConverter()
                                Dim pdfDoc As PdfDocument = converter.ConvertToPDF(stream)   ' Getting an error here
                                Dim stream2 As MemoryStream = New MemoryStream()
                                pdfDoc.Save(stream2)
                                fileContent = stream2.ToArray()


Please help to solve this.

Thank you.

Nithya B [Syncfusion]
Replied On August 5, 2014 08:46 AM

Hi Narsa,

Thank you for using Syncfusion products.

We are not able to reproduce the mentioned "Can't open storage on LockBytes" exception issue on our side while converting word document stream data into PDF. We have attached sample which we have used to reproduce the mentioned exception issue on our end. Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

 

If still you are able to reproduce this issue, kindly revert back us with the sample along with the template document which you have used to reproduce the issue on your end and it would be more helpful for us to analyze further on this issue.

 

Please let us know if you have any other questions.

 

Regards,

Nithya


Attachment: Syncfusion_VB_Sample_cef59b3a.zip

Narsa
Replied On August 6, 2014 05:03 AM

Dear Nithya,

I have found problem with the document and document format is "doc"
 please download the document here Click here to download  and replace with "DoctoPDF.docx"  in your sample project .   

I cannot modify / resave the file with new format like 'docx' , beacause it is already exported to Sql server with image data type.

Thank you.



Nithya B [Syncfusion]
Replied On August 7, 2014 05:05 AM

Hi Narsa,

 

On analyzing further on the attached document, we noticed that the document is MS Word pre - 97 format (File is created using older version of MS Word previous to 97 version). Currently DocIO doesn’t have support to preserve preformatted MS Word files. As a workaround kindly resave the document using any later version of MS Word and open that document using DocIO. For your reference we have attached the modified document which is resaved by MS Word. Please do find the modified document from attachment.

 

Please do find the compatibility with MS Word supported by DocIO from below link.

http://help.syncfusion.com/ug/windows%20forms/default.htm#!documents/prerequisitesandcomp4.htm

 

Still we are able to reproduce image alignment issue in Doc to PDF conversion. We have forwarded this to our developer for further analysis.

 

As per our forum regulation, we will not be able to share the fix for the issue through forum. However, if you are interested in receiving this fix then, we would request you to use our Direct-Trac Support system to get the fix for this issue and resolve all your technical queries. For more details, please login into http://www.syncfusion.com/Account/ and we will be happy to help you.

 

Please let us know in case of any queries.

 

Regards,

Nithya


Attachment: Syncfusion_SampleDocument_3d459b2a.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;