0

I have the primefaces xhtml page. It has print button to print the current form. How to print some text at the page footer??

<p:commandButton value="Print" onclick="finishPrint()">
    <p:printer target="panel1s6" />
</p:commandButton>

1 Answers1

0

You could try CSS2 @media rules to distinguish screen and print stylings:

@media screen {
    .print_footer {display: none;}
}
@media print {
    .print_footer {display: block;}
}

Then, if you have some html code within your form like:

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

it will be not shown on the screen, but will be printed instead. This is general idea, you have to style appropriate layout for the print media.

olexd
  • 1,360
  • 3
  • 13
  • 26