F1Book에서 자동으로 A4용지에 맞게 프린트를 하고 있습니다.
처음 인쇄할 때는
에서는 landscape, portrait로 설정한 값이 정상적으로 작동합니다.
그런데 이상하게도 똑같은 것을 한번더 인쇄하면 landscape로 설정한 값이
portrait 로 인쇄됩니다.
프로그램을 종료하고 다시 하면 정상적으로 출력이 됩니다.
제가 생각하기에는 출력을 종료한 후 출력에 사용된 값들을 free 해주면 될 것 같은데
그 명령어를 모르겠군요.
밑의 자료는 소스입니다.
begin
if PaperType = 0 then
begin
TempBook.PrintLandscape := true;
end
else
begin
TempBook.PrintLandscape := False;
end;
TempBook.PrintDevMode := hDMode;
TempBook.PrintLeftMargin := lMar ;
TempBook.PrintRightMargin := rMar ;
TempBook.PrintTopMargin := tMar ;
TempBook.PrintHCenter := True;
TempBook.PrintHeader := '';
TempBook.PrintHeader := '&C&B&U&"굴림체"'+sHead+'&20'+ stitle;
TempBook.SetPrintTitlesFromSelection;
sXy := FunAlpabet(TempBook.MaxCol-1);
sShtArea := 'A1:'+sXy+inttostr(TempBook.Maxrow);
TempBook.Selection := sShtArea ;
TempBook.PrintArea := sShtArea;
TempBook.printRowHeading := false ;
TempBook.printColHeading := true ;
TempBook.PrintNoColor := True;
TempBook.PrintGridLines := True ;
TempBook.NextRowPageBreak(40);
Try
TempBook.FilePrint(true) ;
Except
end;
TempBook.Selection := 'A2';
end;