우선 제가 한 코딩 내용은 아래와 같습니다.
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)
내용인즉 단락사이가 벌어져서 출력이 됩니다..
해결책이 있나요...부탁 드립니다.!!!
현제 보니. 100 마다 출력하게 되어 있는데
이걸 90~ 80 정도로 줄이면 될꺼 같은데요!!