Save every page as an image, with the page number of its page

Hi,

how to Save every page as an image, with the page number of its page as its file name. high resolution

i read the file from a folder
?
thanks

3 Replies

PK Prakash Kumar D Syncfusion Team October 2, 2018 11:07 AM UTC

Hi jjads, 
 
Thank you for contacting Syncfusion support. You can achieve your requirement by using the following code snippet. 
 
Cod Snippet: 
 
 
            //Loads an existing Word document 
            WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx); 
 
            //Converts word document to image 
            Image[] images = wordDocument.RenderAsImages(ImageType.Bitmap); 
 
            int i = 0; 
            foreach (Image image in images) 
           
                //Saves the images as jpeg 
                image.Save(i + ".jpeg", ImageFormat.Jpeg); 
                i++; 
           
 
            //Closes the document 
            wordDocument.Close(); 
 
 
 
To know more about Word document to Image, please find the below link 
  
Regards, 
Prakash Kumar 



JJ jjads October 2, 2018 02:11 PM UTC

sorry, i meanted to read from a pdf-file


KC Karthikeyan Chandrasekar Syncfusion Team October 3, 2018 04:44 AM UTC

Hi Jjads, 
Please follow the below KB article for converting PDF to images. 

Regards, 
Karthikeyan 


Loader.
Up arrow icon