Using specific CSS classes, you can include or exclude content selected by PrintFriendly.
print-only
Only those elements with the print-only
class will be selected when it is used.
<div class="print-only">
<p>This content will be included.</p>
</div>
<div>
<p>This content gets excluded because print-only was used.</p>
</div>
<div class="print-only">
<p>This will be included because it has class="print-only"</p>
</div>
print-yes
Elements withprint-yes
class, will be selected in addition to the content automatically selected by PrintFriendly.
Tip
print-yes
is best used when PrintFriendly detects most of the content but you want to include some missing elements
print-no
You can apply this class to one or more elements to exclude the elements and all their children.
<p class="print-no">Content not to be included in print/pdf.</p>
pf-title
Add this class to a single element for setting the page title.
<h1 class="pf-title">The Page Title</h1>
pf-author
Add this class to a single element for setting the page author
<p class="pf-author">Author Name</p>
pf-date
Add this class to a single element for setting the publication date.
<div class="pf-date">October 01, 2016</div>
copyright
You can apply this class to one or more elements to include the elements and prevent them from being deleted by the user.
<p class="copyright"><img src="logo.jpg" />Copyright Acme Corp</p>
page-break-before
Adds a page break before any element when printed or converted to PDF
<h2 class="page-break-before">Adds Page Break Before</h2>
page-break-after
Adds a page break after any element when printed or converted to PDF
<section class="page-break-after">Adds break after this element</section>
delete-no
Elements with this class cannot be deleted by the user