Desktop Products:

Process Automation:

Software Development:

 
PDF to Word Converter Customers
 
Receive our Newsletter
 
 

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 of Solid Framework using different versions of Microsoft's Visual Studio. For version specific instructions:

    Read and modify Viewer Preferences in PDF files

    Using the Solid Framework ViewerPreferences object

    You access the viewer preferences object by calling SolidFramework.Pdf.ViewerPreferences.Create static method with SolidFramework.Pdf.PdfDocument.Catalog as the paramater. SolidFramework.Pdf.PdfDocument is the document object that you already opened.

    viewersettings_sample.png

     

    In a PDF file, viewer preferences are located off the document's catalog as a Viewer Preferences dictionary:

    viewersettings_sample_2.png

     

    Convert PDF Files to Searchable PDF files by adding a Text Layer while preserving the files original Image Compression using our OCRTransformers.

    Steps for Transforming PDF Files

    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 the user selected file and the saving of the new file.:


      ...
      using (PdfToImageConverter pageImage = new PdfToImageConverter())
      {
         //Add the selected file
         pageImage.AddSourceFile(filename);

      //Set the ImageConvertionType to extact pages
         pageImage.ConversionType = ImageConversionType.ExtractPages;

      //Set the DPI to determine the dimensions of the images
         pageImage.PageDPI = 300;

      //Choose from the supported image file types
         pageImage.OutputType = ImageDocumentType.Tiff;

      //Set this if you only want to extract certain pages
         pageImage.PageRange = PageRange.Parse("1-5");

      //Choose the directory the images will be saved to
         pageImage.OutputDirectory = @"C:\MyImages";

      //Convert the pages to images
         pageImage.Convert();
                  
      }

      ...

     


    Site Map
    ©2000-2014 Solid Documents Limited - All Rights Reserved