我写了一个打印,可是在打印队列中有了,可是打印机却没有反应,打不出来,这是为什么,我将原代码贴出来,请各位帮助看下,我是一个DELPHI菜鸟
procedure TRetailFrame.ChangeBooksFromDetail(const DataSet: TDataSet);
var FBookController: IBookController;
begin
   if DataSet.IsEmpty then exit;
   FBookController:= TBookController.Create(nil).DefaultInterface;
   adoAllBooks.Recordset := IUnknown(FBookController.FindBookByNumber(DataSet.FieldValues['BookNumber'])) as _RecordSet;
   AppendRetailDetail(adoAllBooks);end;procedure TRetailFrame.PrintBooks;
var StrLen , Left,Top , WordHeight , wordWidth :Integer;
    PointX,PointY:integer;
    ContentStr: string;
    Str1, Str2, Str3: string;
begin
  printer.BeginDoc;
  with printer do
  begin
  Canvas.Font.Size := 10;
  wordWidth := canVas.TextWidth('X');
  WordHeight := CanVas.TextHeight('X');
  Left:=(Printer.PageHeight-wordWidth*22) div 2;
  Top:=(Printer.PageHeight-wordHeight) div 2;
  Canvas.TextOut(Left+WordWidth*2, Top+Wordheight*3, '图书清单');
  Canvas.MoveTo(Left,top);
  Canvas.LineTo(left+wordWidth*2,top-WordHeight*1);
  Canvas.TextOut(Left+WordWidth*2, Top-Wordheight*2+1, '收银员:'+G_LoginID);
  Canvas.TextOut(Left+WordWidth*8, Top-Wordheight*2+1, '单号:'+adoRetailDetail.FieldValues['RetailNumber']);
  Canvas.TextOut(Left+WordWidth*2, Top-Wordheight*3+1, '日期:'+DateToStr(now)+FormatDateTime('hh:mm:ss', Now));
  Canvas.LineTo(left+wordWidth*2,top-WordHeight*4+1);
  Canvas.TextOut(Left+WordWidth*2, Top-Wordheight*5+1, '商口名称             数量    单价    金额');
  adoRetailDetail.DisableControls;
  adoRetailDetail.First;
  while not adoRetailDetail.Eof do
  begin
     ContentStr := adoRetailDetail.Fieldvalues['BookName'];
     StrLen := Length(ContentStr);
     if StrLen<16 then
        Canvas.TextOut(Left+WordWidth*2, Top-Wordheight*6+1, ContentStr)
     else if StrLen<32 then
     begin
        Str1:=Copy(ContentStr, 0, 16);
        Str2:=Copy(ContentStr, 17, StrLen-16);
        Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*6+1, Str1);
        Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*7+1, Str2);
     end else
     begin
        Str1:=Copy(ContentStr, 0, 16);
        Str2:=Copy(ContentStr, 17, StrLen-16);
        Str3:=Copy(ContentStr, 33, StrLen-32);
        Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*6+1, Str1);
        Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*7+1, Str2);
        Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*8+1, Str3);
     end;
  end;
  adoRetailDetail.EnableControls;
  Canvas.LineTo(left+wordWidth*2,top-WordHeight*9+1);
  Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*10+1, '合计:'+adoData.Fieldvalues['ReceivableMoney']);
  Canvas.TextOut(Left+WordWidth*6, Top+WordHeight*10+1, '实收:'+adoData.Fieldvalues['ChargeMoney']);
  Canvas.TextOut(Left+WordWidth*2, Top+WordHeight*11+1, '现金:'+adoData.Fieldvalues['ComeToHandMoney']);
  Canvas.TextOut(Left+WordWidth*6, Top+WordHeight*11+1, '找补:'+adoData.Fieldvalues['OddMoney']);
  Printer.EndDoc;
end;