Productos para Ordenadores de Escritorio:

Automatización de Procesos:

Desarrollo de Software:

 
Convertidor PDF a Word Customers
 

Solid Framework Code Sample

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

Convert PDF Files to Word

The code below shows you how to convert a PDF file to a Word document, using the OpenFileDialog function to find your PDF file and then the PDFtoWordConverter to convert to Microsoft Word.

Convert PDF Files to Word

Click to play Code Walk Through Video

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 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;

    // To catch conversion result and display it to the user use the following
    ConversionStatus result = converter.ConvertTo(wordPath, true);
    SolidFramework.Forms.SolidMessageBox addDialog = new SolidFramework.Forms.SolidMessageBox(this);
    addDialog.Content = result.ToString();
    addDialog.Text = "Conversion Result";
    addDialog.ShowIcon = true;
    addDialog.MessageIcon = MessageBoxIcon.Information;
    addDialog.Execute();

    //To just convert the file with no message use only
    converter.ConvertTo(wordPath, true);
    }
    ...

 


Mapa del Sitio
©2000-2017 Solid Documents Limited - Todos los Derechos Reservados.