Event handling document sent to printer

I use a hidden iframe to load a pdf page. the construction of the pfd and the loading is triggered by a button 'print'.
In the pdf page I have an acrobat javascript
var pp = this.getPrintParams;
//set parameters
this.print(pp);
I would like to have some kind of event handle in the html page that is triggered when the document is sent to the printer.
When I press on print I would like to disable all buttons and links on the page till the moment the document is sent to the printer.
Now the users often clicks away before the document is fully loaded and printed
Is there a way to handle this?

I will explain . This is how the system works now. On a html page i have a button. When i press this button the button event will create in the same page an iframe. The source atribute of the iframe points to a servlet. The servlet HttpServletResponse getOutputStream is used to write a pfd file. In the pdf file there is acrobat javascript so that the document is printed automatically (this.print(pp)).
I would like to know if there is some way to have some control in a html page about print statuses of a dynamically created pdf file. Here the document is loaded in an iframe. Maybe another way of working is needed?

Similar Messages

  • Is there a way to approve documents sent to my printer before they print?

    I have a printer connected to my time capsule which is bridged to the wi-fi network at my house. I showed my roommates how to print to it, but they keep accidentally sending documents to my printer instead of theirs. Is there a way I could make it so that I would have to approve the documents before they are sent?

    No, the queue on the TC is not accessible AFAIK. You would need to share the printer from your computer so you have control over the queue.
    Make sure each of the users, has default printer set to local one, and only if they deliberately choose the TC connected printer can they print. In the end, you may simply find it easier for them to send you the print job.. ie cut off their access to the printer. They print to file and send it to your computer or a folder on the TC and you determine if you send the job to the printer. The exact method of doing that depends on the printer type.. usually easy for postscript file.. much hard for some others.

  • How to configure which changes in the document triggers Event Handler again

    Hi Experts
    Due to some reason after creation of Purchase Order, the event handler is not created in EM system. Now is there any way to resend this PO to EM? For example, is it possible to trigger Event Handler by changing some field in PO? If it is possible that way, Could you guide how to configure which changes in the document (PO/SO/Delivery/Shipment) can trigger Event Handler in EM system?
    Thanks
    Ravi

    Hello Ravi,
    if you change the PO Header/Item the respective EH  should be created if the Relevance condition is fullfilled.
    I'm not sure if it also works in the case that you change the PO Header and EH for PO Items will be created.
    Best regards,
    Steffen

  • Override event handler for document events in LiveCycle

    I would like to have an email notification when a user opens a policy-protected DRM pdf. Is there a way to override the event handler for Document Open events?
    Or perhaps there is a way to access the event database- where can I find this information?

    Thank you so much for your reply. I have created an external authorization and am following the steps outlined here: http://help.adobe.com/en_US/livecycle/9.0/programLC/help/index.htm?content=001479.html
    I have deployed my jar and restarted JBoss. However, now when I try to create a new policy using my external authorization, I do not see an option to add it on the create new policy page. I see only sections for Users and Groups, General Settings, Advanced Settings, and Unchangeable Advanced Settings. Could you please tell me how to add the external authorization?
    Also, in the component.xml file, I followed the sample and kept this line: <component-id>com.adobe.livecycle.samples.externalauthorization</component-id>
    Should that be changed? If so, to what?
    Thanks.

  • How could i retrieve a document sent to my printer's email

    how could i retrieve a document sent to my printer's email

    Please read this post then provide some details.
    http://h30434.www3.hp.com/t5/Other-printing-questions/Want-Good-Answers-Ask-Good-Questions/m-p/2094#...
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Although I work for HP my posts and replies are my own
    Please mark the post that solves your problem as "Accepted Solution"

  • Print Preview texts from event handler of a web UI component enhancement

    Hello,
    I've enhanced View GSTEXT/List to add Print Preview button. What I've done in the event handler is to read the text with  function module READ_TEXT and I have all my text in the lt_lines internal table. Now I want to View this text in PDF format. I just realized I can't call a smartform directly from my event handler and I also can't call an adobe form to do this for me. Can anyone help me on how to resolve this?

    Hi Khaya,
    I see two things you might have done not quite right:
    Why do you use "READ_TEXT" when all the data is already there in the BOL? Did you ever have a look at the logic the WebClient uses to display the text? Go check it now!
    Of course you can call an Adobe or Smart Form in an event handler. The bigger problem might be getting the response to the user.
    Not knowing your exact logic I would recommend:
    Use the BOL to retrieve all data.
    In the method where you create the button use CL_CRM_WEB_UTILITY to create the JavaScript code for a client callback handler. Then in the handler create the PDF and return it to the user. You can just set the XSTRING to the response.
    cheers Carsten

  • Capturing the Cancel button with Before Print event handler

    I put together a script that is triggered by a beforePrint event handler. Everything works fine but I can't figure out how and where to capture the user clicking on the Cancel button in the Print dialog?
    Any ideas? Thanks, Dan

    Alen,
    My bet is you are using JDeveloper 11.1.1.5. This is a known ADF bug 12551764 in this release, not related to JHeadstart.
    Here are the details:
    http://adfbugs.blogspot.com/2011/05/jdeveloper-11115-serius-bug.html
    I just checked the bug database, it is fixed in patch 12399372. You can go to metalink to download the patch.
    Steven Davelaar,
    JHeadstart Team.

  • Officejet J6480 All-in-One Printer prints document leaves "error sent to printer" message in que.

    I have an officejet 6480 connected wirelessly that I'm printing to from an eithernet connected computer running Windows 8. When I print a document from various programs (notepad, adobe, outrlook, etc.) the document prints OK, but I'm left with a message in the que under status that says "error - sent to printer". 8/2 is listed under pagesand I'm printing a two page document. I've run HPSSdr and it says errors were found and it clears the que, but the next time I print I have the same problem. The printer is connected to an Actiontec PK5000 wireless/eithernet DSL modem/router. It is a securred router with a WEP password. When I do a test print from the HP software it clears OK, but it leaves the other message in the que. I also ran SFC /scannow, which didn't find any problems.
    This question was solved.
    View Solution.

    The problem seems to have rectified itself. I did a system restore to before the last required updates and still had the problem. I reinstalled the updates that were removed and the problem seems to have gone away. I had to turn off and back on the printers wifi connection because I was getting a printer unavailable message. After all that it seems to be working now.

  • Documents are sent to printer and act like they are printing but no text prints

    when we send a document to the printer, the printer sends the paper through as normal but nothing prints - have tried a basic email, an online bank statement and also a works document.  We have done a nozzle check on the printer and cleaned the printhead but nothing has helped.  We have tried two different printers - a Canon MP490 and an Epson Photo R300

    You're welcome

  • I want to cancel a document sent to the printer (D2430). How do I do that?????????

    i want to cancel a document sent from my
    paviiiiondv6s/ncfn9352p65pnvm22oua#aba,model#dbv-1375dx to my hp deskjet 2430 s/nth73s150kb
      it is not easy to turn over these pieces of equiptment to find all these stupid numbers.  

    Blocksomjng, welcome to the forum.
    I believe the OS that you are using is Vista.  If so, here is a guide to help you clear the Que.
    Please let us know if this solves your problem or not.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Copying text to the clipboard in AVDocDidOpen event handler causes Acrobat 9 to crash

    I'm trying to copy the filename of a document to the clipboard in a plugin with my AVDocDidOpen event handler.  It works for the first file opened; however when a second file is opened, Acrobat crashes.  The description in the application event log is: "Faulting application acrobat.exe, version 9.1.0.163, faulting module gdi32.dll, version 5.1.2600.5698, fault address 0x000074cc."
    I've confirmed that the specific WIN32 function that causes this to happen is SetClipboardData(CF_TEXT, hText);  When that line is commented out and remaining code is left unchanged, Adobe doesn't crash.
    Is there an SDK function that I should be using instead of WIN32's SetClipboardData()?  Alternately, are there other SDK functions that I need to call be before or after I call SetClipboardData()
    Bill Erickson

    Leonard,
    I tried it with both "DURING, HANDLER, END_HANDLER" and "try catch," as shown below.  However, it doesn't crash in the event handler; it crashes later, so the HANDLER/catch block is never hit.
    The string that's passed to SetClipboardData() is good, because I'm able to paste it into the filename text box of the print dialog when I try to create the "connector line" PDF.  I also got rid of all the string manipulation and tried to pass a zero-length string to the clipboard but it still crashes.
    Here's the code:
    ACCB1 void ACCB2 CFkDisposition::myAVDocDidOpenCallback(AVDoc doc, Int32 error, void *clientData)
        PDDoc pdDoc = AVDocGetPDDoc(doc);
        char* pURL = ASFileGetURL(PDDocGetFile(annotDataRec->thePDDoc));
        if (pURL)    {
            if (strstr(pURL, "file://") && strstr(pURL, "Reviewed.pdf")) {
                // Opened from file system so copy filename to clipboard for connector line report
                char myURL[1000];
                strcpy(myURL, pURL);
                ASfree(pURL);    // Do this before we allocate a Windows handle just in case Windows messes with this pointer
                pURL = NULL;
                HGLOBAL hText = GlobalAlloc(GMEM_MOVEABLE, 1000);
                if (hText)    {
                    try
                        // Skip path info and go right to filename
                        char *pText = (char *)GlobalLock(hText);
                        char *pWork = strrchr(myURL,'/');
                        if (pWork)    {
                            strcpy(pText, pWork+1);
                        } else {
                            strcpy(pText, myURL);
                        char *pEnd = pText + strlen(pText);    // Get null terminator address
                        // Replace "%20" in filename with " "
                        pWork = strstr(pText, "%20");
                        while (pWork)    {
                            *pWork = ' ';
                            memmove(pWork+1, pWork+3, (pEnd - (pWork+2)));
                            pWork = strstr(pText, "%20");
                        // Append a new file extension
                        pWork = strstr(pText, ".pdf");
                        *pWork = 0;    // truncate the string before ".pdf"
                        strcat(pWork,".Connectors.pdf");
                        GlobalUnlock(hText);     // Must do this BEFORE SetClipboardData()
                        // Write it to the clipboard
                        OpenClipboard(NULL);
                        EmptyClipboard();
                        SetClipboardData(CF_TEXT, hText);     // Here's the culprit
                        CloseClipboard();
                        GlobalFree(hText);
                    } catch (char * str) {
                        AVAlertNote(str);
            if (pURL)
                ASfree(pURL);

  • How to show a message in a form 'PL/SQL Button Event Handler'

    We need validate the sal of an employee, and if it is bigger the value musts
    not be inserted.
    We trying a code like the one shown in the note 134312.1 'HOW TO PASS A
    PARAMETER FROM A PORTAL FORM TO A STORED PROCEDURE' and it works in the insert event of the insert button (using 'PL/SQL Button Event Handler') and it works, but we need to show a message that says the data wasn't inserted. How can we do this?
    The code we used is:
    declare
    v_deptno scott.emp.deptno%type;
    v_empno scott.emp.empno%type;
    v_sal scott.emp.sal%type;
    mySal scott.emp.sal%type;
    v_string varchar2(256);
    blk varchar2(10):='DEFAULT';
    begin
    select sal into mySal from scott.emp where empno=7369;
    v_deptno:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_DEPTNO');
    v_empno:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_EMPNO');
    v_sal:=p_session.get_value_as_number(p_block_name=>blk,
    p_attribute_name=>'A_SAL');
    v_string:='You just inserted empno: '||to_char(v_empno) ||'to deptno ->
    '||to_char(v_deptno);
    if mySal < v_sal then
    doInsert;
    else
    -- We want to display a message here, when mySal > v_sal
    end if;
    end;
    ----------------------------------

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • How to get a form field valud in delete PL/SQL Button Event Handler

    Hi Friend,
    I have a form. when user clicks delete button. we want to remove system dodelete function
    and add a delete script
    Under delete-top category,
    how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
    DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
    But when I try to save this form and get message as
    1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
    Thanks for any help!
    newuser

    I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
    Then just reset your flag.

  • OIM 11.1.1.5: Post Process Event Handler, change password notification

    Hi,
    Products
    OIM 11.1.1.5 BP02
    OAM 11.1.1.5
    OID 11.1.1.5
    Problem
    I have written a post-process event handler which fires when a role is assigned to a user. The event handler calls a plugin which uses the UserManager API to generate and change the user's password.
    I've tested this by assigning a role to the user via the OIM web console. I can see my log messages indicating that the event handler has fired and that the password has been changed.
    However, I expected that when UserManager.changePassword completed, a notification email would then be sent to the user informing them of the new password, but no notification email has been sent.
    The email notifications have been set up correctly, because I have changed the same user's password via the OIM web console and successfully received a Reset Password email.
    So, my questions are:
    1) Am I right in thinking that when you call UserManager.changePassword(), an out-of-the-box ResetPassword email notification should be sent to the user?
    2) Has anyone got this working in 11.1.1.5?
    Some more detailed info
    In my plugin class I'm calling the following from both execute methods (EventResult and BulkEventResult):
    char newpasswd[] = new RandomPasswordGeneratorImpl().generatePassword(user);
    getUserManager().changePassword(userKey, newpasswd, false, null, true);
    logger.info(("Successfully changed password"));
    plugin.xml
         <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
         <plugin
         pluginclass="oracle.iam.PostInsertPlugin"
         version="1.0"
         name="PostInsertPlugin">
         </plugin>
         </plugins>
         </oimplugins>
    $OIM_HOME/server/bin/weblogic.properties
              wls_servername = oim_server1
              app = OIMMetadata
              metadata_from_loc=/home/oracle/eventhandlers
              metadata_file=/metadata/roleuser/custom/EventHandlers.xml
    /home/oracle/eventhandlers/import/metadata/roleuser/custom/EventHandlers.xml
    <?xml version='1.0' encoding='utf-8'?>
    <eventhandlers
    xmlns="http://www.oracle.com/schema/oim/platform/kernel"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <action-handler
    class="oracle.iam.PostInsertPlugin"
    entity-type="RoleUser"
    operation="CREATE"
    name="PostInsertPlugin"
    stage="postprocess"
    order="1002"
    sync="TRUE"/>
    </eventhandlers>
    There are no errors in the OIM out and diagnostic logs apart from the following which occur at OIM startup:
    [2013-01-07T16:29:23.425+00:00] [oim_server1] [ERROR] [IAM-0080075] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: 2e903d7ef060ab65:66b2de91:13c15d6d9ce:-8000-0000000000000002,0] [APP: oim#11.1.1.3.0] XML schema validation failed for XML /metadata/iam-features-OIMMigration/EventHandlers.xml and it will not be loaded by kernel.
    [2013-01-07T16:29:24.267+00:00] [oim_server1] [ERROR] [IAM-0080075] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: 2e903d7ef060ab65:66b2de91:13c15d6d9ce:-8000-0000000000000002,0] [APP: oim#11.1.1.3.0] XML schema validation failed for XML /metadata/iam-features-callbacks/event_configuration/EventHandlers.xml and it will not be loaded by kernel.
    Thanks
    dty
    Edited by: oim_user on Jan 7, 2013 5:37 PM

    No notification will be sent if you changepassword using the method from usermanager api.
    You have to trigger the resetpassword event manullay in your code.
    Here is a sample code to create an event for reset password. Once you create event, invoke it from notification service - notify method.
    NotificationEvent event = new NotificationEvent();
    String[] receiverUserIds= {userLogin};
    event.setUserIds(receiverUserIds);
    event.setTemplateName("ResetPasswordNotification");
    event.setSender(null);
    HashMap<String, Object> resolvedData = new HashMap<String, Object>();
    resolvedData.put("userLoginId", userLogin);
    event.setParams(resolvedData);

  • Event handling in javascript

    I have a jsp page which should display a javascript message prompting the user to save the changes made on a page when he clicks on a link to another view, but only if he has changed the values in any fields in the current page. So I need to capture onChange events for any element in the form.
    Can an onChange event be handled at the window or document level?

    Thanks for the responses. I managed to find the javascript solution to my problem. The following function storeChange() is called when the page is loaded.
    var isDirty = false;
    function storeChange() {
      if(navigator.appName.indexOf("Microsoft Internet Explorer") != -1){
        for (i=0; i < document.form1.elements.length ; i++) {
          document.form1.elements.attachEvent("onchange",setDirtyFlag);
    else if(navigator.appName.indexOf("Netscape") != -1) {
    document.captureEvents(Event.CHANGE);
    document.onchange=setDirtyFlag;
    function setDirtyFlag() {
    isDirty = true;
    So any form element's onChange event triggers the setDirtyFlag() method. On submit of the page, i check this flag to determine if any values were modified. I have tested this code with IE6.0 and NS4.7.

Maybe you are looking for

  • E-Recruiting : Creation of NA for newly hired P

    Dear experts, We are implementing succession planning using eRecruiting 600. The implementation is done in an integrated scenario where eRec600 is on the same server as ERP 603. I know that every object P should have a relation with CP,BP & NA before

  • Camera raw not working on photoshop elements 8

    I have tried installing camera raw 6.2 for photoshop elements 8 so I can open RAW image files, I have done exactly as the instructions said and I still encounter the error of "cannot open ___ because it is the wrong type of file"

  • Another Safari display problem - not the same as others

    Hello, Has anyone seen this happen and know what is going on? This affects both Safari and Explorer but doesn't affect Camino or other browsers. Thanks. Powerbook G4   Mac OS X (10.4.4)  

  • I forgot the passcode lock on my iPhone 4gs....Help?!?!

    hadnt used my phone due to an extended vacation and forgot the passcode lock.... tried several times and it has disabled the phone and advised me to connect to itunes... i did but dont know where to go from here.... help

  • Need Help moving a LOT of data to TC 1 TB

    I have tried using the direct ethernet connection and wireless connection. But I can't seem to get speeds above 6-7 MB/S. At this rate - it says I will be done in 2 days. Is there a faster way to accomplish this? Could it be possible that I have a ba