sreeni

sreeni

  • NA
  • 3
  • 0

Duplex printing help plz…

May 1 2006 5:33 PM

Hi, I want to print bulk PDF files from C# or VB.Net code. I have written the below snippet to do the same.

DirectoryInfo dir =

                                                            new DirectoryInfo(folderPath);

 

                                                //create an array of files using FileInfo object

                                                FileInfo [] files;

                                                //get all files for the current directory

                                                files = dir.GetFiles("*.*");

 

                                                //iterate through the directory and print the files

                                                foreach (FileInfo file in files)

                                                {

 

 

                                                            ShellExecute(0, "print", file.FullName, "", "", 1);

                                                           

                                                           

                                                           

                                               

                                                }

 

                                                return true;

                                    }

                                               

                                   

                                    catch(Exception ex)

                                    {

                                   

                                                return bReturnLog;                  

                                    }

Now my problem is I want to print on of the file in duplex mode (both sides). So how can I send the instructions to the printer to print this file in duplex mode and I want to change setting back to print other files in single side. Could you plz advice me or give me the code snippet to resolve this Issue. Thanks!