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 convert Pdf doc to bitmap image ?

Thread ID:

Created:

Updated:

Platform:

Replies:

141829 Jan 7,2019 07:37 AM UTC Jan 8,2019 01:01 PM UTC Xamarin.Forms 1
loading
Tags: PdfViewer
Cosyspro
Asked On January 7, 2019 07:37 AM UTC

Hello,
I want convert Pdf doc to bitmap image. How to do it ?
Best regards

Sathish Sivakumar [Syncfusion]
Replied On January 8, 2019 01:01 PM UTC

Hi Cosyspro, 

Thank you for using Syncfusion products. 

We can convert the PDF document pages to images using method “ExportAsImage” in SfPdfViewer in Xamarin platforms. Please find the API details for exporting the PDF document pages to images in the below table: 

API 
Return type 
Description 
ExportAsImage(int pageIndex) 
Stream 
Summary: 
Exports the page with the given index as an image. 

Parameters: 
pageIndex: Index of the page to be exported. 
ExportAsImage(int pageIndex, float scaleFactor) 
Stream 
Summary: 
Exports the page with the given index as an image and scales the image by the given factor. 
 
Parameters: 
pageIndex: Index of the page to be exported. 
scaleFactor: The factor by which the image dimensions are to be scaled. 
 
ExportAsImage(int pageStartIndex, int pageEndIndex) 
 
Stream[] 
Summary: 
Exports the pages with indices in the given range as images. 
 
Parameters: 
pageStartIndex: Start index in the range of pages to be exported. 
pageEndIndex: End index in the range of pages to be exported. 
 
ExportAsImage(int pageStartIndex, int pageEndIndex, float scaleFactor) 
Stream[] 
Summary: 
Exports the pages with indices in the given range as images and scales the images by the given factor. 
 
Parameters: 
pageStartIndex: Start index in the range of pages to be exported. 
pageEndIndex: End index in the range of pages to be exported. 
scaleFactor: The factor by which the images’ dimensions are to be scaled. 
 

We have attached the sample to export PDF document pages to images in SfPdfViewer in the below link for your reference. 


Note : We have provided support to export PDF document pages to images using SfPdfViewer from the version 16.4.0.42. So kindly update the packages or assemblies incase you are using the lower version. 

Regards, 
Sathish 


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.

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

;