0

Hi,

I want to print the specific data from page instead of Full page data.

So i can't use window.print method.

I have take my data in $data variable.

i want to print only this data.

any other method for print selected data??(not full page)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by almostbob
0
<!--doctype
html head etc-->
<style type='text/css'>
@media screen { .dontshow { display:none; } }
@media print {  .dontprint { display:none; } }
</style>
<head><body>
<p>this part gets printed and displayed <span class='dontprint'>this giets displayed</span><span class='dontshow'> this part gets printed</span></p>
<div class='dontprint'>bla bla bla bla bla bla</div>
<h1 class='dontshow'>header for only the print stuff</h1>
<div>important print stuff</div>
<div class='dontprint'>bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla</div>
<div> this will print and screen display</div>
<div class='dontprint dontshow'>this gets indexed but does not display or print</div>
</body></html>

then you can use window.print()
or the user can print out by keypress
we have a custom <div class='dontshow'>This document &copy;www.mysite.com</div> prepended to all printouts.

Edited by almostbob: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.