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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to export as image with Zoom?

Thread ID:





125148 Jul 25,2016 04:49 PM UTC Jul 26,2016 06:22 PM UTC WPF 2
Tags: PdfViewer
Asked On July 25, 2016 04:49 PM UTC

How do I export a page to an image with zoom factor?
Thanks in advance
(in the winrt version theExportAsImage accept a zoom factor,i dont see it in WPF)

Praveena P [Syncfusion]
Replied On July 26, 2016 04:43 PM UTC

Hi Tomer, 
Thank you for using Syncfusion Products. 
At present we do not support exporting pages of the PDF document as images with custom zoom factor using PDF viewer WPF. As a workaround please use the ExportAsImage method in PdfLoadedDocument by providing custom size for an image to export. 
Please find the code snippet for your reference. 
PdfLoadedDocument pdf = new PdfLoadedDocument("example.pdf"); 
SizeF s = pdf.Pages[0].Size; 
Bitmap image = pdf.ExportAsImage(0, new SizeF(s.Width * zoomfactor, s.Height * zoomfactor), true); 
We have also provided a sample below which exports the page as image with custom size for your reference. 
Please let me know if you need any further assistance. 

Replied On July 26, 2016 06:22 PM UTC



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon