Printing (to printer) a ViewPart [message #110212] |
Wed, 22 October 2008 09:31  |
Eclipse User |
|
|
|
Originally posted by: spanprevention-nursubscriptions.gmail.com
Hi,
Is there a standard/prescribed way of printing (to a printer) a ViewPart?
I came across the following links that deal with it:
http://dev.eclipse.org/newslists/news.eclipse.technology.rap /msg02985.html
http://dev.eclipse.org/newslists/news.eclipse.technology.rap /msg00496.html
Here is my understanding as to how this may be achieved:
1. As of now, RAP does not provide any intentional support for printing
2. One way to print a ViewPart is to instantiate
org.eclipse.swt.browser.Browser. Then invoke Browser.setText(String
contentsToPrint). The argument should be the HTML that is to be printed
i.e. the ViewPart contents suitably decorated with HTML tags.
Is the above understanding correct?
What i have is a "Print" toolbar menu item. When that is clicked, a dialog
pops up that contains the above browser.
Any pointers, suggestions or code snippets to either get me back on track
(in the fairly likely event that i am off-track), or to endorse the
approach (with improvements) are greatly appreciated.
TIA,
Best Regards,
-abhi
|
|
|
|
Re: Printing (to printer) a ViewPart [message #110394 is a reply to message #110347] |
Thu, 23 October 2008 18:08  |
Eclipse User |
|
|
|
Originally posted by: spanprevention-nursubscriptions.gmail.com
Hi Paul,
Thanks a lot for your reply. I must admit, i get the impression that there
is a lot of work to be done using this approach. Basically reformat the
entire view and multiply this effort for each view.
Thanks as well for spotlighting the lurking stumbling blocks that i can
expect. I will definitely revert when i take up this functionality in
earnest seriousness.
Thanks and Regards,
-abhi
|
|
|
Powered by
FUDForum. Page generated in 0.01635 seconds