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

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

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 ? 

1 Reply

NS Narendran Srinivasan Syncfusion Team September 24, 2015 10:21 AM UTC

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


Loader.
Up arrow icon