($iframe, doctype)
| 131 | |
| 132 | // Add doctype to fix the style difference between printing and render |
| 133 | function setDocType($iframe, doctype){ |
| 134 | var win, doc; |
| 135 | win = $iframe.get(0); |
| 136 | win = win.contentWindow || win.contentDocument || win; |
| 137 | doc = win.document || win.contentDocument || win; |
| 138 | doc.open(); |
| 139 | doc.write(doctype); |
| 140 | doc.close(); |
| 141 | } |
| 142 | |
| 143 | if (opt.doctypeString){ |
| 144 | setDocType($iframe, opt.doctypeString); |