Skip to content

Instantly share code, notes, and snippets.

@abhishek77in
Last active December 21, 2017 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhishek77in/45812db0164cc49afdb244c490862d9d to your computer and use it in GitHub Desktop.
Save abhishek77in/45812db0164cc49afdb244c490862d9d to your computer and use it in GitHub Desktop.
var printPage = (function () {
var style = document.createElement('style');
$(".columns").append(style)
return function (rule) {
style.innerHTML = rule;
};
}());
printPage.size = function (marginTop) {
printPage('@media print { @page {margin-top: ' + marginTop + 'cm} }');
};
// printPage.size("10")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment