an issue related to printing of receipts.

R

Ravi

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.
 
E

Evertjan.

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?
 
B

Bart Van der Donck

Ravi said:
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top