Set the print option when printing a document

I want to set my preferences in my print job. For example, I want to print 4 pages of a pdf file on one A4 paper. How can i do this?

This is my code for printing pdf files:

    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();
        }
    }
+4
source share
1 answer

You cannot do this using info.Verb = "print". By setting Verbhow print, you basically use the Windows shell command print, which takes two arguments: the file name and the name of the printer device.

PDF , (, Ghostscript), pdf . . .

+1

All Articles