Giter Club home page Giter Club logo

wpf.airprint's Introduction

WPF.Airprint

Demo WPF application with IPP/Airprint printer discovery and driverless printing.

Overview

This project attempts to solve the problem of supporting uninstalled printers in a controlled OS/Kiosk environment. Specifically when the target application is being provided as part of an OEM product. Previously we have had to offer support for a predetermined set of printers by installing their drivers onto the OS image and then disconnecting them. The customer could then connect any of the supported printers and use them from the application.

This particular OEM/Regulated situation provides a uniquely fitting opportunity to attempt driverless printing. This is typically used in mobile OS applications, such as Apple's iOS and the Airprint protocol. The Airprint protocol is the predecessor of the IPP [Internet Printing Protocol] that support printer communication over TCP. Driverless printing means that the presence of static driver files installed onto the OS are not required in order to perform printing operations.

Goals
  1. Support discovery of any modern printer connected to the same domain as the target PC.
  2. Support printing to any discovered and available printer connected to the domain.

Getting Started

Late in the writing of this, a couple days before I did the presentation, I found that I could discover the IPP enabled printers using the WinRT api Windows.Devices.Enumeration. This eliminated the need to use and have installed the Bonjour SDK for Windows. The application code still contains the service class and calls needed to use the Bonjour SDK instead if you wish.

Required:
  1. You must have the Bonjour SDK for Windows installed if you do not have Windows 10 and WinRT.
  2. You must also have rebooted or manually started the Bonjour Windows Service.
  3. You must have Docker for Windows installed and running. You can use either WSL2 or Hyper-V hosting.
  4. Current version requires you to have the cups printer server image built locally.

To build the print server docker image you can perform the following steps:

  1. Open a command prompt and cd into the project directory: lib\cups-print-server
  2. Build the image by executing this command: docker build -t cups-print-server .
  3. Confirm success by opening the docker applet from the system tray... Open Docker Dashboard And then selecting the Images item in the left hand menu, this will show a list of the images so that you can confirm the cups-print-server images exists: Confirm the image exists The required configuration and Dockerfile for the cups print server that is used by the application is provided in the core library.
Demo Application:

The included demo application offers an implementation and use of the core WPF.Airprint library in a very simple harness app that can be used to discover network printers on the local domain where executed. Once discovered you can select one of the network printers and add a queue for it and print a PDF file from your local drive as a test.

NOTE: The issue of creating the files volume using the docker remote api prevents the actual print call from functioning in the demo.

Futures

  1. Support building the cups print server docker image instead of requiring it exist locally.
  2. Implement shim for IEventAggregator in order to remove Prism dependency from core library.

wpf.airprint's People

Contributors

jogi-rnd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

varadharam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.