我想设置我的打印作业。例如,我想在一张A4纸上打印4页PDF文件。我该怎么做?
这是我的打印PDF文件的代码:
private void SendToPrinter()
{
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
ProcessStartInfo info = new ProcessStartInfo();
info.Verb = "print";
info.FileName = ofd.FileName;
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process p = new Process();
p.StartInfo = info;
p.Start();
p.WaitForInputIdle();
System.Threading.Thread.Sleep(3000);
if (false == p.CloseMainWindow())
p.Kill();
}
}