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.

is PDF to Image conversion available in AspNet Core?

Thread ID:

Created:

Updated:

Platform:

Replies:

128424 Jan 20,2017 09:42 AM Jun 8,2018 05:40 AM ASP.NET Core 8
loading
Tags: PdfViewer
Troy Walker
Asked On January 20, 2017 09:42 AM

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.

Troy Walker
Replied On January 20, 2017 04:19 PM

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?

Troy Walker
Replied On January 23, 2017 03:47 PM

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.

Troy Walker
Replied On January 23, 2017 06:33 PM

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

Sabari Anand Senthamarai Kannan [Syncfusion]
Replied On January 24, 2017 06:23 AM

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

Mark Chidlow
Replied On August 7, 2017 07:45 AM

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


Sabari Anand Senthamarai Kannan [Syncfusion]
Replied On August 8, 2017 03:26 AM

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 


Stefan Gavrilas
Replied On June 7, 2018 11:48 AM

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

Many thanks !

Akshaya Arivoli [Syncfusion]
Replied On June 8, 2018 05:40 AM

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 


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.

;