Produits de bureautique:

Automatisation de processus:

Développement de logiciel:

 
Conversion de PDF à Word Clients
 

Solid Framework Code Sample

This is a concise sample to help get started with Solid Framework SDK

Converting PDF Pages to Page Images

The code below shows you how to export pages in a PDF file to page images.

Converting PDF Pages to Page Images

Click to play Code Walk Through Video

Steps for Converting PDF Pages to Page Images

  1. Import the trial Developer License:


    License.Import(new StreamReader(@"C:\Users\Joe\license.xml"));

  2. Locate the PDF files using OpenFileDialog:


    OpenFileDialog OpFile = new OpenFileDialog();
    //show only PDF Files
    OpFile.Filter = "PDF Files (*.pdf)|*.pdf";

    if (OpFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    {
    ...

  3. Convert the Pages using PdfToImageConverter:


    ...
    using (PdfToImageConverter pageImage = new PdfToImageConverter())
    {
       //Add the selected file
       pageImage.AddSourceFile(filename);

    //Set the ImageConvertionType to extact pages
       pageImage.ConversionType = ImageConversionType.ExtractPages;

    //Set the DPI to determine the dimensions of the images
       pageImage.PageDPI = 300;

    //Choose from the supported image file types
       pageImage.OutputType = ImageDocumentType.Tiff;

    //Set this if you only want to extract certain pages
       pageImage.PageRange = PageRange.Parse("1-5");

    //Choose the directory the images will be saved to
       pageImage.OutputDirectory = @"C:\MyImages";

    //Convert the pages to images
       pageImage.Convert();
                
    }
    ...

 


Plan du site
©2000-2017 Solid Documents Limited - tous droits réservés