0

I need your help to print PDF file in duplex setting (both side printing) using C#, My printer does support this feature I just need to know how I can print using C#?

So far I use print settings as shown in the below code but it did not work.

        PrinterSettings set = new PrinterSettings();
        set.PrinterName = comboBox1.Text;
        set.Duplex = Duplex.Vertical;

        ProcessStartInfo info = new ProcessStartInfo(Path.Combine(RootPath, "test.pdf"));
        info.Verb = "print";
        info.CreateNoWindow = true;
        info.WindowStyle = ProcessWindowStyle.Hidden;
        Process.Start(info);
  • 1
    Did you test CanDuplex? Also: Are you sure this will print anything at all? I don't see how the printersettings are connected to the acrobat process. Did you see [this](https://stackoverflow.com/questions/619158/adobe-reader-command-line-reference) ? – TaW Nov 02 '19 at 09:55
  • 1
    In this code the set object is not assigned to info or to anything so it should not have any effect. – Ignacio Soler Garcia Nov 02 '19 at 10:03
  • @Taw Yes I used CanDuplex and it returns true, also If I manually Print Duplex using Acrobat Reader I can print it both sides. – vivek bagdai Nov 04 '19 at 12:10
  • @IgnacioSolerGarcia Right but I referred this https://stackoverflow.com/a/50515890/8831829 Can you please help me how we can assign PrinterSetting object to Acrobat Reader? – vivek bagdai Nov 04 '19 at 12:11
  • I have serious doubt this is possible. One would hve to have a remoting api for acrobat but I don#t kno where that would be or if it even exists. Or one could ignore acrobat altogether and set the system wide printer settings.. Not sure how to do that or if acrobat keeps its own settings. – TaW Nov 04 '19 at 13:33

0 Answers0