Print control characters?

I have a client that uses bitmaps that are loaded into the printers.

To get these printed, I need to send the printer a sequence of control characters.

Like: ESC+'&f1y4x'


How do I do this? If i use a memo, I see this text printed, which I don';t want to.

Comments

  • edited 12:41PM
    Hi!

    What about dotmatrix report with command object containing the command?

    Or here are 2 Delphi components for direct printer access:
    RawPrint
    or
    DXPrint



    If they don't work, try this code, it send command directly to the printer:
    type
      TPassThroughData = record
          nLen: Word;
          Data: array[0..255] of Byte;
      end;
    
    procedure PrintText(s: string);
    var
      PTBlock: TPassThroughData;
    begin
      PTBlock.nLen := Length(s);
      StrPCopy(@PTBlock.Data, s);
      Escape(Printer.Handle, PASSTHROUGH, 0, @PTBlock, nil);
    end;
    
    procedure PrintOut;
    begin
      Printer.BeginDoc;
      PrintText(#27'&l12D' + 'Hello, World!');
      Printer.EndDoc;
    end;
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.