Articles in this section
Category / Section

How to avoid generic error occurred in GDI+ while saving EMF image in Azure?

3 mins read

Syncfusion Excel® (XlsIO) library is a .NET Excel library used to create, read, and edit Excel documents. Using this library, you can manipulate Excel documents in Azure platform.

Azure platform does not support the manipulation of images in EMF format. So, while using XlsIO on the Azure platform, it will throw a GDI+ exception when it comes across EMF images. To handle similar scenarios, XlsIO has an API called EnablePartialTrustCode to ensure whether the XlsIO library is used in Azure. This will enable XlsIO to handle image manipulation according to the Azure platform.

C#

ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
// For Azure platform
application.EnablePartialTrustCode = true;

 

VB.NET

Dim excelEngine As ExcelEngine = New ExcelEngine()
Dim application As IApplication = excelEngine.Excel
//For Azure platform
application.EnablePartialTrustCode = True

 

Learn more about Essential XlsIO through the documentation, where you will find features like importing and exporting in DataTable, appending multiple records to worksheet using Template Markers, exporting worksheet into CLR Objects etc., with respective code examples.

Refer here to explore the rich set of Syncfusion® Excel (XlsIO) library features.

Note:

Starting with v16.2.0.x, if you reference Syncfusion® assemblies from a trial setup or from the NuGet feed, include a license key in your projects. Refer to the link to learn about generating and registering the Syncfusion® license key in your application to use the components without a trial message.

 

Conclusion

I hope you enjoyed learning about How to avoid generic error occurred in GDI+ while saving EMF image in Azure.

You can refer to our XIsIO’s feature tour page to learn about its other groundbreaking features. Explore our UG documentation and online demos to understand how to manipulate data in Excel documents.

If you are an existing user, you can access our latest components from the License and Downloads page. For new users, you can try our 30-day free trial to check out XlsIO and other Syncfusion® components.

If you have any queries or require clarification, please let us know in the comments below or contact us through our support forumsSupport Tickets, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied