Produtos de Desktop :

Automação de Processos :

Desenvolvimento de Software:

 
Conversor de PDF para Word Clientes
 

Solid Framework - Amostra de Código

Este é um exemplo conciso para ajudar instalar e executar Solid Framework.Já foi testado com a Licença de Desenvolvedor Livre para Solid Framework utilizando diferentes versões do Visual Studio da Microsoft.

Extract Text from Existing PDF Files

To extract text we will use the SolidFramework.Converters.PdfToTextConverter.

Extract Text from Existing PDF Files

Clique para executar o Vídeo/Tutorial

Steps for using the PdfToTextConverter object

  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 files:


    String PdfFullPath = OpFile.FileName;

  4. Extract the text using PDFtoTextConverter:


    using (PdfToTextConverter converter = new PdfToTextConverter())
    {
    //Add the selected file
      converter.AddSourceFile(PdfFullPath);

    //Force the file to be overwritten
      converter.OverwriteMode = SolidFramework.Plumbing.OverwriteMode.ForceOverwrite;

    // Select where to save the file
     converter.OutputDirectory = @"C:\Users\nelson\Documents\samples\SF Documents Tutorials";

    //Convert the File, Saving it as the same name but with the extension .txt
    converter.Convert();
    }
    ...

 


Mapa do site
©2000-2017 Solid Documents Limited - Todos os direitos reservados.