Printing on RaspberryPi with WebEdition

I’m very eager to see Xojo coming to RaspberryPi - it’s an awesome fit for web apps!
However, printing will likely be a botch… Neither console nor target web (a derivate of console with some graphics capabilities?) support the existing printing functions. For example, POS systems with receipt printers won’t be feasible – unless one tries to go down the route of writing postscript files and sending them to CUPS (I, owning Christian’s plugins, know MBS has some functions, just not that sure it’s any better than raw command line).

Any ideas on how I could get printing to work in a web app?

Where ?
Client Side ?
Server Side ?

why not wait for things to be ready?

Technically it would work as on any other linux box for a web app.
Browser can print website locally, user can download a PDF to print or server can send something via cups API to a printer connected to server.

Server side. Receipt printer is attached to the Pi device.

Receipt printers on RPi is old news. You can go with a kit from Adafruit or any old RS-232 or even just use one of the many USB models that work on Linux.

[quote=190109:@Alex von Siebenthal]I’m very eager to see Xojo coming to RaspberryPi - it’s an awesome fit for web apps!
However, printing will likely be a botch… Neither console nor target web (a derivate of console with some graphics capabilities?) support the existing printing functions. For example, POS systems with receipt printers won’t be feasible – unless one tries to go down the route of writing postscript files and sending them to CUPS (I, owning Christian’s plugins, know MBS has some functions, just not that sure it’s any better than raw command line).

Any ideas on how I could get printing to work in a web app?[/quote]

Web apps without a local program cannot print directly. The only way this is done no matter the technology is by requesting the user to do it.

That said, the best way seems indeed to use Linux printing functions. This can be achieved with the simplest of bash script.
http://www.techrepublic.com/article/control-printers-in-linux-from-the-command-line/

For simple printing on Linux I do this in Dalim TWiST but it’s just a simple command to run when the printer is connected to the server.

lp -d [NAME_OF_PRINTER] [PATH_TO_FILE]

Printer options can also be supplied to the command.

I’ll probably end up doing it using command line tools and possibly bash scripts as some of you suggest.

Currently I run Ubuntu on a Intel SoC with a web app and a headless desktop helper app (that does have print access). This won’t be an option for Pi as Xojo said we won’t be able to compile desktop apps for Pi - at least in the near future :slight_smile:

At the moment this is all very premature
Lets get an alpha of it in everyones hands first then see what shakes out ?

Install a ‘text only’ cups printer and send it the esc/pos commands. Or get a printer with Ethernet and just open a tcp connection to port 9100.

Or get a serial to Ethernet (usually cheaper than manufacturers Ethernet cards)

Quick and easy. You can also test all this using existing Linux (not raspberry pi yet). Than hopefully just run it on the raspi Later.

[quote=190167:@Norman Palardy]At the moment this is all very premature
Lets get an alpha of it in everyones hands first then see what shakes out ?[/quote]