2010-01-20 5 views

답변

1

좋은 프레임 워크 pdfSharp입니다.

양식을 캡처 할 수 있습니다 (수행 방법은 몇 가지가 있으며 this은 하나의 샘플 임). pdfSharp 웹 사이트에서 이미지 스트림에 pdf 개체를 작성하는 것보다 많은 샘플을 찾을 수 있습니다.

1

페인트 방법을 사용하여 양식의 전체 클라이언트 영역을 캡처 한 다음 Print 메서드를 사용하여 인쇄 할 수 있습니다.

Graphics myGraphics = this.CreateGraphics(); 
Size s = this.Size; 
memoryImage = new Bitmap(s.Width, s.Height, myGraphics); 
Graphics memoryGraphics = Graphics.FromImage(memoryImage); 
memoryGraphics.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, s); 

그런 다음 PrintDocument 클래스를 사용하여 인쇄하십시오.