첨부된 이미지 파일을 프린트 하고 싶은데요. 정보
첨부된 이미지 파일을 프린트 하고 싶은데요.
첨부파일
본문
(링크 주소는 개인정보때문에 삭제했습니다.)
위 주소의 인증서를 클릭하면 업로드 된 이미지 파일을 프린트 하고 싶은데요.
내용 프린트는 성공했는데..
이미지만 프린트 하는건 안되네요.
온갖 방법을 다 써봐도 해결책이 안나옵니다..
정보좀 부탁드릴께요.. ^^;;
※ 사용중인 view.skin 화일 첨부합니다.
html식 갤러리로 수정하다 보니 이것저것 안맞는것도 좀 있네요.. ^^
위 주소의 인증서를 클릭하면 업로드 된 이미지 파일을 프린트 하고 싶은데요.
내용 프린트는 성공했는데..
이미지만 프린트 하는건 안되네요.
온갖 방법을 다 써봐도 해결책이 안나옵니다..
정보좀 부탁드릴께요.. ^^;;
※ 사용중인 view.skin 화일 첨부합니다.
html식 갤러리로 수정하다 보니 이것저것 안맞는것도 좀 있네요.. ^^
댓글 전체
작성중에 수정이 되어서 다시올립니다^^
이미지 첨부 파일만 출력되게 하는겁니다.
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>
이미지 첨부 파일만 출력되게 하는겁니다.
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>

바다로님 답변 감사합니다. ^^
바로 해결되었네요.
정말 고맙습니다.
즐거운 하루 되세요~
바로 해결되었네요.
정말 고맙습니다.
즐거운 하루 되세요~