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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can't open storage on LockBytes.

Thread ID:





117068 Aug 4,2014 06:11 AM UTC Aug 7,2014 09:05 AM UTC WinForms 3
Tags: DocIO
Asked On August 4, 2014 06:11 AM UTC


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()
                                fileContent = stream2.ToArray()

Please help to solve this.

Thank you.

Nithya B [Syncfusion]
Replied On August 5, 2014 12:46 PM UTC

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.




Attachment: Syncfusion_VB_Sample_cef59b3a.zip

Replied On August 6, 2014 09:03 AM UTC

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 09:05 AM UTC

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.



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.




Attachment: Syncfusion_SampleDocument_3d459b2a.zip


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon