Skip to content

Printout is a small JavaScript library that makes printing HTML elements easier with it's current design.

Notifications You must be signed in to change notification settings

jihad28/printout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Printout

Printout is a small JavaScript library that makes printing HTML elements easier with it's current design.

Features

  • Print DOM element
  • Preserves design
  • Supports inline style tag
  • Can remove unwanted elements with class. default is no-print

Usage/Examples

printout('selector')

Options

printout('selector', {
    pageTitle: window.document.title, // Title of the page
    importCSS: true, // Import parent page css
    inlineStyle: true, // If true it takes inline style tag 
    autoPrint: true, // Print automatically when the page is open
    autoPrintDelay: 1000, // Delay in milliseconds before printing
    closeAfterPrint: true, // Close the window after printing
    header: null, // String or element this will be appended to the top of the printout
    footer: null, // String or element this will be appended to the bottom of the printout
    noPrintClass: 'no-print' // Class to remove the elements that should not be printed
})

Demo

See example/index.html

Author

About

Printout is a small JavaScript library that makes printing HTML elements easier with it's current design.

Resources

Stars

Watchers

Forks

Packages

No packages published