Printing with CGI? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Giu · 2014-12-30 11:37 Hi all, We need to develop an app wich will act as a printer service. Client will use a web app (developed on PHP and deployed under raspberry pi), and this webapp should print on different printers based on some parameters. Because I can't find usefull information about pos printing under PHP, I thoug maybe a solution should be to develop a Lazarus CGI app deployed with our app, and based on GET params received print freereport over network. Somebody has tried to print directly to printers via CGI? ---------------------------------------------------------------------- Leledumbo · 2014-12-30 16:27 Quote from: Giu on December 30, 2014, 12:37:04 pmSomebody has tried to print directly to printers via CGI? I haven't, but the process shouldn't be different from desktop app. It's just the request is not directly received, but via the CGI app. The CGI app is no different from any other binary, so it can do anything a desktop app can do, including printing. Under modern OS, your only problem might be permission problem, and that could easily be solved by setting the correct permission bit for the app. ---------------------------------------------------------------------- marcov · 2014-12-30 16:32 Basically webapps are generally cut off from the system outside the browser. Best is to deliver output in some printable format (e.g. PDF, so it opens with acrobat) and let the user print itself. If you need to tweak printing parameters and really control the printer directly, you are out of luck, and webapps are not really fit for that purpose.  The problem is in the client, and the serverside technique (php or fpc cgi) doesn't matter. In the past you could workaround it with e.g. activex plugins, but that road is pretty much closed nowadays.