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
close icon

How to convert Pdf doc to bitmap image ?

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

1 Reply

SS Sathish Sivakumar Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon