Re: FS q command



On 31 Jan 2006 09:32:54 -0800, "DelphiNew" <jcalata@xxxxxxxxxxx>
wrote:

>Any example about using ESC * command ?
>
>I'm trying to use it but I don't know how to send my bitmap (110x109
>pixels). This bitmap is 2 colour, but I'm unable to obtain n1, n2 and
>Data values.
>
>How can I do it?

Unfortunately I don't have an ESC/P printer handy

However I think that you need to send each line of the graphic
separately

Var
BM :TBitmap;
S, Data :String;
W, L9 :Integer;
Begin

BM := TBitmap.Create;
BM.LoadFromFile( 'c:\somebitmap.bmp' );
BM.Mask( BM.Canvas.Pixels[ 0, 0 ] ); // Make monochrome

W := BM.Width;
SetLength( Data, (W + 7) Div 8 )
For L9 := 0 To BM.Height - 1 Do
Begin
S := #27'*'#0 + Chr( W Mod 256 ) + Chr( W Div 256 ) ;
Move( BM.ScanLine[ L9 ], Data[1], Length( Data ) );
S := S + Data ;
// send line in S to port
End;

These commands come from

http://www.pcguru.plus.com/escp2.html

ESC K Nl Nh d1 ... dk Select 60 dpi graphics (Nl,Nh=Dot columns)
ESC L Nl Nh d1 ... dk Select 120 dpi graphics
ESC Y Nl Nh d1 ... dk Select 120 dpi double speed graphics
ESC Z Nl Nh d1 ... dk Select 240 dpi graphics
ESC ^ m Nl Nh d1 ... dk Select 60/120 dpi 9pin graphics (m=0 60dpi,
m=1 120dpi)

There is also ESC . for ESC/P2 Raster Graphics that looks rather
interesting, but that might be more difficult fishing out the data
from a standard Bitmap

I can't remember whether the printer drops a 'bit' or line after each
chunk of graphics - my long term memory is a little .. tired

Your best bet is to make lines of #255#0#128 etc and experiment with
sending them to the printer, when you have that working you can then
try fishing the data from the Bitmap

.



Relevant Pages

  • Re: FS q command
    ... Any example about using ESC * command? ... I'm trying to use it but I don't know how to send my bitmap (110x109 ... Prev by Date: ...
    (comp.lang.pascal.delphi.misc)
  • Re: Printing problems
    ... Printing process is on background and I can use my program normally during this 2 minutes. ... Is there some way to send graphics to printer before that command and then simulate Enddoc-command with this PrintDocument1.Print command? ... Oh, and creating a bitmap or textfile during these 2 minutes is not suitable, because text should be printed as text and lines as lines, not as bitmap. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Office 2001 --> office 2004
    ... "placeable header", usually a low-resolution bitmap. ... resolution, ...  the issues in graphics between 2001 and 2004 were never ... McGhie Information Engineering Pty Ltdhttp://jgmcghie.fastmail.com.au/ ...
    (microsoft.public.mac.office.word)
  • Re: Invisible Downloaded Pictures Rx
    ... Bitmap' from the document where it was just pasted, ... The issue with a graphics card acceleration, ... Invisible Downloaded Pictures post from Sept. 20th 5:24 PM ...
    (microsoft.public.word.drawing.graphics)
  • The story: Painting bitmap to screen is slow
    ... I've done a lot graphics programming by now and the thing that bothers me with GDI+ in .NET framework the most is slow drawing of bitmaps to screen. ... In Win32, there were two types of bitmaps, compatible and memory bitmap. ...
    (microsoft.public.dotnet.framework.drawing)