Solved

printing functionality in jsp

Posted on 2003-12-02
12
362 Views
Last Modified: 2010-04-01
hello sir,

          I have done project using jsp and oracle 9i. My
 client told that, for reports place a button with name
 print at the bottom of the page . Clicking on that button
 should display print dialog box and should perform
 printing functionality. I have used javascript's
 window.print method. but problem is, the bottom of
 printing page contailns address in location bar.
 I have to provide printing functionality without displaying the address at the bottom of the page.
 how i can provide this ?

         Please explain with necessary code.
       
         Thank you.
0
Comment
Question by:ram1979
  • 3
  • 3
  • 3
  • +1
12 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 9857817
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9857820
basically, try :

document.print() ;

instead of

window.print() ;
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 63 total points
ID: 9860688
>> I have to provide printing functionality without displaying the address at the bottom of the page.
document.print() won't do this for you either.
The answer to your question is NO, there is no way you can do this with simple html and javascript.
you'll need signed applet or activeX to layout the page yourself and then print, that will be windows programming, not web programming.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 35

Expert Comment

by:TimYates
ID: 9865073
bah ;-)

Still I learned something today :-)
0
 

Expert Comment

by:fks2
ID: 9873709
ken, if that's the case, can not print using the javscript, then what can we do for printing solution for the web-based?

I heard lot of people talking this disadvantage of the web-based project. When in printing issues, always have a limitation..

what would you do (i mean easy approach for dummy like me) if you want to do printing? pdf? javascipt? or etc????
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9875130
For sure there is no easy approach for fine controlled printing in web app. If user really need hight quality, fine grained printing control, I use PDF.

If the report is relatively small (less then 50 pages), I think xsl-fo + jakarta FOP is good enough.
0
 

Expert Comment

by:fks2
ID: 9887158
ram1979, sorry to interrupt on the question.:-)

ken,what is the best advice you would suggest if i am using the approach like what you've mentioned above? PDF approach....

any URL or class file or API or sample program that you can refer to us??

i think ram1979 also having the same problem like i do. Whereby customer insist on printing something on the printing solutions.....

:-)
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9888645
There a a lot of commercial PDF solution and web reporting solution out there. Personally, as I said above, I use apache FOP (sorry, did I said jakarta FOP? :) which is pretty good, it's based on xsl standard (xslt and xsl-fo), you'll need to learn xslt and xsl-fo in order to use it.

http://xml.apache.org/fop/


0
 

Expert Comment

by:fks2
ID: 9894228
thank you.

0
 
LVL 2

Assisted Solution

by:glottis
glottis earned 62 total points
ID: 9902328
I had similar problems in ASP.
As ken said that you would need signed applet or ActiveX control... one company has done just that.
Use their product ScriptX which will help you in controlling the client side printing through IE (limitation IE only).

You can find the resource here:
http://www.meadroid.com/scriptx/index.asp
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
February 24, 2017 — On February 23, Travis Ormandy, a vulnerability researcher at Google, reported on Twitter (https://twitter.com/taviso/status/834900838837411840) that massive stores of data have been leaked by CloudFlare, a company that provide…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question