{"id":114,"date":"2015-12-07T15:52:49","date_gmt":"2015-12-07T14:52:49","guid":{"rendered":"http:\/\/tuiofx.org\/blog\/?p=114"},"modified":"2015-12-09T09:08:58","modified_gmt":"2015-12-09T08:08:58","slug":"airprintfx-demo","status":"publish","type":"post","link":"http:\/\/tuiofx.org\/blog\/2015\/12\/07\/airprintfx-demo\/","title":{"rendered":"AirPrintFX Demo"},"content":{"rendered":"<p>In order to easily share documents to an Interactive Surface we implemented an AirPrint PDF Printer in pure Java. It uses the <a href=\"http:\/\/www.jmdns.org\">JmDNS library<\/a> to announce a PDF-capable\u00a0 <a href=\"http:\/\/support.apple.com\/en-us\/HT201311\">AirPrint<\/a>-Printer to iOS- and OS X-devices in the local network via <a class=\"externalLink\" href=\"http:\/\/www.apple.com\/support\/bonjour\/\">Apple&#8217;s Bonjour<\/a> z<span class=\"_Tgc\">eroconf-<\/span>service. When a device discovers the printer and starts a print job, the incoming requests are handled by a <code>HttpServer<\/code>. The server processes the incoming IPP (Internet Printing Protocol) requests and accepts incoming print jobs. The document in the response body is passed to <a href=\"https:\/\/pdfbox.apache.org\/\">Apache PDFBox<\/a> in form of a <code>byte[]<\/code>, gets loaded into a <code>PDDocument<\/code>, and (the first page) is rendered into a <code>BufferedImage<\/code>. The document is displayed in form of an <code>ImageView<\/code> \u2014 with TUIOFX it is easily zoomable, rotatable and movable on our TUIO-enabled multi-touch table.<\/p>\n<p>See this little demo video of how it works:<\/p>\n<div style=\"width: 750px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-114-1\" width=\"750\" height=\"422\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"http:\/\/tuiofx.org\/blog\/wp-content\/uploads\/2015\/12\/AirPrintFX.mp4?_=1\" \/><a href=\"http:\/\/tuiofx.org\/blog\/wp-content\/uploads\/2015\/12\/AirPrintFX.mp4\">http:\/\/tuiofx.org\/blog\/wp-content\/uploads\/2015\/12\/AirPrintFX.mp4<\/a><\/video><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In order to easily share documents to an Interactive Surface we implemented an AirPrint PDF Printer in pure Java. It uses the JmDNS library to announce a PDF-capable\u00a0 AirPrint-Printer to iOS- and OS X-devices in the local network via Apple&#8217;s Bonjour zeroconf-service. When a device discovers the printer and starts a print job, the incoming [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/posts\/114"}],"collection":[{"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":2,"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":116,"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/posts\/114\/revisions\/116"}],"wp:attachment":[{"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tuiofx.org\/blog\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}