Open Print Dialog using JavaScript

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

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

Similar Messages

  • How to open print dialog from web dynpro abap application

    Hi experts,
            I have a web dynpro application with several views and onone of the view there is a button that should open print dialog with printers list and all other options (standard print dialog we see in windows). I did reserach on SDN and came to now that this is a limitation of web dynpro abap. I did find some code also but unfortunately our current version of ABAP(7.0) do not support the code I found. I am not able to find any proper solution for this. Could someone please let me know how I can open a print dialog by clicking on a button in web dynpro abap? Any sample code or any information would be greatky appreciated.
    Thanks.
    Mithun

    Hi Mithun,
    Have you check this?
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/f8/872806981d4411b5ce51a00207ed31/content.htm
    and also go through..
    How to print in a web dynpro application
    Print button
    Cheers,
    Kris.

  • KDEmod very long time to open print dialog

    Then I want to print something from a KDE application it takes a few minutes for the print dialog to open while I can't use the application I want to from because the window is blocked.
    I have set cups of from systemsettings and the printer is a Dell 2135cn (network printer) using the dell 3100cn driver.
    The print dialog come up almost at once in firefox (shiretoko) but the printed fonts is very ugly, which they are not from KDE applications.
    Any idea how to fix this?

    Hi,
    Have a look at this post :- Very large Input form-how to handle
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Slow opening print dialog screen in Windows 8.1

    I have Adobe Reader 11.0.5 and am using Windows 8.1.  When I click on the print icon, it takes 20 to 30 seconds for the print dialog screen to open.  This is maddening.  Does anyone know why and how to speed it up?

    Hello eycon
    Try out the article below to troubleshoot your issue with iTunes freezing on you. Also check to make sure that when you removed iTunes, did you uninstall in the order of the second article as it does make a difference when troubleshooting the issue.
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/ht1923
    Regards,
    -Norm G.

  • Error when opening print dialog

    I am on a MAC using photoshop CS5  version 12.0.6.  I specified an unsupported custom size for a printer and it now causes an error when I attempt to open the print dialog by choosing "Print" from the file menu.  If I select "Print One Copy", the document attempts to print but generates error.  Since I can't get to the print dialog, I can't change the print setting.  Is there a file or way to change the print setting by some other means?

    RodneyH2 wrote:
    I am on a MAC using photoshop CS5  version 12.0.6…
    There's no such thing.  The latest version of Photoshop for the Mac is 12.0.2.  
    What routine trouble-shooting steps have you taken so far?

  • CR 2008 SP2 - Slow to open Print Dialog or Page Setup Dialog (And SP3+)

    When I am designing my report in CR 2008 SP2 and select either Page Setup or Print from the File menu, Crystal Reports stops responding for about 5 minutes and then the dialog box will open.  I created a blank report and did not add anything to it and this continues to happen.  The program operates at normal speed otherwise.  It is quick to startup and load reports. Any ideas on why this is so slow?
    Update:  I have also tried checking the box in page setup that says No Printer but the problem persists.
    Update 2:  I have updated from SP2 -> SP3 -> FP 3.1 -> FP 3.2 -> FP 3.3, and after each upgrade I tried both Print and Page Setup and it continued to exhibit the same slowness as in SP2.
    Thanks,
    Paul

    Hi Ashwini,
    I just completed updating my OS and I am still experiencing the behavior.  I have applied every update available through Windows Update.  I just reformatted my computer two days ago so this is a pretty fresh install.
    This problem existed before my reformat as well however.  A few months ago, Crystal did not have this slow issue when opening either Print or Page Setup dialogs.  About a month ago these two dialog boxes just became very slow.  I hoped reformatting would get rid of this issue but it persists.  I also experience this slowness on a different computer that I am using.
    One idea I just tried is to shutdown the Print Spooler service in Windows.  The print dialog won't open at all but it does quickly tell me Warning: No Printer is installed on this system.  The Page Setup dialog on the other hand opens immediately, however, the Printer Options group box is totally greyed out.  This "fix" is of course no good to me since I cannot print, but perhaps it narrows down the issue to something regarding printing and/or printers?

  • Opening print dialog box with "Selection" printing enabled

    Hi all,
    I have a JTable in which I wan to print only selected rows. When I open the Print dialog box using printDialog() method of PrinterJob, the dialog opens with "Selection" option disabled.
    How can I enable this option ?
    How can I print my selection using the standard Print Dialog ?

    This I know.
    Let me refrase my question:
    I have a table with selected cells (Rows Cols
    whatever ...) I wish to open the print dialog box
    with Selection radio button enabled, such that when I
    will check it and click print, the selected table
    cell get printed.This I had understood.
    Let me refrase my reply:
    If you simply print a new table containing the selected data
    then you don't need to have the Selection radio button enabled
    in the print dialog box.

  • Open Printer dialog window

    Can I open the Windows Printer dialog window in Forms during runtime and then send the printer name that the user selected to Oracle Reports?

    Here is the code for showing the WINDOWS PRINTER DIALOG BOX. REMEMBER YOU HAVE TO ATTACH D2KWUTIL.PLL file for this to work.
    declare
    v_printer_name varchar2(1000) := null;
    v_port varchar2(1000);
    v_exception boolean;
    begin
    win_api_dialog.select_printer(v_printer_name,v_port,v_exception);
    wmessage('Printer is '| |v_printer_name);
    :b_selection.local_printer := v_printer_name;
    exception
    when others
    then
    :b_selection.local_printer := null;
    end;
    null

  • Can't open links that use Javascript even if Javascript enabled

    I've tried to open links on a recruitment website but the ones that use javascript, or at least I assume they do as this appears at the bottom of the screen when i click on the link javascript:%20OpenWindow(350,402,%20'details.asp?dir=1&id=39649&type=O&checksum=df089b6b4eab6c4134db5582a6d77a31',%20'Update',%20'True'); but nothing happens. Direct links to another website work ok. i'm having no problems with this when using internet explorer.
    many thanks.

    I went to the web site. No problem loading.

  • ID CS5 (7.0.4) painfully slow opening print dialog box

    I've been having this issue for quite some time and finally getting around to finding out what's going on.
    I counted 38 seconds between the time I hit Control-P, and the time the print dialog box opens up. ID looks like it has hung up until it finally opens the print dialog box.
    Edit: meant to say that my documents are all very simple text-based pages with a simple letterhead graphic file embedded, 5-6 pages usually.
    Any suggestions on how to fix this, such a lot of wasted time waiting.
    Thanks!
    System: Windows 7, 8 GB Ram
    ID CS5 7.0.4

    That would be MY first step. It takes no real time and will eliminate it as a possibility. Next thing I would do is trash prefs: see Replace Your Preferences
    If neither of those works, I'm not sure what I would do next...  Perhaps have a look at what else is running that could be slowing things down.

  • Opening print dialog automatically

    I'd like to put a pdf on my website, and when the user clicks a link,
    have Acrobat Reader open the pdf and show the print dialog. (It would
    even be better if it would jump to a specific page).
    Is this possible?
    Something like this:
    http://mysite.com/mypdf.pdf?openprintdialog=yes

    This I know.
    Let me refrase my question:
    I have a table with selected cells (Rows Cols
    whatever ...) I wish to open the print dialog box
    with Selection radio button enabled, such that when I
    will check it and click print, the selected table
    cell get printed.This I had understood.
    Let me refrase my reply:
    If you simply print a new table containing the selected data
    then you don't need to have the Selection radio button enabled
    in the print dialog box.

  • How to open modal popup using javascript in iPad ?

    Hi Apps masters
    How to open modal dialog ?
    How to return selected value to parent value ?
    How to close modal dialog ??
    Thanks,

    Hi,
    Try This
    function aboutOkButton(event) {
    var v= event.getSource();
    var popup = v.findComponent("popupId");
    popup.hide();
    event.cancel();
    Sameh Nassar

  • Firefox 27.0 fails to open print dialog

    I have firefox set to automatically update. All of a sudden, perhaps after the most recent update, I cannot print anything. If I try to print, I just get an windows error sound and nothing more. I do not get the print dialog.
    I have tried to reset the printer configuration, and I have tried reinstalling Firefox all together. Neither sovled the problem.
    Please advice.
    Thank you.

    I was scratching my head for a day trying to figure out why suddenly I cannot print or initiate any dialog in Firefox. Avast was the culprit. I uninstalled it and now everything is working again. Installed Bitdefender for now :)

  • Cant Open Print Dialog for Powerpoint in Firefox

    Whenever i try to print off Firefox, there will be a small box saying "preparing to print" (with a small spinning series of dots) that lasts for 3 seconds or less. Then the box will disappear and there will be a TINY box saying "javascript" at the very bottom left corner of the screen. Nothing happens afterwards, just me and my screen sharing an awkward moment together.....
    I DO NOT have Microsoft Powerpoint but i have installed a Powerpoint Viewer on my laptop

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings and disables most add-ons (extensions and themes).
    ''(If you're using an added theme, switch to the Default theme.)''
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu by clicking on the '''Restart with Add-ons Disabled...''' menu item:<br>
    [[Image:FirefoxSafeMode|width=520]]<br><br>
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    Thank you.

  • ORARRP Web Page test did not open printer dialog

    Set-Up
    I have downloaded ORARRP onto the client (in WINNT).
    I modified the INI to use "choose_printer=no".
    I have updated the httpd.conf under the Apache directory path on our linux server and restarted the listener as per the orarrp instructions.
    Client Test
    If I use IE to open test.rrpa on the client (as file:///c:/test.rrpa), the file is printed.
    Server Test/Problem
    I renamed a pdf file on the server to test.rrpa and created an html page with a link to it. When I goto this test html page in IE on my client and click the link, it opens the rrpa file in Acrobat. But nothing prints.
    Note: The default printer on my client is a local printer (on LPT1).
    What have I missed?
    Any help will be greatly apprciated. Thanks.
    Rachelle

    bump

Maybe you are looking for

  • Welcome home 24" iMac!

    Well, I am finally the proud new owner of a new 24" iMac 3.06GHz! Swapped out the two 1GB GB RAM sticks for two 2GB for a total of 4GB. Watched a DVD movie to make sure the drive works. Ran perfect. Ran PiXel Check and found one dead pixel in the bla

  • SOE Configuration

    Hi, Please let me know how to Configur SOE so that I U ser can View Earnings, Deduction, Information & Balances in SOE in My case i Can only see Earnings & Deductions Balances & Information elements are not shown in SOE .... Please let me know the st

  • OIA_11gR1 deploying error

    Hi, I am trying to install OIA 11R1 according to the documentation on RedHat EL 5 (UL3+) Oracle WebLogic Server 11g Rel 1 (10.3.3) Oracle DataBase 11.2.0.1 , but I get error while I'm trying to deploy it in WebLogic through Admin Consol. After clicki

  • Data Sever Status Pending

    Hi all, I am using MII 12.0.2. I tried to connect SQL Server 2000 with MII it shows the data server status is Pending. I deployed the oracle-jdbc14.jar  in to the JDBC drivers. Server URL: jdbc:inetdae:<ServerName>:1433?database=Northwind&sql7=true J

  • Prime Infrastructure monitor link Bandwidth

    Hello, I would like to know if is possible to monitor a link bandwidth with Cisco Prime Infrastructure and send an e-mail when the bandwidth utilization exceeds a certain threshold. Thank you, Marco Bartulihe