테스트 사이트 - 개발 중인 베타 버전입니다

가로인쇄

그런데로 10년 전 조회 4,462

게시판리스트에서 선택한것만 바로인쇄를 적용시키고 싶습니다.

엑셀은 무난히 적용되어 잘 사용하고 있으나, 팀의 특성상 바로 출력이 필요하다하여

이렇게 고수님들께 여줍니다.

 

중요한점은 리스트상의 내용이 세로인쇄시 당연히 짤릴정도의 길이이며,

가로로 인쇄시에도 짤리수 있을것 같습니다.

 

그래서 가로로 인쇄하되 지정된 A4용지사이즈에 딱 맞쳐 출력이

되었으면 합니다.

 

PRINT.SKIN.PHP 입니다.

</strong></p><p><strong><?php
<!-- } 게시글 읽기 끝 --> 
include_once(G5_PATH.'/head.sub.php');
?></strong></p><p><strong><script language="javascript" src="<?php echo G5_JS_URL ?>/sideview.js"></script>
<link rel="stylesheet" href="<?php echo $board_skin_url ?>/style.css"></strong></p><p><strong><!-- 게시물 읽기 시작 { -->
<!-- { <div id="bo_v_table"><?php echo $board['bo_subject']; ?></div> }--></strong></p><p><strong><article id="bo_v" style="width:94%;margin:0 auto;padding:20px 0 20px 0;">
    <header>
        <h1 id="bo_v_title">
            <?php
            if ($category_name) echo $view['ca_name'].' | '; // 분류 출력 끝
            echo cut_str(get_text($view['wr_subject']), 100); // 글제목 출력
            ?>
        </h1>
    </header></strong></p><p><strong>
     
    <!--- 내용 시작 -->
     
       <!-- 입력폼 추가 부분 -->
        <div id="bo_v_con">
        <div class="tbl_frm01 tbl_wrap">
      
      
      
      <table border="0">
<tr></strong></p><p><strong>    <td align="center" style="font-size:35px">
   
    <strong>(주)오로라모바일 작업지시서 리스트 </strong></td>
</tr>
<tr></strong></p><p><strong>    <td align="center"> 
     
     
    </td>
</tr></strong></p><p><strong>  <tr></strong></p><p><strong>    
    <!-- DATA 내용 --->
    <td>
    <table border="2" align="center" ></strong></p><p><strong> <tr>
  <th bgcolor="#CCCCCC">접수</th>  
     <th bgcolor="#CCCCCC">상호</th>
     <th bgcolor="#CCCCCC">품명</th>        
        <th bgcolor="#CCCCCC">인쇄내용</th>
        <th bgcolor="#CCCCCC">인쇄완료</th>
  <th bgcolor="#CCCCCC">인쇄기기종</th>        
  <th bgcolor="#CCCCCC">젠더</th>        
  <th bgcolor="#CCCCCC">선물포장</th>
  <th bgcolor="#CCCCCC">총수량</th>
  <th bgcolor="#CCCCCC">포장완료</th>        
        <th bgcolor="#CCCCCC">출고요청일</th>                        
  <th bgcolor="#CCCCCC">배송구분</th>
  <th bgcolor="#CCCCCC">작성자</th>
  <th bgcolor="#CCCCCC">비고</th>
                   
        
        
  </tr>
<?
$que = sql_query("SELECT * FROM g5_write_".$_POST['bo_table']." ".$where." ORDER BY wr_id DESC"); 
while($row = sql_fetch_array($que)) {
?>
 <tr bordercolor="#cccccc">
  <td><?=$row['wr_datetime']?></td>
        <td><?=$row['wr_subject']?></td>
  <td><?=$row['wr_5']?></td>        
  <td><?=$row['wr_9']?></td>
  <td> </td>
        <td><?=$row['wr_4']?></td>
  <td><?=$row['wr_8']?></td>
  <td><?=$row['wr_7']?></td>
  <td><?=$row['wr_6']?></td>
  <td> </td>                
  <td><?=$row['wr_10']?></td>
   <td><?=$row['wr_3']?></td>
  <td><?=$row['wr_name']?></td>
  <td><?=$row['wr_content']?></td>     
                                  
 </tr>
<?
}
?>
</table>
    
    </td>
    
    
        <!-- DATA 내용 --->
    
  </tr>
</table>
      
      
      
      
        </div>
        </div>
        <!-- 끝 --><!-- 첨부파일 시작 { -->
  
  </strong></p><p><strong>
</strong></p><p><strong><p align="center">
  <a href="javascript:window.print();"><input type="submit" value="인쇄하기" class="btn_submit"></a> <input type="button" onclick="window.close();" value="창닫기" class="btn_submit">
</p>
<p> </p></strong></p><p><strong>
<script>
// 이미지 등비율 리사이징
$(window).load(function() {
    view_image_resize();
});</strong></p><p><strong>var now = new Date();
var timeout = false;
var millisec = 200;
var tid;</strong></p><p><strong>$(window).resize(function() {
    now = new Date();
    if (timeout === false) {
        timeout = true;</strong></p><p><strong>        if(tid != null)
            clearTimeout(tid);</strong></p><p><strong>        tid = setTimeout(resize_check, millisec);
    }
});</strong></p><p><strong>function resize_check() {
    if (new Date() - now < millisec) {
        if(tid != null)
            clearTimeout(tid);</strong></p><p><strong>        tid = setTimeout(resize_check, millisec);
    } else {
        timeout = false;
        view_image_resize();
    }
}</strong></p><p><strong>$(function() {
    $("a.view_image").click(function() {
        window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
        return false;
    });
});</strong></p><p><strong>function view_image_resize()
{
    var $img = $("#bo_v_atc img");
    var img_wrap = $("#bo_v_atc").width();
    var win_width = $(window).width() - 35;
    var res_width = 0;</strong></p><p><strong>    if(img_wrap < win_width)
        res_width = img_wrap;
    else
        res_width = win_width;</strong></p><p><strong>    $img.each(function() {
        var img_width = $(this).width();
        var img_height = $(this).height();
        var this_width = $(this).data("width");
        var this_height = $(this).data("height");</strong></p><p><strong>        if(this_width == undefined) {
            $(this).data("width", img_width); // 원래 이미지 사이즈
            $(this).data("height", img_height);
            this_width = img_width;
            this_height = img_height;
        }</strong></p><p><strong>        if(this_width > res_width) {
            $(this).width(res_width);
            var res_height = Math.round(res_width * $(this).data("height") / $(this).data("width"));
            $(this).height(res_height);
        } else {
            $(this).width(this_width);
            $(this).height(this_height);
        }
    });
}
</script>
<!-- } 게시글 읽기 끝 --> ​</strong></p><p><strong>

 

 

 

 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인