테러보이님 계십니까? > 자유게시판

자유게시판

테러보이님 계십니까? 정보

테러보이님 계십니까?

본문

개인적인 질문인데요..
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=25297
여기에 나온 프린트 제어를 할려면 smartx.cab 를 따로 올려야 합니까? 조언을 주시옵소서
추천
0

댓글 7개

<div id="print">
<object id=factory viewastext style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  codebase="scriptX.cab#Version=6,1,431,8">
</object>

여기부분 출력할레요.

</div>

<a href="#" onclick="printArea()">인쇄하기</a>

<script type="text/javascript">
<!--
var initBody;

function beforePrint() {
 prints = document.body.innerHTML;
 document.body.innerHTML = document.getElementById('print').innerHTML;
}
function afterPrint() {
 document.body.innerHTML = prints;
}
function printArea() {
  factory.printing.header      = ""
  factory.printing.footer      = ""
  factory.printing.portrait    = true // true 세로출력 , false 가로출력
  factory.printing.leftMargin  = 10
  factory.printing.topMargin    = 10
  factory.printing.rightMargin  = 10
  factory.printing.bottomMargin = 10
  window.print();
}

window.onbeforeprint = beforePrint;
window.onafterprint = afterPrint;

-->
</script>

해당 소스 그대로 했을때는 정상작동합니다만...
<input type=button value='인쇄' onclick="javascript:printArea()">

이렇게 하니까 나오긴 하네요.
프린트 옵션 중에

function printArea() {
  factory.printing.header      = ""
  factory.printing.footer      = ""
  factory.printing.portrait    = true // true 세로출력 , false 가로출력
  factory.printing.leftMargin  = 10
  factory.printing.topMargin    = 10
  factory.printing.rightMargin  = 10
  factory.printing.bottomMargin = 10
  factory.printing.Preview();
  window.print();
}

이건 다 되는데

 factory.printing.printBackground = true ← 요놈이 안되네요. 백그라운드도 출력해야 하는데 말이죠 ㅠㅠ
데가 올린 옵션이외에는 작동이 잘안되서 빼버렸습니다. ㅠ.ㅠ;
아마 저도 잘안되서 소스상에서도 표기를 안했습니다. ^^
전체 199,658 |RSS
자유게시판 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT