Q&A

  • 프린터 관련 질문 입니다? 첨부File이 있네요.^^;


우선 제가 한 코딩 내용은 아래와 같습니다.

with Printer do
            begin
                BeginDoc;
                    // Header of Print
                    Canvas.font.Name:='돋움체';
                    Canvas.font.Size:=25;
                    Canvas.font.Style:= [fsBold, fsUnderline];
                    Canvas.TextOut(1300,Canvas.font.Size+100,
                                            pnlHeader.Caption);
                    Canvas.font.Size:=9;
                    Canvas.font.Style:= [];

                    Canvas.TextOut(100,400, lblAcctType.Caption);
                    Canvas.TextOut(4200,400, lblDate.Caption);

                    PrintData:= Chr(1)+StringOfChar(chr(6), 12)+chr(22)
                                    +StringOfChar(chr(6), 18)+
                                    Chr(22)+StringOfChar(Chr(6), 18)+Chr(22)
                                    +StringOfChar(Chr(6), 19)+
                                    Chr(22)+StringOfChar(Chr(6), 12)+Chr(22)
                                    +StringOfChar(Chr(6), 20)+
                                    Chr(22)+StringOfChar(Chr(6), 12)+Chr(2);

                    Canvas.TextOut(100,500, PrintData);

                    PrintData:= Chr(5)+'  거래일자  '+ Chr(5)+'    출금 금액     '+
                                    Chr(5)+'    입금 금액     '+ Chr(5)+
                                    '     현재 잔액     '+
                                    Chr(5)+'    적요    '+Chr(5)+'   의뢰인/수취인    '+
                                    Chr(5)+'   취급점   '+Chr(5);

                    Canvas.TextOut(100,590, PrintData);

                    // Body of Print
                    PrintData:= Chr(25)+StringOfChar(chr(6), 12)+chr(16)
                                    +StringOfChar(chr(6), 18)+
                                    Chr(16)+StringOfChar(Chr(6), 18)+Chr(16)
                                    +StringOfChar(Chr(6), 19)+
                                    Chr(16)+StringOfChar(Chr(6), 12)+Chr(16)
                                    +StringOfChar(Chr(6), 20)+
                                    Chr(16)+StringOfChar(Chr(6), 12)+Chr(23);

                    Canvas.TextOut(100,690, PrintData);

                    J:=0;
                    // Data of Print
                    For I:= 1 to grdView.RowCount do
                    begin
                        PrintData:=Chr(5)+Format('%11s',[grdView.Cells[0,I]])
                                       +StringOfChar(' ',1)+
                                       Chr(5)+Format('%17s',[grdView.Cells[1,I]])
                                       +StringOfChar(' ',1)+
                                       Chr(5)+Format('%17s',[grdView.Cells[2,I]])
                                       +StringOfChar(' ',1)+
                                       Chr(5)+Format('%18s',[grdView.Cells[3,I]])
                                       +StringOfChar(' ',1)+
                                       Chr(5)+Format('%11s',[grdView.Cells[4,I]])
                                       +StringOfChar(' ',1)+
                                       Chr(5)+Format('%19s',[grdView.Cells[5,I]])
                                       +StringOfChar(' ',1)+
                                       Chr(5)+Format('%11s',[grdView.Cells[6,I]])
                                       +StringOfChar(' ',1)+Chr(5);

                        Canvas.TextOut(100,790+J, PrintData);
                        J:=J+100;
                    end;

                    // Hooter of Print
                    PrintData:= Chr(3)+StringOfChar(Chr(6),12)+Chr(21)
                                    +StringOfChar(Chr(6), 18)+
                                    Chr(21)+StringOfChar(Chr(6),18)+Chr(21)
                                    +StringOfChar(Chr(6), 19)+
                                    Chr(21)+StringOfChar(Chr(6),12)+Chr(21)
                                    +StringOfChar(Chr(6), 20)+
                                    Chr(21)+StringOfChar(Chr(6),12)+Chr(4);

                    Canvas.TextOut(100,J+690, PrintData);

                    Canvas.TextOut(900,J+790, lblMsg.Caption);

                    Canvas.TextOut(100,J+890, lblAcctName.Caption);
                    Canvas.TextOut(3550,J+890, lblAcctDepot.Caption);

                EndDoc;

이고요 결과물은 첨부File인데요(*.jpg)
내용인즉 단락사이가 벌어져서 출력이 됩니다..

해결책이 있나요...부탁 드립니다.!!!
2  COMMENTS
  • Profile
    연기훈 2003.10.21 23:25
    텍스트 출력시 출력 위치를 조정하세요!

    현제 보니. 100 마다 출력하게 되어 있는데

    이걸 90~ 80 정도로 줄이면 될꺼 같은데요!!

  • Profile
    김성근 2003.10.22 00:13
    우선 답변을 주셔서 감사합니다.!!! 그런데

    첨부파일 내용을 보시면 아시겠지만 테두리의 단락이 점선 처럼 떨어져
    있습니다.

    님께서 추천하여주신 90 ~ 80으로 조정도 해보았습니다만 해결이 되지
    않았습니다.!!!

    다른 해결책은 없는지요