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.

error when converting doc to pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

116900 Jun 26,2014 10:08 AM Dec 12,2017 11:49 PM ASP.NET MVC (Classic) 24
loading
Tags: DocIO
Andrea Inglese
Asked On June 26, 2014 10:08 AM

when generating a pdf from a word template, we get the following exception.

Problem is that when we run the application locally the application works, we have published it to an hosting provider and setted full trust and it worked, but when published on azure websites, it throw this exception:

Server Error in '/' Application.

Parameter is not valid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentException: Parameter is not valid.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[ArgumentException: Parameter is not valid.]
   System.Drawing.Graphics.GetHdc() +1144425
   Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.CreateImage(WPageSetup pageSetup, ImageType imageType, MemoryStream stream, Int32 resolution) +339
   Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.LayoutPages() +120
   Syncfusion.DocIO.DLS.Rendering.DocumentLayouter.Layout(IWordDocument doc) +133
   Syncfusion.DocToPDFConverter.DocToPDFConverter.ConvertToPDF(WordDocument wordDocument) +47


Andrea Inglese
Replied On June 26, 2014 10:10 AM

does this rely to the above problem?
http://stackoverflow.com/questions/18726106/azure-websites-full-trust

Sathish K [Syncfusion]
Replied On June 30, 2014 10:41 AM

Hi Andrea,

 

Thank you for your interest in 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. As a workaround, kindly use Azure cloud services to convert Word documents to PDF and call this service from Azure web site.

 

Please let us know if you have any other questions.

 

Regards,

Sathish


José Matos
Replied On May 28, 2015 06:15 PM

Is there any solution or workaround ?

Thanks

Sathish K [Syncfusion]
Replied On May 29, 2015 03:08 AM

Hi Jose,

Thank you for your update.

As mentioned earlier, currently Azure doesn’t provide full-fledged support for GDI functionalities. Due to this limitation in Azure, when we convert the Word document as PDF document using Essential DocIO, the conversion process become fails because Word document to PDF conversion depends on GDI functionalities. So it is a known limitation in Word document to PDF conversion using DocIO until complete GDI functionalities are supported in Azure.

As a workaround you shall make use of Azure cloud service to convert a Word document as Pdf and use that cloud service as service reference in your azure web site. We have prepared a sample to illustrate the same.

Please find the sample for Azure cloud service from below link:
http://www.syncfusion.com/downloads/support/directtrac/general/GeneratePdf_ColudService2143814054.zip

Please find the sample using cloud service as service reference from below link:
http://www.syncfusion.com/downloads/support/directtrac/general/WordToPdfConversion-329039872.zip

Please let us know if you have any other questions.

Regards,
Sathish


Erwann Blancart
Replied On September 23, 2015 11:36 AM

Hi,

Did this situation get any better since then ?

I created a ticket http://www.syncfusion.com/forums/120526/azure-hosted-syncfusion-doctopdfconverter-converttopdf-a-generic-error-occurred-in-gdi because I am facing the same problem.

Is creating a Cloud Service hosted application is the only workaround ?

Thanking you in advance.

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

Hi Erwann,

Thank you for contacting Syncfusion support,

Currently GDI+ functionalities are not supported in Windows Azure websites and this is known limitation in Windows Azure environment. Till Windows Azure supports
full-fledged on GDI+ functionalities we can use below sample as work around solution.

Please find the sample for Azure cloud service from below link:
http://www.syncfusion.com/downloads/support/directtrac/general/GeneratePdf_ColudService2143814054.zip

Please find the sample using cloud service as service reference from below link:
http://www.syncfusion.com/downloads/support/directtrac/general/WordToPdfConversion-329039872.zip

Regards,
Narendran



Ian Elbury
Replied On April 5, 2016 04:57 PM

Actually GDI+ is available on Basic and Standard Web Apps with restrictions. I used to not be able to run MS ReportViewer because of the GDI+ limitation but it was fixed a couple of years ago.

Your competitors seems to have resolved the problem with many of their components. I believe that the trick is to use bitmap format and NOT metafile format during conversion. Looking at the stack trace, it seems like this fix may possible. Try Google "GDI+ error or OutOfMemoryException on exporting".

Would it be possible to see if it can be resolved? The workaround you are proposing precludes the use of your product my solutions.

Thanks

Sarathkumar V [Syncfusion]
Replied On April 6, 2016 08:46 AM

Hi Ian,

Thank you for contacting Syncfusion support.

A support incident to track the status of the
your query has been created under your account. Please log on to our support website to check for further updates,

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions.

Regards,
Sarath

Stefano Tessarin
Replied On April 28, 2016 09:05 AM

Hi,

I'm facing the same problem on Azure. Is it possible, as suggested by Ian, to convert image based on bitmap instead of metadata? This should fix easily your issue.

Sarathkumar V [Syncfusion]
Replied On April 29, 2016 06:53 AM

Hi Stefano,

