diff options
| author | Barry Golden <[email protected]> | 2019-03-12 14:02:43 -0700 |
|---|---|---|
| committer | Adonais Romero González <[email protected]> | 2019-03-12 14:02:43 -0700 |
| commit | ef7ec4ec9ff7ce3c53d60e1c8906915966e17e01 (patch) | |
| tree | 3017523a73c6552c27947d402afa6062f4df2706 /print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript | |
| parent | 35bff356ac249057f4d673d39c7f28ed348cbf0f (diff) | |
Update README.md for samples portal (#358)
* Update README.md for samples portal
* Update README.md for samples portal
* Removed installwdf
* Update fork (#2)
* Fix typo
ture -> true
* Remove InstallWdf sample
* Fix typo (#340)
ture -> true
* Readme typo fix (#349)
* Update langid
Diffstat (limited to 'print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript')
2 files changed, 14 insertions, 20 deletions
diff --git a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md index f0f64424..c5048b0b 100644 --- a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md +++ b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md @@ -1,3 +1,13 @@ +--- +topic: sample +name: Print Driver Constraints Sample +description: Demonstrates how to implement advanced constraint handling and PrintTicket/PrintCapabilities handling using JavaScript. +languages: + - javascript +products: + - windows +--- + <!--- name: Print Driver Constraints Sample platform: Utility @@ -7,27 +17,23 @@ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617946 ---> - -Print Driver Constraints Sample -=============================== +# 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](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. 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. -Related topics --------------- +# Related topics [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644) [IPrintSchemaCapabilities](http://msdn.microsoft.com/en-us/library/hh451256(v=vs.85).aspx) [IPrintSchemaTicket](http://msdn.microsoft.com/en-us/library/hh451398(v=vs.85).aspx) - diff --git a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/print-v4printdriversamples-v4printdriver-constraintscript.yml b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/print-v4printdriversamples-v4printdriver-constraintscript.yml deleted file mode 100644 index 837aa248..00000000 --- a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/print-v4printdriversamples-v4printdriver-constraintscript.yml +++ /dev/null @@ -1,12 +0,0 @@ -### YamlMime:Sample -sample: -- name: Print Driver Constraints Sample - description: Demonstrates how to implement advanced constraint handling and PrintTicket/PrintCapabilities handling using JavaScript. - generateZip: true - preserveParentHierarchy: true - author: windows-driver-samples - languages: - - javascript - technologies: - - windows - vssolution: /print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/ConstraintScript.sln |
