[HTML5] html 페이지 나누어 깔끔하게 출력하기
2004.05.07 23:36
7674
173
https://eond.com/20478
object(HotopayModel)#824 (23) { ["error"]=> int(0) ["message"]=> string(7) "success" ["variables"]=> array(0) { } ["httpStatusCode"]=> int(200) ["module"]=> string(7) "hotopay" ["module_info"]=> NULL ["origin_module_info"]=> NULL ["module_config"]=> NULL ["module_path"]=> string(52) "/home/eond/web/eond.com/public_html/modules/hotopay/" ["xml_info"]=> NULL ["module_srl"]=> NULL ["mid"]=> NULL ["act"]=> NULL ["template_path"]=> NULL ["template_file"]=> NULL ["layout_path"]=> NULL ["layout_file"]=> NULL ["edited_layout_file"]=> NULL ["stop_proc"]=> bool(false) ["user"]=> object(Rhymix\Framework\Helpers\SessionHelper)#823 (20) { ["member_srl"]=> int(0) ["user_id"]=> NULL ["user_name"]=> NULL ["nick_name"]=> NULL ["email_address"]=> NULL ["phone_number"]=> NULL ["homepage"]=> NULL ["blog"]=> NULL ["birthday"]=> NULL ["denied"]=> NULL ["status"]=> NULL ["is_admin"]=> string(1) "N" ["is_site_admin"]=> NULL ["profile_image"]=> NULL ["image_name"]=> NULL ["image_mark"]=> NULL ["signature"]=> NULL ["description"]=> NULL ["group_list"]=> array(0) { } ["menu_list"]=> array(0) { } } ["request"]=> object(Rhymix\Framework\Request)#10 (13) { ["method"]=> string(3) "GET" ["compat_method"]=> string(3) "GET" ["url"]=> string(24) "coding/20478/page/465326" ["hostname"]=> string(8) "eond.com" ["domain"]=> NULL ["protocol"]=> string(5) "https" ["callback_function"]=> string(0) "" ["_route_status":protected]=> int(200) ["_route_options":protected]=> object(stdClass)#11 (5) { ["cache_control"]=> bool(true) ["check_csrf"]=> bool(true) ["is_forwarded"]=> bool(false) ["is_indexable"]=> bool(true) ["enable_session"]=> bool(true) } ["module"]=> string(5) "board" ["mid"]=> string(6) "coding" ["act"]=> string(16) "dispBoardContent" ["args"]=> array(4) { ["document_srl"]=> string(5) "20478" ["page"]=> int(465326) ["mid"]=> string(6) "coding" ["act"]=> string(16) "dispBoardContent" } } ["ajaxRequestMethod"]=> array(2) { [0]=> string(6) "XMLRPC" [1]=> string(4) "JSON" } ["gzhandler_enable"]=> bool(true) }

http://shinnaji.com/blog/tb.php/?tb_id=123http://shinnaji.com/blog?no=123강제로 나누고 싶은 부분에다가

style="page-break-before:always;"를 추가하세요...

<tr style="page-break-before:always;">  뭐 이런 식으루....

before를 넣으면 그 스타일 쉬트 쓴 앞에서 강제로 페이지 분할을 하고, after를 쓰면 뒤에서 분할합니다.


그리고 아래의 소스를 이용하시면 머릿글과 바닥글을 바꾸어 깔끔하게 출력할 수 있습니다.

<script language="javascript">
function printWindow() {
factory.printing.header = "여기는 머릿글입니다." //머릿글
factory.printing.footer = "여기는 바닥글입니다." //바닥글
factory.printing.portrait = true //세로 출력, false는 가로 출력
factory.printing.leftMargin = 30.0 //왼쪽 여백
factory.printing.topMargin = 30.0 //위쪽 여백
factory.printing.rightMargin = 30.0 //오른쪽 여백
factory.printing.bottomMargin = 30.0 // 바닥 여백
factory.printing.Print(false, window) // false는 프린트 대화 상자표지 안함, true는 표시함, window는 전체 페이지 출력
}
</script>

<object id="factory" viewastext  style="display:none"
  classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
  codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=6,1,431,2">
</object>

<input type="button" name="print" value="Print This Page..." onClick="printWindow();">
<A href="javascript:printWindow()">



factory.printing.header = "" //이렇게 하면  머릿글(html의 타이틀제목, 페이지수)이 없이 출력됩니다.
factory.printing.footer = "" //이렇게 하면 바닥글(html의 경로, 날자)이 없이 출력됩니다.


출처: http://shinnaji.com/blog?no=123


라이믹스는 이온디와 함께

HTML5/CSS3
-
+
닫기

마이페이지

로그인을 해주세요

네이버로 로그인