Default header and footer

269 views
Skip to first unread message

FD222

unread,
May 3, 2012, 6:20:09 AM5/3/12
to dom...@googlegroups.com
Can i set default header and footer of my PDF pages?

John Bell

unread,
May 3, 2012, 8:59:52 AM5/3/12
to dom...@googlegroups.com
take a look at the example at http://pxd.me/dompdf/www/examples.php

it is also in the distro at www/test/print_header_footer.html

John

On 03/05/2012 11:20, FD222 wrote:
> Can i set default header and footer of my PDF pages? --
> You received this message because you are subscribed to the Google
> Groups "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/rL2bwUsaRRYJ.
> To post to this group, send email to dom...@googlegroups.com.
> To unsubscribe from this group, send email to
> dompdf+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/dompdf?hl=en.

FD222

unread,
May 5, 2012, 3:34:40 AM5/5/12
to dom...@googlegroups.com
I have used header and footer as:
<div id="header">
<table class="Header_Logo_Percent" style="margin:0 auto;">
<tr class="header_panel"><td>
<table class="Header_Logo_Pixel">
<tr>
      <td class="header_logo"><a href="#"><img src="imgs_mail/es_email_logo.png" width="419" height="178" border="0" alt="Logo"/></a></td>
<td class="header_right">
  <table>
 <tr>
 <td width="28"></td>
<td width="500">
<table><tr>
      <td class="header_right_text">MR.</td><td width="404"><input class="header_right_border" type="text" /></td>
    </tr>
 <tr>
  <td class="header_right_author" colspan="2">based on your requirements</td>
    </tr>
 
 <tr>
  <td class="header_right_text1">Call him</td><td><input class="header_right_border1" type="text" /></td>
 </tr>
 <tr>
  <td class="header_right_text1" width="87">Email him</td><td><input class="header_right_border1" type="text" /></td>
 </tr>
  </table>
</td>
<td width="28"></td>
</tr></table><br />
</td></tr></table></td></tr></table>
</div>
<!-- End of Header Area -->
 
 
 
<!-- Footer panel start here -->
<div id="footer">
<table cellpadding="0" cellspacing="0" width="1022" style="margin:0 auto; width:1076px; padding-top:14px;">
<tr>
<td style="width:268px;"><img src="imgs_mail/footer_logo.png" width="268" height="144" /></td>
<td style="width:166px;"><img src="imgs_mail/footer_man.jpg" width="166" height="144" /></td>
</tr>
</table></div>
<!-- End of Footer panel -->
 
 
But still header and footer are not coming as default on all pages of PDF.
 
 

On Thursday, May 3, 2012 4:59:52 PM UTC+4, John Bell wrote:
take a look at the example at http://pxd.me/dompdf/www/examples.php

it is also in the distro at www/test/print_header_footer.html

John

On 03/05/2012 11:20, FD222 wrote:
> Can i set default header and footer of my PDF pages? --
> You received this message because you are subscribed to the Google
> Groups "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/rL2bwUsaRRYJ.
> To post to this group, send email to dom...@googlegroups.com.
> To unsubscribe from this group, send email to
> dompdf+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/dompdf?hl=en.

On Thursday, May 3, 2012 4:59:52 PM UTC+4, John Bell wrote:
take a look at the example at http://pxd.me/dompdf/www/examples.php

it is also in the distro at www/test/print_header_footer.html

John

On 03/05/2012 11:20, FD222 wrote:
> Can i set default header and footer of my PDF pages? --
> You received this message because you are subscribed to the Google
> Groups "dompdf" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/dompdf/-/rL2bwUsaRRYJ.
> To post to this group, send email to dom...@googlegroups.com.
> To unsubscribe from this group, send email to
> dompdf+unsubscribe@googlegroups.com.

BrianS

unread,
May 15, 2012, 10:45:42 PM5/15/12
to dom...@googlegroups.com
It would help to see the relevant CSS as well.

FD222

unread,
May 19, 2012, 3:59:15 AM5/19/12
to dom...@googlegroups.com
I got footer now but footer height is too small, how can i adjust the height of footer:
 

#header,
#footer {
  position: fixed;
  left: 0;
 right: 0;
 color: #aaa;
 font-size: 0.9em;
}
#header {
  top: 0;
 border-bottom: 0.1pt solid #aaa;
}
#footer {
  bottom: 0;
  border-top: 0.1pt solid #aaa;
}
#header table,
#footer table {
 width: 100%;
 border-collapse: collapse;
 border: none;
}
#header td,
#footer td {
  padding: 0;
 width: 50%;
}
.page-number {
  text-align: center;
}
.page-number:before {
  content: "Page " counter(page);
}
hr {
  page-break-after: always;
  border: 0;
}

BrianS

unread,
May 20, 2012, 10:31:57 PM5/20/12
to dom...@googlegroups.com
You're not specifying a height for your footer block. I'm not certain if the CSS spec outlines how this should be handled. However, it's easy to address. Just specify a height for your footer block.
Reply all
Reply to author
Forward
0 new messages