on 07-13-2010 5:50 AM
Hi All,
On clicking a button called "DISPLAY" we are able to open the document from sharepoint and display the document using the following code.
lo_window = lo_window_manager->create_external_window(
url = 'http:// ............................... .doc'
modal = abap_false
has_menubar = abap_true
is_resizable = abap_false ).
is_resizable = abap_true ).
Now, I have a button called "PRINT" in my webdynpro screen.
When i click this button it has to read a document from sharepoint and print the document.
Any pointers of how to read this document and print the same (without opening the document) would be helpful.
Thanks in advance.
Hello,
printing is always going to be a very device specific process. A user might not even have a printer installed on (for example their iPad that they are running your app on).
If you can know which platform you are running on you could probably use the ACFExecute "UI" element to directly launch MS Word, launch the doc and print it. - There might even be some parameters you could pass to the application to make it print in the background - immediately to default printer.
The point is that you can't get WDA to do this - as it cannot interact (other than through ACFExecute, upload, download) with the applications installed on your client machine - it is (apart from these exceptions) sandboxed to the browser.
By launching the new window/URL you are just trusting that your client is able to interpret that URL and find the right means of rendering it. It just happens that the machines you are using know what a .doc file is and how to read it...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohamed,
I think it might be possible to open and print the files with ACFExecute
but as to "background" printing - you need to check what command line options the various application that would be used take.
Depending on the OS you are using these would likely be different. From a little searching, I'd suggest that it isn't possible. But then again I'm no expert on MS Office products.
We have a similar scenario on our site -- we have a WDA that needs to print all sorts of documents that are external to SAP. We have solved the problem using ACFExecute -- ACFExecute will run a small visual basic application that takes as input a document filename on a network drive. The VBA will launch the appropriate application for the document (based on Windows registry settings) and print the document and close the application. So the printing is in "semi-background" -- the user will see for instance Adobe Reader launching (if a PDF document is being printed, the document is printed from Adobe Reader, and then Adobe Reader is closed immediately.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.