Thank you for contacting Syncfusion support.

A support incident to track the status of the your query has been created under your account. Please log on to our support website to check for further updates,

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

Please let me know if you have any questions.

Regards, 
Sarath 


Tetteh Sackey
Replied On July 17, 2016 01:09 PM

I'm facing the same problem on Azure. Has the suggestion by Ian been applied?

Sethumanikkam Yogendran [Syncfusion]
Replied On July 18, 2016 05:39 AM

Hi Tetteh Sackey,

Thank you for your update.

We regret to let you know that the support for “Word to PDF conversion in Azure environment” is not yet implemented and we have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We request you to visit our website periodically for feature related updates.

As a workaround you shall make use of Azure cloud service to convert a Word document as Pdf and use that cloud service as service reference in your azure web site.

Thanks,
Sethumanikkam.Y


Daniel Casado
Replied On November 11, 2016 04:26 AM

Hi,

today I'm facing the same problem with converting a presentation file to PDF.
I'm aware of this problem by using other vendors for reporting in the past.  But they have solved this today, so that I'm not facing this error until today.

Is there any expected timeframe to solve this problem by SyncFusion?

Migrating from App Service (Web Site) to a Cloude Service is not an option for us.


Regards,
Daniel

Arun Prasad Matheshwaran [Syncfusion]
Replied On November 16, 2016 06:49 AM

Hi Daniel,

Thank you for contacting Syncfusion support.

A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates,

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you need further clarifications regarding this, 

Thanks, 
Arun 


Brad Vossler
Replied On November 17, 2016 10:57 PM

Any chance I can get updates on this as well? Thanks

Sethumanikkam Yogendran [Syncfusion]
Replied On November 21, 2016 06:03 AM

Hi Brad,

Thank you for contacting Syncfusion support.

We regret to let you know that the support for “Word to PDF and PPTX to PDF conversions in Azure environment” is not yet implemented and we have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We request you to visit our website periodically for feature related updates.

A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates,

https://www.syncfusion.com/account/login

Please let us know if you need further clarifications regarding this.

Thanks,
Sethumanikkam.Y


Torsten Fischer
Replied On November 24, 2016 01:48 AM

Any chance I can get updates on this as well? Thanks

Sethumanikkam Yogendran [Syncfusion]
Replied On November 24, 2016 11:42 PM

Hi Torsten,

Thank you for contacting Syncfusion support.

We regret to let you know that the support for “Word to PDF and PPTX to PDF conversions in Azure environment” is not yet implemented and we have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We request you to visit our website periodically for feature related updates.

Thanks,
Sethumanikkam.Y


Ryan Finken
Replied On December 28, 2016 03:03 PM

I'm facing the same problem and would like to receive updates on it as well.

I just deployed a new feature using this converter and was disappointed to see it fail on the Azure platform. Is there an ETA as to when this change will be implemented? This seems to have been idle since April 2016.

Sethumanikkam Yogendran [Syncfusion]
Replied On January 2, 2017 07:42 AM

Hi Ryan Finken,

We regret for the inconvenience caused.

Still we have not resolved GDI limitations specific to Azure environment. We have plans to resolve these limitations in near future and we are working towards finding the alternate solution for these limitations. At this moment we cannot provide any concrete timeline for this feature. We will let you know once this feature has been implemented.

Please let us know if you have any other questions.

Thanks,
Sethumanikkam.Y


Mark cho
Replied On January 20, 2017 03:38 PM

Does it work with AzureWebJob?

Sivasubramani V [Syncfusion]
Replied On January 27, 2017 08:39 AM

Hi Mark,

We regret for the inconvenience caused.

Due to the GDI+ limitation, DocIO doesn’t provide the support for Word to PDF conversion in Azure platform using Azure WebJob.

As mentioned in the previous update, we have plans to resolve these limitations (GDI+ limitation in Azure platform) in Azure environment. At this moment, we cannot provide any concrete timeline for this feature. Let you know once this feature has been implemented.

Please let us know if you have any other questions.

Thanks,
Sivasubramani.  


Daniel Casado
Replied On December 12, 2017 10:01 AM

Hi, Are there any updates for this issue?

Regards,
Daniel

Sethumanikkam Yogendran [Syncfusion]
Replied On December 12, 2017 11:49 PM

Hi Daniel,

Thank you for your update.

We are glad to inform you that the support for Word to PDF conversion using Essential DocIO in Azure has been already provided in our latest Essential Studio version (since v15.3.0.26).


You can download our Essential Studio 2017 Volume 3 - v15.3.0.26 from the following link.
https://www.syncfusion.com/forums/131983/essential-studio-2017-volume-3-release-v15-3-0-26-is-available-for-download

Please find the below KB link to know more about Word to PDF conversion in Azure Environment:
https://www.syncfusion.com/kb/7751/is-it-possible-to-perform-word-to-pdf-conversion-in-azure-environment

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


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.

;