Class WebClientPrint
Provides methods for registering the WebClientPrint script code in ASP.NET Views.
Inheritance
Inherited Members
Namespace:Neodynamic.SDK.Web
Assembly:cs.temp.dll.dll
Syntax
public class WebClientPrint
Properties
LicenseKey
Gets or sets the LicenseKey.
Declaration
public static string LicenseKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LicenseOwner
Gets or sets the LicenseOwner.
Declaration
public static string LicenseOwner { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CreateScript(String, String, String)
Returns a [script] tag linking to the WebClientPrint script code by using the specified URL for the ClientPrintJob generation.
Declaration
public static string CreateScript(string webClientPrintAbsoluteUrl, string clientPrintJobAbsoluteUrl, string sessionID)
Parameters
Type | Name | Description |
---|---|---|
System.String | webClientPrintAbsoluteUrl | The Absolute URL to the WebClientPrint API (usually a Controller class in MVC). |
System.String | clientPrintJobAbsoluteUrl | The Absolute URL to the Controller that will generate the ClientPrintJob object. |
System.String | sessionID | The current Session ID. |
Returns
Type | Description |
---|---|
System.String | A [script] tag linking to the WebClientPrint script code by using the specified URL for the client print job generation. |
CreateWcppDetectionScript(String, String)
Returns a [script] tag linking to the WCPP-detection script code.
Declaration
public static string CreateWcppDetectionScript(string webClientPrintAbsoluteUrl, string sessionID)
Parameters
Type | Name | Description |
---|---|---|
System.String | webClientPrintAbsoluteUrl | The Absolute URL to the WebClientPrint API (usually a Controller class in MVC). |
System.String | sessionID | The current Session ID. |
Returns
Type | Description |
---|---|
System.String | A [script] tag linking to the WCPP-detection script code. |
Remarks
The WCPP-detection script code ends with a 'success' or 'failure' status.
You can handle both situation by creating two javascript functions which names must be wcppDetectOnSuccess() and wcppDetectOnFailure(). These two functions will be automatically invoked by the WCPP-detection script code.
The WCPP-detection script uses a delay time variable which by default is 10000 ms (10 sec). You can change it by creating a javascript global variable which name must be wcppPingDelay_ms. For example, to use 5 sec instead of 10, you should add this to your script:
var wcppPingDelay_ms = 5000;
GenerateScript(String, String)
Generates the WebClientPrint scripts based on the specified query string. Result is stored in the HTTP Response Content
Declaration
public static byte[] GenerateScript(string webClientPrintAbsoluteUrl, string queryString)
Parameters
Type | Name | Description |
---|---|---|
System.String | webClientPrintAbsoluteUrl | The Absolute URL to the WebClientPrint API (usually a Controller class in MVC). |
System.String | queryString | The Query String from current HTTP Request. |
Returns
Type | Description |
---|---|
System.Byte[] |
GetProcessRequestType(String)
Determines the type of process request based on the Query String value.
Declaration
public static RequestType GetProcessRequestType(string queryString)
Parameters
Type | Name | Description |
---|---|---|
System.String | queryString | The query string of the current request. |
Returns
Type | Description |
---|---|
RequestType | A valid type of process request. In case of an invalid value, an ArgumentException is thrown. |
ProcessPrintJob(String)
Returns true if the specified QueryString is for processing a ClientPrintJob; otherwise it returns false.
Declaration
public static bool ProcessPrintJob(string queryString)
Parameters
Type | Name | Description |
---|---|---|
System.String | queryString | The query string of the current request. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified QueryString is for processing a ClientPrintJob; otherwise it returns false. |