Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
PHP
Print page
Print page
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sunilkhan
New Member
Join Date:
Dec 2011
Posts:
1
#1
Print page
Dec 23 '11, 07:03 AM
how can i disable the print preview of page during printing
Rabbit
Recognized Expert
MVP
Join Date:
Jan 2007
Posts:
12517
#2
Dec 23 '11, 04:07 PM
In a web browser? You can't. Or rather, the only way to do it would be through client-side scripting and that can be disabled so that the code doesn't run. But why would you even need to disable print preview?
Comment
Post
Cancel
sramineni
New Member
Join Date:
Dec 2011
Posts:
5
#3
Dec 26 '11, 07:54 AM
By using CSS you can able to achieve in print preview blank page.
Code:
<style type="text/css" media="print"> body { display: none;} </style>
In above css code as we are using media="print" this will execute when we print the page only.
Comment
Post
Cancel
Rabbit
Recognized Expert
MVP
Join Date:
Jan 2007
Posts:
12517
#4
Dec 26 '11, 07:07 PM
Just be aware that not all versions of web browsers will support that.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment