cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Document

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Chris,

Thanks for your response,

So is it possible to achieve my requirement? (Access Share point from WDA and print the document without opening the document)

If so which is the best way to proceed.

Also in my sharepoint my file may be any of of pdf,doc,xls formats.

ChrisPaine
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks a lot Chris.

Even am searching for the same.

I would also like to get inputs from Thomas Jung.

frank_stdle
Participant
0 Kudos

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.

Answers (0)