469,329 Members | 1,489 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,329 developers. It's quick & easy.

an issue related to printing of receipts.

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
2 2109
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
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.

Similar topics

2 posts views Thread by dareinan | last post: by
reply views Thread by mcfly1204 | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.