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

is PDF to Image conversion available in AspNet Core?

and see the sample, but not able to add or find the PdfViewer to my project.json, am I missing something?

I would like to be able to parse a PDF page to an image to create thumbnails or large output to PNG of the page.

15 Replies

TW Troy Walker January 20, 2017 09:19 PM UTC

I think I may now see the limitation...

If I am now understanding things correctly, the Syncfusion for ASP.NET Core does "not" have the PdfViewer library (Syncfusion.PdfViewer.Windows.dll), so that feature is not available. (?)

Is that feature available in the ASP.NET MVC version? 

 If so, would I be able to add that into my AspNetCore Project, and only target windows platform for it by adding the net461 framework dependency?


TW Troy Walker January 23, 2017 08:47 PM UTC

well.. I've tried numerous things and am totally ignorant here on how to integrate PdfDocumentView() to my project.

I even removed the aspnetcore framework to use only net461, adding:

(14.4.0.20 versions of)
Syncfusion.AspNet.Mvc5
Syncfusion.AspNet.Mvc5.FileFormats
Syncfusion.AspNet.Mvc5.PdfViewer

to no avail, the PdfDocumentView class is completely missing.


TW Troy Walker January 23, 2017 11:33 PM UTC

hello again :)

so, I have something now working,  and not all capabilities of the PDF are being converted properly.

here is the code I have working now using net461, which your MVC5 (classic) package (version: 14.4.0.15)

PdfDocumentView pdfDoc = new PdfDocumentView();

pdfDoc.Model = new PdfViewerModel();

var docStream = new FileStream("test.pdf", FileMode.Open);

pdfDoc.Model.LoadedDocument = new PdfLoadedDocument(docStream);

Bitmap img = pdfDoc.Model.LoadedDocument.ExportAsImage(0, new SizeF(2550, 3300), 300, 300, false);


img.Save("test.png", ImageFormat.Png);


While the pdf does get converted to high resolution image (png), it does not respect the transparency of objects in the original PDF file.

I have attached the samples from my test.  Am I missing a setting or some other property?  Also, my use of the "model" seems a little hacky, but it was the only way I could get it to work.


Attachment: Syncfusion_test_01_57de749f.7z


SA Sabari Anand Senthamarai Kannan Syncfusion Team January 24, 2017 11:23 AM UTC

Hi Troy, 
 
Thank you for using Syncfusion products. 
 
Please find the details for your queries in the below table. 
 
Query 
Details 
and see the sample, but not able to add or find the PdfViewer to my project.json, am I missing something? 
We do not support PDF viewer control in the ASP.NET Core platform. However, we have added this request to our features request list and it can be available in any of our upcoming releases.  
I think I may now see the limitation... 
 
If I am now understanding things correctly, the Syncfusion for ASP.NET Core does "not" have the PdfViewer library (Syncfusion.PdfViewer.Windows.dll), so that feature is not available. (?) 
 
Is that feature available in the ASP.NET MVC version? 
While the pdf does get converted to high resolution image (png), it does not respect the transparency of objects in the original PDF file. 
I have attached the samples from my test.  Am I missing a setting or some other property? Also, my use of the "model" seems a little hacky, but it was the only way I could get it to work. 
We have created an incident under your account for the queries in your last update. We request you to follow the incident for further updates. You can log in to our support system using the following link,  
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Sabari Anand


MC Mark Chidlow August 7, 2017 11:45 AM UTC

Is there an update on the ability to convert PDF to an Image in an .NET Core application please?



SA Sabari Anand Senthamarai Kannan Syncfusion Team August 8, 2017 07:26 AM UTC

Hi Mark, 
  
Thank you for using Syncfusion products. 
  
At present we do not provide support for “Converting the PDF document pages to image using the PDF library in .NET Core framework”. The feature requires GDI+ functions under System.Drawing namespace to render the PDF element. At present, The .NET Standard framework does not support GDI+ functions and System.Drawing namespace. However, we are analyzing the alternate ways to implement the above mentioned functions. So this feature may be available in any of our future releases. 
  
Please let us know if you need any further assistance. 
  
Regards, 
Sabari Anand 



JF Jake Finnigan June 7, 2018 03:48 PM UTC

Since it's almost been 1 year, is there any update on this?
We would definitely need this feature :)

Many thanks !


AA Akshaya Arivoli Syncfusion Team June 8, 2018 09:40 AM UTC

Hi Stefan, 

Thank you for contacting Syncfusion support. 

We have created new incident under your account regarding the support for “Converting the PDF document pages to images in .NET Core”. Please log on to our support website to check for further updates.      

Please let us know if you have any concern on this. 

Regards, 
Akshaya 



EF Effy replied to Akshaya Arivoli October 15, 2018 02:54 PM UTC

Hi Stefan, 

Thank you for contacting Syncfusion support. 

We have created new incident under your account regarding the support for “Converting the PDF document pages to images in .NET Core”. Please log on to our support website to check for further updates.      

Please let us know if you have any concern on this. 

Regards, 
Akshaya 


Hi,

Could you please publish an updated response for all users?
The System.Drawing API is already available on .NET standard and core AFAIK

Thanks,
Effy


KK Karthik Krishnaraj Syncfusion Team October 17, 2018 07:03 AM UTC

Hi Effy, 
 
Still we haven’t provided support for “Converting PDF document pages to images in ASP.NET Core platform”. However, we have planned to implement this request and it will be included in our Essential Studio 2019 Volume 1 release which will be rolled out in the month of March 2019. 
 
Regards, 
Karthik.  



MN Meikanda Nayanar Syncfusion Team April 2, 2019 05:59 AM UTC

Hi Effy,

The support for “Converting PDF document pages to images in ASP.NET Core platform” was added to our 2018 Vol 4 release. This release is available for download under the following link.

 

https://www.syncfusion.com/forums/141547/essential-studio-2018-volume-4-release-v16-4-0-42-is-available-for-download

 

Documentation link on how to convert the PDF pages in ASP.NET Core: https://ej2.syncfusion.com/aspnetcore/documentation/pdfviewer/how-to/export-as-image/

 

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

 

Thanks,

Meikandan



EF Effy April 2, 2019 08:43 AM UTC

Thank you Meikandan, I appreciate the update.


RT Ramya Thirugnanam Syncfusion Team April 2, 2019 09:13 AM UTC

Hi Effy, 
 
Thanks for your update. 
 
Regards, 
Ramya T 



KE Kevin January 27, 2020 05:22 PM UTC

does it work on linux?


AA Akshaya Arivoli Syncfusion Team January 28, 2020 06:19 AM UTC

Hi Kevin, 

Thank you for using Syncfusion products. 

The ExportAsImage() functionality using EJ2 PDF Viewer server library in ASP.NET Core will be compatible with LINUX environment.  Please use the Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux package to work in Linux environment. Find the list of supported platforms and their corresponding packages, 

  • Windows - Syncfusion.EJ2.PdfViewer.AspNet.Core.Windows
 
  • Linux- Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux
 
  • iOS - Syncfusion.EJ2.PdfViewer.AspNet.Core.OSX

Please find the below UG link for more details, 


Kindly revert us if any concerns. 

Regards, 
Akshaya 



Loader.
Up arrow icon