Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

printing functionality in jsp

Posted on 2003-12-02
12
Medium Priority
?
387 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
10 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 9857820
basically, try :

document.print() ;

instead of

window.print() ;
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 252 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 248 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
Do online retailers and e-commerce sites even need to bother with the season? Is it lucrative to update and prepare your site for Black Friday and Cyber Monday shoppers? We'll find out now.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

773 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