Steps for Using the PDF Thumbnail Control
- Import the trial Developer License:
License.Import(new StreamReader(@”C:\Users\Joe\license.xml”));
- 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)
{
… - Create a Editable Thumbnail Control Using PagesModel:
…
//Create a new PagesModel called model
PagesModel model = new PagesModel();//Add the selected file to the model
model.OpenPDF(OpFile.FileName);//Add the thumbnail control to the model
thumbnails1.Model = model;
}private void frmWebDocs_FormClosing(object sender, FormClosingEventArgs e)
{
//Manage what happens if the form is closed with no thumbnails loaded
if (thumbnails1.Model != null)
{
thumbnails1.Model.Close();
}
}
…