Desktop Products:

Process Automation:

Software Development:

PDF til Word konverterer Kunder

Solid Framework Code Sample

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

Combine Multiple PDF Files to a Single PDF File

In this tutorial we show you how to combine multiple PDF pages to a single PDF file.

Combine Multiple PDF Files to a Single PDF File

Click to play Code Walk Through Video

Steps for Combining Multiple PDF Files

  1. Import the trial Developer License:

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

  2. Allow multi selection of only PDF files using OpenFileDialog:

    // Create a Open File Dialog that allows you to select multiple files
    OpenFileDialog OpFile = new OpenFileDialog();
    OpFile.Multiselect = true;

    //show only PDF Files
    OpFile.Filter = "PDF Files (*.pdf)|*.pdf";

    //Do nothing if someone clicks on cancel
    if (OpFile.ShowDialog() != System.Windows.Forms.DialogResult.OK)

  3. Create a new Solid Framework PagesModel Object:

    //create a new pages model object
    using (PagesModel model = new PagesModel())

  4. Open the selected files with the new model:

    //create a IPageSource for the selected files then add each of the files to one source
    foreach (string filename in OpFile.FileNames)
      // For each file add it to a source and collate them
      SolidFramework.Model.Pdf.Pages.IPageSource source = model.CreateSource(filename);
      model.Insert(model.PageCount, source);

  5. For Each file selected add it to a new source and insert them into a single file:

      // save the new combined file


©2000-2018 Solid Documents Limited - med enerett