Desktop Products:

Process Automation:

Software Development:

 
PDF-naar-Word-converter Klanten
 
Ontvang onze nieuwsbrief
 
 

Solid Framework Code Sample

This is a concise sample to help get Solid Framework up and running. It has been tested with the Free Developer License for Solid Framework using different versions of Microsoft's Visual Studio.

Convert PDF Files to Word

The code below shows you how to combine multiple PDF files, using the OpenFileDialog function to find your PDF file and then the PagesModel to combine your multiple files to a single PDF file.

Steps for Converting PDF to Word

  1. Import the trial Developer License:


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

  2. Locate the PDF files to 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 wordPath = Path.ChangeExtension(pdfPath, ".docx");

  4. Convert the PDF File using PDFtoWordConverter:


    ...
    using (PdfToWordConverter converter = new PdfToWordConverter())
    {
      //Add the selected file
      converter.AddSourceFile(pdfPath);
                   
      //Continuous mode recovers text formatting, graphics and text flow
      converter.ReconstructionMode = ReconstructionMode.Continuous;
      
      //Or Use Flowing Reconstruction Mode if you need to keep the look and feel of the PDF
      converter.ReconstructionMode = ReconstructionMode.Flowing;

      //Convert the file renaming it with the word extension and setting overwrite to true
      converter.ConvertTo(wordPath, true);
    }
    ...

 


Sitemap
©2000-2013 Solid Documents Limited - Alle rechten voorbehouden