• Post Reply Bookmark Topic Watch Topic
  • New Topic

Prevent dot matrix printer scrolling entire sheet after printing jsp page as receipt

 
harsha karuturi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am developing a web application and uses jsp page to print a payment receipt.

everything works good, but printer scrolls complete sheet after printing first receipt. so need scroll back manually every time i print a receipt.

so, help me how to stop printer from scrolling entire sheet.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would try to capture what is being sent to the printer and examine the end of the file for control codes.

It sounds sort of like the printer is getting a FORM-FEED control character.

Exactly how are you starting the print job? With the browser print menu item or ??

Bill
 
harsha karuturi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have Used JavaScript window.print() function to start print job. There is no form feed in page. I think printer might be adding form feed automatically.
 
Greg Charles
Sheriff
Posts: 3010
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks like more of a JavaScript issue than JSP, so I'm adding it to that forum. I don't have anything else to add except, wow, really? A dot matrix printer? Since JavaScript didn't lumber into existence until dot matrix printers had started fading away, it's entirely possible it's biased towards a "sheet feed" model rather than "continuous feed". With an ink jet printer, for example, of course you want the page to spit out when the printing is finished. Still, with the JavaScript experts we have here, I wouldn't be surprised if someone can suggest a solution.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be worth fiddling with the CSS property page-break-after or break-after. The initial value is "auto" which means "Automatic page breaks" - try "avoid" (or "" empty string) which "Avoids page breaks after the element."

Often though problems like this are between the web-browser platform and the printer driver and cannot be influenced by the web page itself but require environmental workarounds that depend entirely on the specific actors and circumstances involved.
 
harsha karuturi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone thanks for your concern, i got the solution. Just need to change printer page settings in system. change paper size and if your desired size is not present create one as per your requirement and select the same in your browser page setup.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Charles wrote:wow, really? A dot matrix printer?

Don't be too shocked. We still about 100 Okidata dot-matrix printers here. But then, we also still have some 486-based systems running DOS with apps written in BASIC, so welcome to my world.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!