Unit FMX.Printer not found

Issue #40 resolved
Harry Stahl created an issue

The FMX.Printer unit is currently not in the fmxlinux-framework and needs to be added.

Comments (3)

  1. david berneda

    I did a small "mock / empty" FMX.Printer.pas unit (see below), just to make projects to compile

    unit FMX.Printer;
    
    interface
    
    uses
      System.SysUtils, System.UITypes, FMX.Graphics, FMX.Dialogs;
    
    type
      EPrinter=Exception;
    
      TPrinter=class
      public
        ActivePrinter : TPrinter;
        Canvas : TCanvas;
        Count : Integer;
        Device : String;
        Orientation : TPrinterOrientation;
        PageHeight,
        PageWidth : Integer;
        Title : String;
        Printers : Array of TPrinter;
        Printing : Boolean;
    
        Constructor Create;
    
        procedure Abort;
        procedure BeginDoc;
        procedure EndDoc;
        procedure NewPage;
      end;
    
      TPrinterSetupDialog=class(TCommonDialog)
      end;
    
    var
      Printer : TPrinter;
    
    implementation
    
    { TPrinter }
    
    procedure TPrinter.Abort;
    begin
      Printing:=False;
    end;
    
    procedure TPrinter.BeginDoc;
    begin
      Printing:=True;
    end;
    
    constructor TPrinter.Create;
    begin
      inherited;
    
      Count:=1;
      Orientation:=TPrinterOrientation.poPortrait;
    
      PageHeight:=2000;
      PageWidth:=750;
    
      ActivePrinter:=Self;
    
      SetLength(Printers,1);
      Printers[0]:=ActivePrinter;
    end;
    
    procedure TPrinter.EndDoc;
    begin
      Printing:=False;
    end;
    
    procedure TPrinter.NewPage;
    begin
    end;
    
    initialization
      Printer:=TPrinter.Create;
    finalization
      Printer.Free;
    end.
    
  2. Log in to comment