on ‎2009 Nov 09 8:50 PM
Hi folks, I'm trying to open dynamically the print dialog window for printing the PDF (Ctrl + P) in WebDynpro ABAP using JavaScript.
The JavaScript seems to be executed only for Interactive Forms, however I don't need to use interactive but only Print-Based Forms.
This line of code works if I assign it to an event like click for a button, I tried to call it in the doc:ready event but it does not work
xfa.host.print(1, "0", "0", 0, 1, 0, 0, 0);Please I need some help and I hope it's possible!
Alex
Request clarification before answering.
Hi,
Try this code
//xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
xfa.host.print(0,"0","0", 0, 1, 0, 0, 1);
xfa.host.exportData("",1);
Kind Regards,
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, we are getting close!
This line of code works, but it does not prompt me with the print dialog box (because of the first parameter is 0)
xfa.host.print(0,"0","0", 0, 1, 0, 0, 1);I got this message box "This document is trying to print. Do you want to allow this?" Yes/No....
Ok, that works but I would like to have the standard print dialog window instead, where you could select your printers.
This line of code prompt me to save the XDP, this is not what I want
xfa.host.exportData("",1);In which event should I place the script??
Also, script only seems to be executed for interactive forms, I don't want to generate interactive forms, they are more heavy to render, this is only for print based forms!
thanks
Alexandre Giguere
Hi,
It is currently not possible to trigger printing the PDF from ouside the PDF (e.g. in WD).
And for all of you trying to figure out how to print using the print dialog via scripting (use it for example in a click event button):
event.target.print()
This is Acrobat Java Script working only in interactive PDF forms.
Regards,
Juergen
Prerequisite is that the focus is to be placed on a WebDynpro UI element and not the Interactive Form UI.
We are using WD4A as standalone application, it's not integrated with NW Portal or NW BC. The WD4A is encapsulated into a frameset in an html page, we could add another frameset (invisible) that will search the PDF object and print it (in JavaScript)
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.