// Create the print job
job = printManager.NewJob();
// Add the files to print, with their passwords and the page list, if set
foreach (ListViewItem fileItem in listViewJobFiles.Items)
{
string password = "";
if (fileItem.SubItems.Count > 1)
{
password = fileItem.SubItems[1].Text;
}
string pageList = "";
if (fileItem.SubItems.Count > 2)
{
pageList = fileItem.SubItems[2].Text;
if (pageList == "All") pageList = "";
}
job.AddPDFFromFile(fileItem.Text, password);
if (pageList != "")
{
job.SetPageList(fileItem.Index, pageList);
}
}