Custom Class Names
Get advanced features with PrintFriendly & PDF custom class names. Simply add the the following class names to your HTML template to take use the features.
Includes the element(s) and all it's child elements. All other elements will be exlcluded. Add to all sibling elements you want included.
<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>
Includes an element and all its children. Can be applied to multiple elements.
<p class="print-yes">Content to be included in print/pdf.</p>
Excludes an element and all its children. Can be applied to multiple elements.
<p class="print-no">Content I do not want to include in print/pdf.</p>
Will use this element as the Page Title.
<h1 class="pf-title">The Page Title</h1>
class="pf-author" or class="byline"
Add to the author's name. Will be displayed at the top of the page as a byline. Can only be added to one text element.
<p class="pf-author">Author Name</p>
Add to the publication date. Will be displayed at the top of the page. Can only be applied to one element. Date can be displayed in any format/style.
<div class="pf-date">October 01, 2016</div>
Includes the element and prevents it from being deleted. Can include images, text, child elements.
<p class="copyright">Copyright cannot be deleted.</p>
class="page-break-before" & class="page-break-after"
Adds a page break before or after any element.
Note: Currently this is not supported in the PDF. However, we're working on a new PDF engine that should support page breaks.
<h2 class="page-break-before">Adds Page Break Before</h2> <section class="page-break-after">Adds break after this element</section>
Similar to class="copyright", this element cannot be deleted.
<p class="delete-no">User cannot delete this content.</p>