diff --git a/package.json b/package.json index 2709a80..82ca230 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "print-js", "homepage": "http://printjs.crabbly.com", "description": "A tiny javascript library to help printing from the web.", - "version": "1.0.41", + "version": "1.0.42", "main": "dist/print.js", "repository": "https://github.com/crabbly/Print.js", "license": "MIT", diff --git a/test.css b/test.css new file mode 100644 index 0000000..67ac297 --- /dev/null +++ b/test.css @@ -0,0 +1,6 @@ +@media print { + h1 { + color: red; + font-size: 40px; + } +} \ No newline at end of file diff --git a/test.html b/test.html index 41dd2ce..21efc71 100644 --- a/test.html +++ b/test.html @@ -12,21 +12,36 @@ }); } - function printHtmlCustom() { - const css = ` + function printHtmlCustomStyle() { + const style = ` @page { margin: 0 } + + @media print { + h1 { + color: blue + } + } ` printJS({ printable: 'test', type: 'html', - css: css, + style: style, scanStyles: false }); } + function printHtmlCss() { + printJS({ + printable: 'test', + type: 'html', + css: 'test.css', + scanStyles: false + }); + } + function printJson() { let data = [ { @@ -49,18 +64,27 @@

Print.js Test Page

- - - - +

+ +

+

+ + + +

+

+ +

\ No newline at end of file