0 Replies - 183 Views - Last Post: 10 February 2020 - 09:48 AM Rate Topic: -----

#1 Danamo51   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 03-November 19

Command printer to print in duplex?

Posted 10 February 2020 - 09:48 AM

My application reads and prints simple but sometimes lengthy text files. This works fine, but since my printer can print in duplex I want it to, so it will print on both sides of the paper instead of just one side.

I know that the Escape code (27)(38)(108)#(83) is the command which tells my printer to print in duplex mode, but how, in vb.net (Visual Studio 2017) do I send that to the printer at the start of a print job?

Or, alternatively, I see that vb.net has "CanDuplex" and "Duplex = True" properties in "Printing.PrinterSettings" but I can't figure out how to use this. I have tried
Dim pr As New PrinterSettings
Dim ps As New Printing.PrinterSettings
If ps.CanDuplex = True Then
   pr.Duplex = True
Else
   pr.Duplex = False
End If


but this doesn't work.

What is the best - and simplest - way to tell the printer to print in duplex at the start of my existing / working print routine?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1