By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

an issue related to printing of receipts.

P: n/a
Hi People,

I am facing an issue with printing where I have to print receipts of a
custom size. Each receipt is about 8 inch by 4inch. I am using
window.print(). When a receipt is printed another 3 receipts are
flushed out of the printer. I want only the printed receipt out of the
printer. Am using a dot-matrix printer and the receipts are in a
continuation (i.e around 1000 receipts attached to one another).

I want to print only one receipt at a time. Please help me. Its very
urgent.

Apr 26 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ravi wrote on 26 apr 2007 in comp.lang.javascript:
Hi People,

I am facing an issue with printing where I have to print receipts of a
custom size. Each receipt is about 8 inch by 4inch. I am using
window.print(). When a receipt is printed another 3 receipts are
flushed out of the printer. I want only the printed receipt out of the
printer. Am using a dot-matrix printer and the receipts are in a
continuation (i.e around 1000 receipts attached to one another).

I want to print only one receipt at a time. Please help me. Its very
urgent.
Scipping the inches part,
are you perhaps printing an A4 page on an A6 piece of paper?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 26 '07 #2

P: n/a
Ravi wrote:
I am facing an issue with printing where I have to print
receipts of a custom size. Each receipt is about 8 inch by
4inch. I am using window.print(). When a receipt is printed
another 3 receipts are flushed out of the printer. I want only
the printed receipt out of the printer. Am using a dot-matrix
printer and the receipts are in a continuation (i.e around
1000 receipts attached to one another).

I want to print only one receipt at a time. Please help me.
Its very urgent.
I think you are looking for CSS print controls:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<title>Print vs. screen</title>
<style type="text/css" media="print">
.pagebreak { page-break-after: always; }
.onlyscreen { visibility:hidden; display:none; }
</style>
<style type="text/css" media="screen">
.onlyprint { visibility:hidden; display:none; }
</style>
</head>

<body>
<p class="pagebreak">this is page 1</p>
<p class="pagebreak">this is page 2</p>
<p>this is page 3</p>
<p class="onlyscreen">this is only screen, not printed</p>
<p class="onlyprint">this is only printed, not on screen</p>
</body>

</html>

Hope this helps,

--
Bart

Apr 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.