• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Make default print at 100%

 
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a problem which seems to be trivial but is very annoying. I have a jsp page in which there is a print icon. On clicking print icon, the entire page is printed(depending on rules I specified in print.css file) using window.print() . I have rules which make a perfect printing on 100% scale but on shrink to fit mode, lot of space is left on right side of page. As result letters in print become very small. The problem I am facing is on click of print, the default print mode which is getting selected is Shrink to fit instead of 100%. I wanted to know is there any way by which I can override this behavior to make 100% as the default print mode.

Thanks for help
Suvojit

P.S. I have found on google few hacks for this: like running some commands to change registry. But these wont work as I cant ask clients to run these.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript and CSS have poor control over printing.

Eric
 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Eric Pascarello wrote:JavaScript and CSS have poor control over printing.

Eric



Thanks for reply Eric.

I have also realized the same. But isnt there any way around to solve this problem?

Thanks
Suvojit
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless the browser supports some of the CSS3 stuff, there really is nothing you can do to control printing.

Eric
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!