i have a button which contains<p:printer> tag, when i press the button it opens the print page contains only barcode but it appear with header and footer. i tried to use css margin:0; size:auto it removes header and footer of the page before pressing the button. i need to remove the header and footer after pressing button
<h:outputText value="#{commonLabels['outputLable.document.code']}" />
<p:barcode id="barcodeid" type="code128" value="1234567890123456" style="position:relative; bottom: 30px ; margin-left: 50px;" class="dataTableClassName"/>
</p:panelGrid>
<p:commandButton id="acceptBtnId" style="margin-left: 4px" class="two_button_right" value="#{commonLabels['button.print']}" update="searchForm"
process="@this">
<p:printer target="barcodeid"/>
</p:commandButton>
<p:commandButton id="closeBtnId" class="two_button_right" value="#{commonLabels['button.close']}"
process="@this" oncomplete="PF('accept_dialog').hide();" />