• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Printer

Printer is used to print a certain component instead of the whole page.

Printer Tag Documentation

Printer allows sending a specific Faces component to the printer, not the whole page.

NameTypeRequiredDefaultDescription
configuration String false Configuration options for the printer.
event String false A String identifying the type of event the Ajax action will apply to. If specified, it must be one of the events supported by the component the Ajax behavior is being applied to. For HTML components this would be the set of supported DOM events for the component, plus "action" for Faces ActionSource components and "valueChange" for Faces EditableValueHolder components. If not specified, the default event is determined for the component. The DOM event name is the actual DOM event name (for example: "click") as opposed to (for example: "onclick").
target String false Target component to print.
Loading...
Tag DocumentationNew DocumentationNew Documentation

Usage


<div class="card">
    <p:commandButton value="Print" type="button" icon="pi pi-print" styleClass="shadow-1 mb-3 mr-2">

        <p:printer target="image"/>
    </p:commandButton>
    <p:commandButton value="Print (custom configuration)" type="button" icon="pi pi-print" styleClass="shadow-1 mb-3">
        <p:printer target="pnlPrint" configuration="globalStyles: true, title: 'Nature Image Header', timeout: 1000"/>
    </p:commandButton>

    <p:outputPanel id="pnlPrint">
       <p:graphicImage id="image" name="demo/images/nature/nature10.jpg"/>
    </p:outputPanel>
</div>