dotnet-contrib.system.printing.xps's People
dotnet-contrib.system.printing.xps's Issues
Sample code doesn't build
I was thrilled to see this NuGet package. I installed it, and then pasted the sample code from the front page into a new function in a VS2013 project, but when I built I got three errors:
T:\Development\Sandbox\XpsNugetSample\Program.cs(24,38,24,43): error CS1061: 'Contrib.System.Printing.Xps.IXpsPrinterDefinition' does not contain a definition for 'Print' and no extension method 'Print' accepting a first argument of type 'Contrib.System.Printing.Xps.IXpsPrinterDefinition' could be found (are you missing a using directive or an assembly reference?)
T:\Development\Sandbox\XpsNugetSample\Program.cs(35,42,35,47): error CS1061: 'Contrib.System.Printing.Xps.IXpsPrinterDefinition' does not contain a definition for 'Print' and no extension method 'Print' accepting a first argument of type 'Contrib.System.Printing.Xps.IXpsPrinterDefinition' could be found (are you missing a using directive or an assembly reference?)
T:\Development\Sandbox\XpsNugetSample\Program.cs(38,92,38,106): error CS1061: 'Contrib.System.Printing.Xps.IXpsInputBinDefinition' does not contain a definition for 'GetPrintTicket' and no extension method 'GetPrintTicket' accepting a first argument of type 'Contrib.System.Printing.Xps.IXpsInputBinDefinition' could be found (are you missing a using directive or an assembly reference?)
How do I get these errors to go away? Is the sample code in sync with the latest NuGet release?
Best wishes
Brian THOMAS
Clarification
I know that if I implement the WritingPrintTicketRequired delegate method for the XpsDocumentWriter class then when I call the class Write method my delegate will be called multiple times giving me the chance to supply a PrintTicket for the job (FixedDocumentSequence) and for each FixedDocument in the FDS, and for each FixedPage in each FD.
The supplied IXpsPrinterDefinition.Print method is implemented using XpsDocumentWriter but it doesn't use the delegate method so there's no way of switching paper trays. So the only PrintTicket that has any effect is the one supplied on the Write call. I'd really like to be able to specify different paper trays for p1 and subsequent pages in the FixedDocuments in my xps file. Would it be possible to create an extension method that did the delegate handling allowing tray switching at the page level?
Paper trays are reported even when they're not installed
Kyocera.Reported.PaperTrays.txt
I use the supplied sample code to enumerate the installed Paper Trays for the Kyocera TASKalfa 5551xi printer, and it lists all the trays that could possibly be installed, not just the ones that actually are installed. These are listed in the attached Kyocera.Reported.PaperTrays.txt, which dumps the PrintTicket xml for each reported tray.
The attached PrintCapabilities xml document for that printer has the paper trays marked with a constrained attribute. Trays with the attribute constrained="psk:None" are ticked as installed in the driver UI. Trays that have the attribute constrained="psk:DeviceSettings" are unticked in the driver UI, indicating they are not installed.
But the enumeration lists the trays irrespective of the valued of the constrained attribute.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.