Printing image in CGI using CUPS lazarus / 39-Graphics ---------------------------------------------------------------------- martinrame · 2018-05-21 00:09 Hi, I want to print an image in a CUPS printer from a Linux CGI application. I'm reading a JPEG image using TFPMemoryImage and TFPReaderJPEG and trying to print using the Printer object. So far I can print Printer.Canvas.TextOut without problems, but cannot do Printer.Canvas.Draw o Printer.Canvas.StretchDraw and related methods. I think the problem is that I'm working on NoGUI. Any hint?. ---------------------------------------------------------------------- Leledumbo · 2018-05-21 07:37 Yes, the printers package has widgetset specific implementation (see osprinters.pas and widgetset specific folders in the same directory), where nogui doesn't have one. I think you should be fine targeting gtk2, but no guarantee on this. Just try it and report. ---------------------------------------------------------------------- martinrame · 2018-05-21 12:24 Hi Leledumbo, I can't do that, because the target server doesn't have a gui (it's an Ubuntu server). I've found the Canvas used by the printer is TCairoPSCanvas, but it looks like it  can't handle bitmaps...