Convert PDF to Image using Aspose.PDF REST API throws Internal Error

I am seeing an error when I convert a PDF document to an image. In general the conversion code works just fine, but for this specific PDF document it fails. I’ll include the error as well as the PDF document:


Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a “web.config” configuration file located in the root directory of the current web application. This tag should then have its “mode” attribute set to “Off”.



<system.web>
</system.web>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the “defaultRedirect” attribute of the application’s configuration tag to point to a custom error page URL.



<system.web>
</system.web>

Hi,

Can you please try the following and let us know if it works for you?

  • Check if your package plan allows processing 2.5 MB files
  • Rename your file to a simple name like ‘Sample.pdf’

If the above suggestions do not work, please share your code, App SID and Key. You can send your SID and Key via private message.

Best Regards,

Hi Scott,


Thanks for contacting support and sorry for the delayed response.

We are testing this scenario in our environment and will keep you posted with our findings. We apologize for this inconvenience.

OK, I did some testing and changed the file name to Sample.pdf and it worked! It looks like the apostrophe and the ampersand were the problem. I’ll make sure we strip any non alphanumeric characters from the file name. I think that will fix the problem.


thanks,

Scott.

Hi Scott,


Thanks for your inquiry. It it good to know that you have managed to resolve the issue.

Please keep using our API and feel free to ask any question or concern. We will be more than happy to extend our support.

Best Regards,