printd

Print HTML elements or pages in modern browsers.

MIT License

Downloads
25.4K
Stars
72
Committers
7

Bot releases are hidden (Show)

printd - v1.6.0 Latest Release

Published by joseluisq over 1 year ago

Features

5fec201a9e9bafc9597daacb2fd3e5f23034bf41 Custom events support for browser beforeprint and afterprint events when printing HTML elements (#22). See docs.

printd - v1.5.1

Published by joseluisq over 2 years ago

Fixes

  • d29f83f Printd doesn't print urls on latest Chrome 99.0 due to deprecated API. PR #19 resolves #18 reported by @conorholgate. Thanks to @ReynerHL and @jagDanJu for testing on IE 11.
printd - v1.5.0

Published by joseluisq over 3 years ago

Refactorings

  • 4418b429d138bceee3722381094de1a5b16953f9 Strict callback type checking for print() and printURL() functions.
  • afc4c3b26efb0354854dbc18d3a3ff05789b0e16 Remove deprecated style.type on createStyle() function.

Docs

6a1c3a349cb290563863aa2c6cfc3ce8f58f02e1 Update code examples.

printd - v1.4.2

Published by joseluisq over 4 years ago

Fixes

  • 96f2e9f74af6a46732bb9e6a10ac2ee720147547 - Object.assign polyfill for IE 11+ (also 3645ccff9e227b229a05d261c4f0c8d183f5ce0c). PR #12 resolves #11

Refactorings

  • 6a7422ec3d2cf4eb17e8421d4b84e73ce3dfa66e - Use undefined instead of null on execCommand function param.
  • f926c621f47cab2f630215e8bd63fd8c3120d8ce - Minor code simplifications.
  • 43c9cfb840552214a0f873222de7081f80edfd40 - Code styling changes.
printd - v1.2.0

Published by joseluisq about 5 years ago

Breaking

  • print() callback arguments: iframe prop instead of contentWindow & contentDocument.

Features

  • Support for external assets loading (resolves: #17 #24)
  • URL printing support (resolves #20)

Updates

  • Update README.md documentation
  • Update code documentation

Add

  • Example directory.
printd - v1.3.0

Published by joseluisq about 5 years ago

Breaking

  • Print function now supports assets loading on demand (string array of styles or scripts). (PR #27)
print (el: HTMLElement, styles?: string[], scripts?: string[], callback?: PrintdCallback)

Features

  • Load styles and scripts on demand (PR #27)

Updates

  • Update code sample
  • Update project docs
printd - v1.3.1

Published by joseluisq about 5 years ago

Bug fixes

  • Prevent to open Firefox print dialog on load when it creates a new instance of Printd (Fixes #29).

Updates

printd - v1.4.0

Published by joseluisq about 5 years ago

Features

  • 0f65d47 Prefer one options argument in constructor
  • 0f65d47 Add the ability to passing head and body elements as options

Fixes

  • Fixes #33

Breaking

printd - v1.4.1

Published by joseluisq about 5 years ago

Fixes

  • 3c240ac6049967bf18a14561220fa828497f00b1 - Fix wrong behaviour when passing list of style urls.

Feature

  • 3cb099465fa97f1c4792239c8975ade0668b980d - Add relative path backwards support. E.g. ../some/path/file.txt