Produkty Biurowe:

Automatyzacja Procesów:

Rozwój Oprogramowania:

 
Konwerter PDF do Word Nasi Klienci
 

Solid Framework Code Sample

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

Convert PDF files to HTML

The code below shows you how to convert a PDF file to clean HTML, using the OpenFileDialog function to find your PDF files and then the PDFtoHTMLConverter to convert to HTML.

Convert PDF files to HTML

Click to play Code Walk Through Video

Steps for Converting PDF to HTML

  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. Define strings to manage opening and saving files:


    String pdfPath = OpFile.FileName;
    String htmlFile= Path.ChangeExtension(pdfPath, ".html");

  4. Convert the PDF File using PDFtoHTMLConverter:


    using (PdfToHtmlConverter converter = new PdfToHtmlConverter())
    {
      //Add the selected file to the converter
      converter.AddSourceFile(pdfFile);
                    
      //Convert any graphics to Image Files
      converter.GraphicsAsImages = true;

      //set the file type for the images
      converter.ImageType = ImageDocumentType.Jpeg;

      //Automatically detect page orientation and rotate if required
      converter.AutoRotate = true;

      //Convert the file
      converter.ConvertTo(htmlFile, true);
    }
    ...

 


Mapa Strony
©2000-2017 Solid Documents Limited - Wszelkie Prawa Zastrzeżone