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

Error while creating object of class PdfRenderer

I want to export pdf pages as image with Annotations. So I added following nuget package to my class library.

But I got following error when I tryin to create object of PdfRenderer class 

Please let me know the reason for this error and how can I rectify this error

sample project is also attached to this thread

- package folder is removed from the project to upload the sample here otherwise file size is getting bigger then allowed file size. following are the contents of package folder

Attachment: TestApplication_7e8364f8.zip

1 Reply

VV Visvesvar Venkatesan Syncfusion Team November 14, 2022 09:32 AM

On Analyzing further, we found that you are using EJ2 PDF Viewer ExportAsImage MVC library API in ASP.NET core application. In EJ2 PDF Viewer MVC server library we need to include the System.Runtime.Caching package in sample level. So, we need to install the NuGet package in both projects(i.e TestApplication and TestLib projects).

We have modified the provided sample and shared for your reference below,


Instead of using EJ2 PDF Viewer MVC server library ExportAsImage API, you can use EJ2 PDF Viewer ASP.NET core library and refer it in the ASP.NET core application. Kindly find the documentation for it below.


Live Chat Icon For mobile
Up arrow icon