Split the PDF file into image files using c# 2008?

Question:In my PDF I have a page containing 10 images.I want to split the PDF file as 10 individual image files and save them in a separate folder.Please give me an idea or a sample solution, is there a solution on VeryPDF? I’m using c# 2008 c# PDF.

Answer: According to your needs, maybe you can have a free trial of those software:VeryPDF PDF to Image Converter and VeryPDF PDF to TIFF Extractor. By the first software, you can convert whole page PDF file to image. And by the second software, you can extract image file from PDF and then save it as tiff file. And there are both of COM version of those two software, which allows you to process image from C# 2008. Please check more detail information of those two software on homepage, in the following part, I will show you how to use this software for splitting PDF to image using  C# 2008.

Step 1. Download PDF to Image Converter COM

  • There are two license types: developer version and server version. Please choose the proper version according to your needs. But they are same in downloading file but they are different in authorization method.
  • When downloading finishes, there will be a zip file. Please extract it to some folder, then you can find executable file, help documents and other related files.

Step 2. Split PDF to image using C# 2008

  • When you use this software, please refer to the usage and examples. 
  • Here is one code example of calling this software from C# code for converting PDF to image, please have a check.
    Description:
        This function is useful to rename the output image files. For example, "AAA.pdf" will output AAA0001.jpg, AAA0002.jpg, ... files,
    Example codes:
        PDFToImageSetFileNameSuffix(".%d");
        AAA.pdf will output AAA.1.jpg, AAA.2.jpg, ... files,
        PDFToImageSetFileNameSuffix("_%2d");
        AAA.pdf will output AAA_01.jpg, AAA_02.jpg, ... files,

Example:
void main(int argc,char *argv[])
{
if(argc != 3)
   {
printf("Usage: input.pdf output.tif");
return;
  }
PDFExtractToTIFF_SetLicenseKey("XXXXXXXXXXXXXXXXXXX");
int iBeginTick,iEndTick;
PDFExtractToTIFF_SetDPI(300,300);
PDFExtractToTIFF_SetOptions("AutoInvertBWImage","1");
PDFExtractToTIFF_SetOptions("AutoMergeStrips","1");
PDFExtractToTIFF_SetOptions("RemoveThumbnail","1");
iBeginTick = GetTickCount();
int pagecount = PDFExtractToTIFF(argv[1],argv[2],0,NULL,NULL);
iEndTick = GetTickCount();
printf("Page Count(1): %d, time = %d ms\n", pagecount,iEndTick-iBeginTick);
printf("Please press any key to continue ...\n");
_getch();
PDFExtractToTIFF_SetDPI(200,200);
iBeginTick = GetTickCount();
pagecount = PDFExtractToTIFF(argv[1],argv[2],1,NULL,NULL);
iEndTick = GetTickCount();
printf("'%s' Page Count(1): %d, time = %d ms\n",argv[2],pagecount,iEndTick
-iBeginTick);
}

During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 7.5/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
Split the PDF file into image files using c# 2008?, 7.5 out of 10 based on 2 ratings

Related Posts

This entry was posted in PDF to Image Converter and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!