diff options
Diffstat (limited to 'print/v4PrintDriverSamples')
5 files changed, 53 insertions, 94 deletions
diff --git a/print/v4PrintDriverSamples/PrinterExtensionSample/README.md b/print/v4PrintDriverSamples/PrinterExtensionSample/README.md index 5f9dfc36..043811a4 100644 --- a/print/v4PrintDriverSamples/PrinterExtensionSample/README.md +++ b/print/v4PrintDriverSamples/PrinterExtensionSample/README.md @@ -8,25 +8,15 @@ products: - windows-wdk --- - - -<!--- - name: Printer Extension Sample - platform: Application - language: cs - category: Print - description: Demonstrates how to use .NET to build a customized, desktop UI for a v4 print driver. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617945 ----> - # Printer Extension Sample This sample demonstrates how to use .NET to build a customized, desktop UI for a v4 print driver. This .NET app uses PrintTicket, PrintCapabilities and Bidi in order to communicate with the print system and is suitable for inclusion in a v4 print driver. -**Note** This sample is for the v4 print driver model. +> [!NOTE] +> This sample is for the v4 print driver model. -# Related topics +## Related topics -[Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644) +[Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver) -[v4 Print Driver Interfaces and Enumerations](http://msdn.microsoft.com/en-us/library/hh464103(v=vs.85).aspx) +[v4 Printer Driver](https://docs.microsoft.com/windows-hardware/drivers/print/v4-printer-driver) diff --git a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md index bf0c4bbf..a98abd5f 100644 --- a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md +++ b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md @@ -8,34 +8,25 @@ products: - windows-wdk --- - - -<!--- - name: Print Driver Constraints Sample - platform: Utility - language: js - category: Print - description: Demonstrates how to implement advanced constraint handling and PrintTicket/PrintCapabilities handling using JavaScript. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617946 ----> - # Print Driver Constraints Sample This sample demonstrates how to implement advanced constraint handling, and also PrintTicket/PrintCapabilities handling using JavaScript. The Constraints.js file in this sample demonstrates the implementation of JavaScript-based constraints to be used with a v4 print driver. The file implements the following two of the four functions used by JavaScript constraint files, as well as several helper functions: -- **ValidatePrintTicket** takes a given [IPrintSchemaTicket](http://msdn.microsoft.com/en-us/library/hh451398(v=vs.85).aspx) object and validates it for the current printer. The function may determine that the Print Ticket was already valid, modify the Print Ticket to make it valid, or determine that the Print Ticket is invalid and could not be made valid. -- **CompletePrintCapabilities** takes a given **IPrintSchemaTicket** object and the [IPrintSchemaCapabilities](http://msdn.microsoft.com/en-us/library/hh451256(v=vs.85).aspx) object that was produced by the configuration module and augments it as needed. This can be used to establish positive constraint situations. +- **ValidatePrintTicket** takes a given [IPrintSchemaTicket](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/printerextension/nn-printerextension-iprintschematicket) object and validates it for the current printer. The function may determine that the Print Ticket was already valid, modify the Print Ticket to make it valid, or determine that the Print Ticket is invalid and could not be made valid. + +- **CompletePrintCapabilities** takes a given **IPrintSchemaTicket** object and the [IPrintSchemaCapabilities](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/printerextension/nn-printerextension-iprintschemacapabilities) object that was produced by the configuration module and augments it as needed. This can be used to establish positive constraint situations. This sample does not demonstrate **ConvertPrintTicketToDevMode** or **ConvertDevModeToPrintTicket**, which utilize a property bag to store data in the private section of the DEVMODE structure. -**Note** This sample is for the v4 print driver model. +> [!NOTE] +> This sample is for the v4 print driver model. -# Related topics +## Related topics -[Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644) +[Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver) -[IPrintSchemaCapabilities](http://msdn.microsoft.com/en-us/library/hh451256(v=vs.85).aspx) +[IPrintSchemaCapabilities](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/printerextension/nn-printerextension-iprintschemacapabilities) -[IPrintSchemaTicket](http://msdn.microsoft.com/en-us/library/hh451398(v=vs.85).aspx) +[IPrintSchemaTicket](https://docs.microsoft.com/windows-hardware/drivers/ddi/content/printerextension/nn-printerextension-iprintschematicket) diff --git a/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md b/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md index 0fc9a4b0..3c7bfba2 100644 --- a/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md +++ b/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md @@ -9,22 +9,12 @@ products: - windows-wdk --- - - -<!--- - name: USB Host-Based Print Driver Sample - platform: Utility - language: js xml - category: Print - description: Demonstrates how to support host-based devices that use the v4 print driver model and are connected via USB. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617947 ----> - # USB Host-Based Print Driver Sample This driver sample demonstrates how to support host-based devices that use the v4 print driver model, and are connected via USB. -**Note** This sample is for the v4 print driver model. +> [!NOTE] +> This sample is for the v4 print driver model. Windows enables manufacturers to support Bidirectional Communication (Bidi) for USB devices, by using a combination of both a Bidi XML file and a Javascript file known as a USB Bidi extender. The *usb\_host\_based\_sample.js* file that is included with the sample, plays the role of the USB Bidi extender. @@ -34,39 +24,44 @@ By default, Bidi queries and status requests are routed over the USB device inte In addition to extending Bidi communication, this driver sample also specifies the schema elements that it supports. The *usb\_host\_based\_sample\_extension.xml* file that is included with the sample, provides information about the supported schema elements. -The Bidi schema is a hierarchy of printer attributes, some of which are properties and others that are values (or value entries). +The Bidi schema is a hierarchy of printer attributes, some of which are properties and others that are values (or value entries): -*Property* +- *Property* + + - A property is a node in the schema hierarchy. A property can have one or more children, and these children can be other properties or values. -- A property is a node in the schema hierarchy. A property can have one or more children, and these children can be other properties or values. +- *Value* -*Value* + - A value is a leaf in the schema hierarchy that represents either a single data item or a list of related data items. A value has a name, a data type, and a data value. A value cannot have child elements. -- A value is a leaf in the schema hierarchy that represents either a single data item or a list of related data items. A value has a name, a data type, and a data value. A value cannot have child elements. +For more information, see [USB Bidi Extender](https://docs.microsoft.com/windows-hardware/drivers/print/usb-bidi-extender) and [Bidi Communication Schema](https://docs.microsoft.com/windows-hardware/drivers/print/bidirectional-communication-schema). -For more information, see [USB Bidi Extender](http://msdn.microsoft.com/en-us/library/windows/hardware/jj659903(v=vs.85).aspx) and [Bidi Communication Schema](http://msdn.microsoft.com/en-us/library/windows/hardware/ff545169(v=vs.85).aspx). +## File manifest Here are the core files that you will find in this sample: -**usb\_host\_based\_sample.js** +### usb\_host\_based\_sample.js + +A USB Bidi Extension JavaScript file which includes support for controlling printing for host-based devices. This is the only code in the driver sample. It is invoked by USBMon and it communicates with the device to do the following: -- A USB Bidi Extension JavaScript file which includes support for controlling printing for host-based devices. This is the only code in the driver sample. It is invoked by USBMon and it communicates with the device to do the following: - Determine if the device is ready to receive data - - Check to see if there is an error condition - - Read the device status + +- Check to see if there is an error condition + +- Read the device status -**usb\_host\_based\_sample\_events.xml** +### usb\_host\_based\_sample\_events.xml -- A 'driver events' XML file that specifies an event which detects when the user needs to flip over the paper in the tray. +A 'driver events' XML file that specifies an event which detects when the user needs to flip over the paper in the tray. -**usb\_host\_based\_sample\_extension.xml** +### usb\_host\_based\_sample\_extension.xml -- A USB Bidi Extension XML file that specifies the supported Bidi Schema elements for this driver. +A USB Bidi Extension XML file that specifies the supported Bidi Schema elements for this driver. ## Build the sample -For information and instructions about how to test and deploy drivers, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx). +For information and instructions about how to test and deploy drivers, see [Developing, Testing, and Deploying Drivers](https://docs.microsoft.com/windows-hardware/drivers/develop/). ## Run the sample -To understand how to run this sample as a Windows driver, see the [v4 Printer Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/hh706306(v=vs.85).aspx) collection of topics.
\ No newline at end of file +To understand how to run this sample as a Windows driver, see the [v4 Printer Driver](https://docs.microsoft.com/windows-hardware/drivers/print/v4-printer-driver) collection of topics. diff --git a/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md b/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md index 1db85fb3..e68dd7a4 100644 --- a/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md +++ b/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md @@ -9,36 +9,28 @@ products: - windows-wdk --- - - -<!--- - name: Print Driver USB Monitor and Bidi Sample - platform: Utility - language: js xml - category: Print - description: Demonstrates how to support bidirectional (Bidi) communication over the USB bus using JavaScript and XML. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617948 ----> - # Print Driver USB Monitor and Bidi Sample This sample demonstrates how to support bidirectional (Bidi) communication over the USB bus, using JavaScript and XML. This sample supports bidirectional status while not printing, and unsolicited status from the printer while printing. +## File manifest + The following files are included in the sample: -**USBMON\_Bidi\_JavaScript\_File.js** +### USBMON\_Bidi\_JavaScript\_File.js -- This JavaScript file demonstrates the implementation of a Bidi support for USBMon with a v4 print driver. The JavaScript file supports three functions: getSchemas() is used to make Bidi GET queries to a device, setSchema() is used to make a single Bidi SET query to the device, and getStatus() is called repeatedly during printing in order to retrieve unsolicited status from the printer using the data from the read channel of the device. +This JavaScript file demonstrates the implementation of a Bidi support for USBMon with a v4 print driver. The JavaScript file supports three functions: getSchemas() is used to make Bidi GET queries to a device, setSchema() is used to make a single Bidi SET query to the device, and getStatus() is called repeatedly during printing in order to retrieve unsolicited status from the printer using the data from the read channel of the device. -**USBMON\_Bidi\_XML\_File.xml** +### USBMON\_Bidi\_XML\_File.xml -- This XML file demonstrates how to build a Bidi Schema extension for USB. It describes the supported schema elements that can be queried or set, along with their restrictions. +This XML file demonstrates how to build a Bidi Schema extension for USB. It describes the supported schema elements that can be queried or set, along with their restrictions. -For more information, see [USB Bidi Extender](http://msdn.microsoft.com/en-us/library/windows/hardware/jj659903(v=vs.85).aspx). +For more information, see [USB Bidi Extender](https://docs.microsoft.com/windows-hardware/drivers/print/usb-bidi-extender). -**Note** This sample is for the v4 print driver model. +> [!NOTE] +> This sample is for the v4 print driver model. -**Note** When you make calls to printerStream.read() in the sample, the printer returns an array which includes an additional element that represents the array length. The following JavaScript code can be used to copy the returned array into a new array, and also to remove the additional element. +When you make calls to printerStream.read() in the sample, the printer returns an array which includes an additional element that represents the array length. The following JavaScript code can be used to copy the returned array into a new array, and also to remove the additional element. ```js var readBuffer = []; @@ -53,4 +45,4 @@ var cleanArray = []; for ( i = 0; i < readBytes; i++ ) { cleanArray[i] = readBuffer.shift(); } -```
\ No newline at end of file +``` diff --git a/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md b/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md index 66a2f90b..a7ed3f9f 100644 --- a/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md +++ b/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md @@ -8,24 +8,14 @@ products: - windows-wdk --- - - -<!--- - name: WSDMon Bidi Extension Sample - platform: Utility - language: xml - category: Print - description: Demonstrates how to use an XML extension file to support bidirectional (Bidi) communication with a WSD connected printer. - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617949 ----> - # WSDMon Bidi Extension Sample This sample demonstrates how to use an XML extension file to support bidirectional (Bidi) communication with a WSD connected printer. The v4 print driver model continues to employ the WSDMon Bidi Extension file format, as well as the SNMP Bidi Extension file format. -**Note** Third-party port monitors and language monitors are not supported in the v4 driver model or with print class drivers. +> [!NOTE] +> Third-party port monitors and language monitors are not supported in the v4 driver model or with print class drivers. The WSDMON port monitor is a printer port monitor that supports printing to network printers that comply with the Web Services for Devices (WSD) technology. The WSDMON port monitor listens for WSD events and updates the printer status accordingly. @@ -59,6 +49,7 @@ WSDMON supports the following Xcv commands: - ServiceID -**Note** This sample is for the v4 print driver model. +> [!NOTE] +> This sample is for the v4 print driver model. -For more information, see [V4 Driver Connectivity Architecture](http://msdn.microsoft.com/en-us/library/windows/hardware/) and [Bidirectional Communication Schema](http://msdn.microsoft.com/en-us/library/windows/hardware/ff545169(v=vs.85).aspx).
\ No newline at end of file +For more information, see [v4 Driver Connectivity Architecture](https://docs.microsoft.com/windows-hardware/drivers/print/v4-driver-connectivity-architecture) and [Bidirectional Communication Schema](https://docs.microsoft.com/windows-hardware/drivers/print/bidirectional-communication-schema). |
