int target_width = Printer()->PageWidth; // 가로 배율을 조정하기 위한 변수 선언
int target_height = Printer()->PageHeight; // 세로 배율을 조정하기 위한 변수 선언
Graphics::TBitmap *FormImage = new Graphics::TBitmap();
FormImage = GetFormImage(); //get form image
target_width = Printer()->PageWidth;
target_height = FormImage->Height * (Printer()->PageWidth / FormImage->Width);
if (target_height > Printer()->PageHeight)
{
target_width = FormImage->Width * (Printer()->PageHeight / FormImage->Height);
target_height = Printer()->PageHeight;
}
Printer()->Title = "Mold parameter print-out";
Printer()->BeginDoc();
Printer()->Canvas->StretchDraw(Rect(0,0, target_width, target_height), FormImage);
Printer()->EndDoc(); // 프린트 문서 끝.
// Print(); : 마지막에 Print(); 이 함수가 없으면 빈패이지만 인쇄되고, 주석풀면 빈패이지가 먼저 인쇄되고 폼 이미지가 출력이 됩니다. 빈패이지 출력 안되게 하고 싶은데 어떻게 해야할까요?
|