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
// synchronous waitforspooling complete - unsupported, little tested. use at your own discretion. | |
// | |
function WaitForSpoolingComplete() { | |
var licenseGuid = "{09df1dc1-cba3-48a8-aebe-ef2f287b51cd}"; // replace with own | |
var serverApiUrl = MeadCo.makeApiEndPoint("http://127.0.0.1:41191", "v1/printHtml"); | |
var printApi = MeadCo.ScriptX.Print; | |
if (printApi.isSpooling) { | |
var jobs = printApi.queue; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<h1>WaitForSpoolingComplete Scenarious</h1> | |
<div> |
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 | |
} |
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
@using MeadCo.ScriptXClient | |
<div class="pagecontent"> | |
<button class="btn btn-default" id="btn-print">Print document</button> | |
</div> | |
@* Output ScriptX tags. Will use installer page if required *@ | |
@MeadCo.ScriptXClient.ClientPrinting.GetHtml( | |
clientValidationAction: ClientPrinting.ValidationAction.Redirect, | |
printSettings: new PrintSettings |
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
<meadco> | |
<scriptx> | |
<clientinstaller | |
filename="~/content/meadco.scriptx/installers/smsx.cab" | |
manualfilename="~/content/meadco.scriptx/installers/ScriptX.msi" | |
version="7.7.0.20" scope="machine" processor="x86" | |
installhelper="~/ScriptXClientPrinting/Install" /> | |
</scriptx> | |
</meadco> | |