Last active
December 21, 2016 10:41
-
-
Save PeteGCole/4fc25ae03e8eb9a4a411b026190ff504 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Whether duplex is supported can be checked in one of two ways: | |
// These rely on the driver correctly reporting that it doesnt support duplex. | |
// 1. catch the error that occurs when trying to set duplex | |
try { | |
factory.printing.duplex = 2; | |
} catch (e) { | |
// duplex isnt supported, will need to be manual | |
} | |
// 2. use duplex2. 0 is returned if not supported | |
// (http://scriptx.meadroid.com/knowledge-bank/technical-reference/printing-factoryprinting/duplex2.aspx) | |
if ( !factory.printing.duplex2 ) { | |
// duplex isnt supported, will need to be manual | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment