Solved

printing functionality in jsp

Posted on 2003-12-02
12
354 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
Comment Utility
0
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
basically, try :

document.print() ;

instead of

window.print() ;
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 63 total points
Comment Utility
>> 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
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
bah ;-)

Still I learned something today :-)
0
 

Expert Comment

by:fks2
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 14

Expert Comment

by:kennethxu
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
thank you.

0
 
LVL 2

Assisted Solution

by:glottis
glottis earned 62 total points
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now