첨부된 이미지 파일을 프린트 하고 싶은데요.

(링크 주소는 개인정보때문에 삭제했습니다.)
위 주소의 인증서를 클릭하면 업로드 된 이미지 파일을 프린트 하고 싶은데요.
내용 프린트는 성공했는데..
이미지만 프린트 하는건 안되네요.

온갖 방법을 다 써봐도 해결책이 안나옵니다..
정보좀 부탁드릴께요.. ^^;;


※ 사용중인 view.skin 화일 첨부합니다.
html식 갤러리로 수정하다 보니 이것저것 안맞는것도 좀 있네요.. ^^

첨부파일

view.skin.php (2.8 KB) 12회 2010-01-15 15:14
|

댓글 2개

작성중에 수정이 되어서 다시올립니다^^
이미지 첨부 파일만 출력되게 하는겁니다.

1.올려주신 view.skin.php 적당한 위치에 아래소스 추가해주시고
<a href="#" onClick="window.open('<?="$board_skin_path/print_view.php?bo_table=$bo_table&wr_id=$wr_id"?>', '', 'left=150, top=10, width=700, height=500, scrollbars=1');"> 프린트하기</a>

2.아래소스 그대로 print_view.php 이름으로 만드셔서 view.skin.php 이있는 폴더에 업로더해주세요.
<?
$g4_path = "../../..";
include_once("$g4_path/common.php");
$view = get_view($write, $board, $board_skin_path);
?>
<div id="contents">
<tr>
<td colspan=2>

<table width=100% cellpadding=5>
<tr>
<td style='word-break:break-all;' class='lh' height=100>
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view] && $no==$i)
echo $view[file][$i][view] ;

}
?>
</td>
</tr>
</table>

</td>
</tr>
<tr><td colspan='100' height='1' bgcolor='#cccccc'></td></tr>
</table>
</div>
<table width=95% border=0 align=center cellpadding=0 cellspacing=0>
<tr>
<td colspan=2 height="35" align="center"><a href="#" onclick="print_contents()"> 프린트하기</a></span></b>
</td>
</tr>
</table><br>
<script>
function print_contents()
{
var contents = document.getElementById('contents').innerHTML;
var width = 0;
var height = 0;
var left = (screen.availWidth - width) / 2;
var top = (screen.availHeight - height) / 2;
var options = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',scrollbars=yes,resize=no';
var win = window.open('', '_self', options);
win.document.body.innerHTML = contents;
if (document.all) {
win.document.execCommand('Print');
win.document.close();
win.close();
}
else {
win.print();
}
}
</script>
바다로님 답변 감사합니다. ^^
바로 해결되었네요.
정말 고맙습니다.

즐거운 하루 되세요~
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
16년 전 조회 982
16년 전 조회 1,523
16년 전 조회 5,564
16년 전 조회 3,175
16년 전 조회 1,353
16년 전 조회 828
16년 전 조회 1,802
16년 전 조회 1,520
16년 전 조회 1,894
16년 전 조회 1,539
16년 전 조회 976
16년 전 조회 826
16년 전 조회 782
16년 전 조회 778
16년 전 조회 1,411
16년 전 조회 1,637
16년 전 조회 968
16년 전 조회 949
16년 전 조회 1,704
16년 전 조회 1,009