Printer in Ubuntu

Issue #176 new
Former user created an issue

Hello. Simple application code. It prints using Printer module.

Printer.BeginDoc;
Printer.Canvas.TextOut(0, 30, 'ЧЕК');
Printer.Canvas.TextOut(0, 60, 'Дата: 20.02.2019  Время: 10:25');
Printer.EndDoc;

On Windows printing is good, but on Ubuntu this code does not print appropriate.

Comments (6)

  1. Rustam Shirgazin

    I am trying to create PDF, and then print PDF file. I have used library Synopse PDF Engine https://synopse.info/fossil/wiki?name=PDF+Engine On Windows this code works well.

    procedure TfmMain.btnPDFClick(Sender: TObject);
    var
     lPdf   : TPdfDocument;
     lPage  : TPdfPage;
    begin
      lPdf := TPdfDocument.Create;
      try
        lPdf.Info.Author        := 'Tester';
        lPdf.Info.CreationDate  := Now;
        lPdf.Info.Creator       := 'Tester';
        lPdf.DefaultPaperSize   := psA4;
        lPage := lPDF.AddPage;
        lPDF.Canvas.SetFont('Helvetica',10.0,[]);
        lPDF.Canvas.SetLeading(lPDF.Canvas.Page.FontSize);
        lPDF.Canvas.SetLineWidth(0.1);
    
        lPdf.Canvas.BeginText;
        lPdf.Canvas.TextOut( 30, 820,  'ЧЕК');
        lPdf.Canvas.TextOut( 30, 800,  'Дата: 20.02.2019  Время: 10:25');
        lPdf.Canvas.EndText;
        lPdf.SaveToFile(ExtractFilePath(Application.ExeName)+'test.pdf');
      finally
        lPdf.Free;
      end;
    end;
    

    PDF-file created. But library Synopse does not deploy through CrossVCL :( Synopse.png [DCC Error] Synopse.inc(413): E2029 'INTERFACE' expected but identifier 'Kylix1' found

  2. Log in to comment