smsx.cab을 이용한 웹페이지 프린트 설정하기, 여백, 머리글 제어
페이지 정보
작성자 서방님 댓글 0건 조회 220회 작성일 12-04-26 11:01본문
<object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="./smsx.cab#Version=6,3,439,30"></object>
<script type="text/javascript">
function printArea() {
factory.printing.header = "영수증 원본"; // Header에 들어갈 문장
factory.printing.footer = "감사합니다."; // Footer에 들어갈 문장
factory.printing.portrait = true; //true = 세로 출력, false = 가로 출력
factory.printing.leftMargin = 1.0 // 왼쪽 여백 사이즈
factory.printing.topMargin = 1.0 // 위 여백 사이즈
factory.printing.rightMargin = 1.0 // 오른쪽 여백 사이즈
factory.printing.bottomMargin = 1.0 // 아래 여백 사이즈
factory.printing.Print(true, window) // 출력하기 (true:대화창 오픈, false:대화창 없음, window:윈도우 전체출력 or 프레임명을 넣어서 프레임 출력)
// window.close(); // 창닫기
}
printArea();
</script>
첨부파일
댓글목록
등록된 댓글이 없습니다.