UPD1. I have two printers:
44mm
x 23mm
I have two web-pages.
First page have a DIV
with dimensions 44mm
x 23mm
setted in css
:
@page {
size: 40mm 23mm;
overflow: hidden;
}
If I click in browser Print Preview
I'd like to see only one page with exact width and height (44mm x 23 mm)
Second page have a DIV
that have lot of data. It have to be restricted by width to A4
width, but may have multiple pages. If I click in browser Print Preview
I wanna see A4-sized preview.
What browsers support this? Firefox 7
and Chrome 16.0.912
doesnt.
Is it possible to print exactly what I want with exactly size I want in HTML5/CSS/etc...
I just gathered pieces from all over and put it altogether. It is working for me:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://barcode-coder.com/js/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript" src="http://barcode-coder.com/dp.SyntaxHighlighter/Scripts/shCore.js"></script>
<script type="text/javascript" src="http://barcode-coder.com/dp.SyntaxHighlighter/Scripts/shBrushXml.js"></script>
<script type="text/javascript" src="http://barcode-coder.com/dp.SyntaxHighlighter/Scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="http://barcode-coder.com/js/jquery-barcode-last.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#ean").barcode("9785903979165", "ean13", {barWidth:2});
});
</script>
<style>
#ean {
position: absolute;
left: 0;
top: 0;
width: 40mm;
height: 23mm;
}
</style>
</head>
<body>
<div id="ean">
</div>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With