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.

Azure Hosted : SyncFusion DocToPDFConverter.ConvertToPDF : A generic error occurred in GDI+.

Thread ID:

Created:

Updated:

Platform:

Replies:

120526 Sep 23,2015 09:37 AM Sep 24,2015 06:21 AM ASP.NET Web Forms 1
loading
Tags: DocIO
Erwann Blancart
Asked On September 23, 2015 09:37 AM

Hi,

I am facing an issue with my WebApp hosted in Azure. This application is hosted in PaaS Azure mode in a WebApplication.

I am using SyncFusion 13.2.0.39 to Merge a Word document and then convert this document into a PDF file. 

Here is the error : System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
Here is the Stack trace :
System.AggregateException: One or more errors occurred. ---> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
   at System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, String description)
   at System.Drawing.Imaging.Metafile..ctor(Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type)
   at Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.CreateImage(WPageSetup pageSetup, ImageType imageType, MemoryStream stream, Int32 resolution)
   at Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.LayoutPages()
   at Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.Layout(IWordDocument doc)
   at Syncfusion.DocToPDFConverter.DocToPDFConverter.ConvertToPDF(WordDocument wordDocument)

In my Solution I have the following dll files : 
Syncfusion.Compression.Base
Syncfusion.Core
Syncfusion.DocIO.Base
Syncfusion.DocToPdfConverter.Base
Syncfusion.Pdf.Base

Do you have any idea where this problem is coming from ? 

Narendran Srinivasan [Syncfusion]
Replied On September 24, 2015 06:21 AM

Hi Erwann,

Thank you for choosing Syncfusion products,

Essential DocIO uses GDI+ functionalities for converting a Word document to PDF. Whereas some of the GDI+ functionalities are not supported in Windows Azure websites and this is known limitation in Windows Azure environment. Hence the mentioned error is thrown while deploying the Word to PDF conversion in Azure websites. For workaround solution kindly refer the below forum link

http://www.syncfusion.com/forums/116900/error-when-converting-doc-to-pdf

Regards,
Narendran


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.

;