Printing from iOS (Ohh No!!!)

OK Im sort of scared to ask this as I can see historically this has raised some issues.

Basically I need to be able to print off a receipt from iOS for a customer payment, my software at the moment does everything else for the “till” as such, but I need a way to get a hard copy of a receipt, this is essential especially for food orders as they are handed a ticket number and wait to be called for their food.

I can not see any way from within Xojo to do this.

I have a backup plan which sucks - basically chuck it in a queue and let a VB code pick it up and send it to the correct printer, but im sure there are some fantastic programmers out there who have done this… or at least I hope so.


use a network printer, and send direct tcpsockets to the printer using the printer language ?

This reply is more about iOS in general than Xojo specific, because I’ve not tried printing from Xojo for iOS.

You could generate a PDF of the receipt then AirPrint it to a printer. Actual receipt printers that do AirPrint were spendy last I looked. But you may be able to do it cheaper by using a “label printer” which will also take rolls of paper instead of rolls of label stock.

But remember that if you need to operate in temporary venues like concession areas at trade shows, convention centers, etc – or anywhere with a “public” wifi – that intra-lan traffic is typically blocked. Which means you can’t use wifi to connect to a local printer unless you do a direct wifi to the device. But then you can’t also do wifi to the public wifi and thus internet.

So you may want to consider bluetooth printers. Or create your own little local LAN that both the iOS and printers connect to – there are various ways of doing this.

DTPlugins for iOS contains a way to access a WiFi printer.

I filed a feature request back in 2014 but it seems Xojo never understood that business applications need to print. Pity.

Oh yea… thats a good idea Jean-Yves with the network printer and TCP sockets as at least ill be in “charge” and can control everything, also Douglas yes you are correct, but wherever we go we always bring our own network but I also like the idea of the bluetooth receipt printers as well, Michael dtPlugins ill have look at, but does not seem to being updated so Im a bit worried about using this - especially as iOS changes etc, I believe there has been some discussion about this as well - I may have a look if all my TCP stuff fails!!! LOL always think the worst as it can only get better then!!!

… amazing how another set of eyes on the problem helps, thanks to all ill look at how to do that, I already have the language reference, just think I need to understand memory blocks now - sigh there is always one more thing to learn before a project gets finished… oh well back to figuring it out now.

Thanks again for your advice.


I am afraid DTPlugins are the only game in town at the moment.

Please add the feature request to your cases. It is utterly ridiculous that an iOS app could not print to a WiFi printer today.

You could perhaps print using Google Cloud. I use it for my android app, but yet, it is built in, so I did not have much work.

To tell you the truth, I am probably going to use another iOS basic now for it’s ability to print, not to mention I will be able to move most of my check printing Android app code to it.

Here is the feature request link:

37516 - iOS printing to airprint should be supported

We solved this issue for web (which would pretty easily be adapted to iOS) by using Star Micronics WebPRNT-enabled printers. I wrote a module to build whatever receipt you want and fire off the request to the printer.

I have Printer Pro by Readdle installed on my iPhone. This allows printing to any WiFi printer or any printer attached to a Mac or PC.
You can download the lite version to try it. Once installed, printer pro appears in the “Open In” list on your device. This allows printing of a pdf (or mail attachment, output from many other applications)
So, you could do as Douglas Handy suggests, generate a pdf of the receipt, then open it in Printer Pro and print to the connected printer. Hope that helps.

All Working fine - printed direct to the printers using a TCP socket actually works really well and I can get feedback form the printer (but I’m not bothering with that side) so for a change really HAPPY !!!