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

Exporting Images from Word Docs

We've found that on occasion, the call to exporting a word doc can freeze up and hang the system.

Can you suggest anything we can apply to the code so that if it gets 'stuck' we can terminate the call or handle a timeout?

Image image = wordDocument.RenderAsImages(0, Syncfusion.DocIO.DLS.ImageType.Bitmap)

We're toying with the idea of running up a separate thread to do the export and then count X amount of mins and if it's not complete, terminate the thread. Just seems a bit of an overkill.

4 Replies

KC Karthikeyan Chandrasekar Syncfusion Team January 22, 2019 07:22 AM UTC

Hi Damien, 
Greetings from Syncfusion. As requested you may try killing the long running thread by using the code snipped discussed in the below forum. 
Meanwhile, if you could share us the document(s) which takes long time for converting, we could investigate the cause for this and try to resolve it from our end if possible. 

SK Soeren Kuklau June 13, 2019 10:15 AM UTC

I seem to be seeing similar behavior (see incident 238960), and would prefer if document.RenderAsImages() could be passed an optional CancellationToken (or a TimeSpan) so I could ask it to time out. Killing a thread seems kind of like a last resort.

VA Vijayasurya Anandhan Syncfusion Team June 14, 2019 01:20 PM UTC

Hi Damien,

Thank you for your update.

We can reproduce the issue with the “Application hangs while convert the first page of the word document to page” from our side. We will validate this issue and update you with more details on 18th June 2019.

Note: We suspect the issue occurs due to the fonts used in the word document. We request you to share all the fonts (.ttf format) used in your Word document, which will be helpful for us to track the issue and provide you solution at the earliest.
Please let us know if you have any queries. 

Vijayasurya A

VA Vijayasurya Anandhan Syncfusion Team June 18, 2019 02:32 PM UTC

Hi Damien,

Thank you for your patience.

We confirmed that the suspected issue with “Application hangs while convert the Word document to image” is a defect. We have logged a defect report. The fix for this defect will be included in our upcoming 2019 Volume 2 SP1 release, which is estimated to be available in the end of July tentatively.

Note: The patch for the reported issue is estimated to be available on 2nd July 2019. If you need patch for the issue, please let us know your current product version, which will be helpful for us to provide patch.

Vijayasurya A

Live Chat Icon For mobile
Up arrow icon