Jump to content
Registration disabled at the moment Read more... ×
hsvandrew

Printing on Linux

Recommended Posts

Posted (edited)

Just wondering if anyone has gotten printing to work from Delphi (FMX, FMXLINUX) with recent Delphi versions i.e. 12.3 and recent Linux builds i.e. Ubuntu 24.

For example, on both Ubuntu 24 & Amazon Linux 2023 I used Gnome settings UI to install a printer.

Under the lpq command the printer shows. Printing works in other Gnome apps i.e. Text Editor - the device is shown.

In Delphi (12.3), the printer list only contains an entry called '.pdf'

If I use a PrintDialog/PrintSetupDialog, the app crashes

 

When I use Lazarus, which is free, all of the above work perfectly.

Edited by hsvandrew

Share this post


Link to post

On my FMXLinux app it works as expected
Ubuntu 22.04
(under Parallels on MAC)
 

procedure fill_printer_dropdown;
var
  x: Integer;
  i: Integer;
  s: string;
begin
   x := Printer.count;
  for i := 0 to x - 1 do
  begin
    s := Printer.Printers[i].Device;
    mainform.PrinterDropdown.Items.Add(s);
  end;
end;

1173597682_Image7-2-25at12_06PM.jpeg.a3012dca98250fec00e121e147faad42.jpeg

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×