-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: sreeni2219
Message 1 in Discussion
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 = <o:p></o:p>
new
DirectoryInfo(folderPath);<o:p></o:p>
<o:p> </o:p>
//create an array of files
using FileInfo object<o:p></o:p>
FileInfo [] files;<o:p></o:p>
//get all files for the current
directory<o:p></o:p>
files =
dir.GetFiles("*.*");<o:p></o:p>
<o:p> </o:p>
//iterate through the directory
and print the files<o:p></o:p>
foreach (FileInfo file in
files)<o:p></o:p>
{<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
ShellExecute(0,
"print", file.FullName, "", "", 1);<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
}<o:p></o:p>
<o:p> </o:p>
return true;<o:p></o:p>
}<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
catch(Exception ex)<o:p></o:p>
{<o:p></o:p>
<o:p></o:p>
return bReturnLog;
<o:p></o:p>
}
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!
<o:p> </o:p>
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]