2017-12-06 2 views
-3

나는 HTML 페이지를 인쇄하려고하는데 도움이 필요합니다. 인쇄 할 때 모든 페이지에 머리말과 꼬리말을 넣고 싶습니다.모든 페이지에 머리글과 바닥 글이있는 html 페이지를 인쇄하는 방법은 무엇입니까?

이 내 현재 코드

<!DOCTYPE html> 
<html> 
    <head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <link rel="stylesheet" media="all" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
    </head> 
    <body> 

    <style media="screen"> 
     .header{ 
     top: 0; 
     width: 100%; 
     height: 100px; 
     height: 100px; 
     } 
     .content{ 

     } 
     .footer{ 
     padding-top: 50px; 
     width: 100%; 
     height: 100px; 
     } 
    </style> 

    <div class="header"> 
     header 
    </div> 

    <div class="content"> 
     <table> 
     <tr><td>dfdsfsdfsdf start</td></tr> 
     <tr><td>dfdsfsdfsdf</td></tr> 
     <tr><td>dfdsfsdfsdf</td></tr> 
     <tr><td>dfdsfsdfsdf end</td></tr> 
     <!-- there will be around 1000 record of <tr><td></td></tr>--> 
     </table> 
    </div> 

    <div class="footer"> 
     footer 
    </div> 

    </body> 
</html> 

현재 헤더는 두 번째 페이지에없는 및 바닥 글이 두 번째 페이지로 이동하고 첫 번째 페이지에 대한 글이 없습니다. 그래서 은행 문 또는 모든 페이지에 머리글과 바닥 글 테이블의 값이 다른 문처럼 보일 수 있도록 내가 할 수있는 방법을 모든 페이지

Here is the image which i m getting currently Here is the image which i m getting currently의 중앙에 남아

+0

알다시피, 모든 페이지에 추가 하시겠습니까? –

+0

테이블이 dfdsfsdfsdf 시작이 많기 때문에 그 이유는 무엇입니까. 나는 1000 기록처럼 – Danny

+0

가능한 복제본 [https://stackoverflow.com/questions/468881/print-div-id-printarea-div-only](https://stackoverflow.com/questions/468881/print-div) -id-printarea-div-only) –

답변

0

데이터를 다운로드 할 수있는 .pdf 또는 .doc으로 제공하고 각 페이지에 머리글과 바닥 글을 포함하도록 파일을 구성 할 수 있습니다. 내 은행이 내 진술로하는 일이야.

HTML5가 사용자가하려는 것을 지원하지 않는다고 생각합니다. HTML6의 멋진 기능이긴하지만.

+0

나는 그것을 얻지 않는다. 나중에 무슨 뜻이야? – Danny

+0

당신이 테이블에 넣을 모든 데이터를 가져 와서 Microsoft Word 문서에 넣는 것을 의미합니다. 그런 다음 Word에서 머리글과 바닥 글을 추가하고 해당 문서를 사용자가 웹 페이지에서 다운로드 할 수있게합니다. –

관련 문제