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 to Searchable PDF/A-2b

The code below shows you how to convert PDF files to searchable PDF/A-2b, using the OpenFileDialog function to find your PDFs and then the PdfToPdfAConverter to convert them to PDF/A-2b.

Steps for Converting PDF to PDF/A-2b

  1. Import the trial Developer License:


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

  2. Locate the PDF files to using OpenFileDialog:


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

    //Exit if someone clicks Cancel
    if (OpFile.ShowDialog() != System.Windows.Forms.DialogResult.OK)
    {
       return; // bail on cancel
    }
    ...

  3. Convert to PDF/A using the PdfToPdfAConverter:


    ...
    string strPDFFullPath = OpFile.FileName;
    string strPDFPath = Path.ChangeExtension(strPDFFullPath, "pdfa.pdf");

    //Then using a variable called converter convert the pdf to PDF/A using the settings below.
    using (PdfToPdfAConverter converter = new PdfToPdfAConverter())
    {
      //this makes it searchable
      converter.OcrType = SolidFramework.Converters.Plumbing.OcrType.CreateSearchableTextLayer;
     
      //this sets the validation
      converter.ValidationMode = SolidFramework.Plumbing.ValidationMode.PdfA2B;

      //Then Convert the File
      converter.AddSourceFile(strPDFFullPath);
      converter.ConvertTo(strPDFPath, true);
    }

 


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