PDDocPageLabelDidChange callback is triggered multiple times

Hello,
I'm working on a C++ plugin running in Acrobat 8.1.x - we register for the PDDocPageLabelDidChange callback, but whenever a labeling operation is performed (Using the Number Pages... contextual menu), the callback is triggered many times with the same parameters (to/from). Our handler performs a somewhat expensive operation, so we'd like to keep the number of iterations to a minimum, but the fact that we get what appear to be redundant callbacks, the time to process a page labeling operation becomes longer than we'd like.
Does anybody have an explanation as to why I might see repeated callbacks with the same to/from parameters in PDDocPageLabelDidChange?
Thanks for any guidance.

There could be many reasons.  Does the problem still exist in Acrobat 9?
If the values are indeed equal - then I would just check them against "the last passed values" and don't process again.

Similar Messages

  • Photoshop CC 2014 Extension - CEP Event callback is triggered multiple times per single event

    Trying to make my extensions listen for bunch of events and it's turning out to be a real pain in the ***.
    I'm hoping there's someone here who has a bit more experience playing around with these.
    I used the example code from here ( Page 43 ): http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/creativesuite/pdfs/CC14_Extension_S DK.pdf
    I've modified the code just a little. I removed some unnecessary things from it. I also added a counter, to try to visualize the issue.
    Every time I pasted the code here, the global variable seemed to duplicate. So, eeeeh...  the example code can be found here.
    The problem is:
    I close one document to trigger the event, but for some reason the callback seems to run multiple times.
    Even better, it doesn't seem to be super consistent about it. Sometimes it repeats only couple of times and sometimes it repeats 160 times.
    It seems like every time the extension panel is reopened, it comes up with a new number.
    Currently, if I close a document, it seems to trigger the callback 15 times
    Since this is screenshot, you'll have to take my word for it. I only closed a single document and the code ran 15 times.
    Am I doing something wrong by any chance?
    edit:
    I believe I just found out the reason and a way to recreate the issue.
    I've occasionally tested the extension by closing and opening the panel, which seems to have caused the issue.
    It looks like every time I close and then open the panel, it... adds one more run time to the stack.
    - Refreshing the panel from chrome doesn't seem to affect it.
    When I restart photoshop, it resets. So after the very first opening of the panel, the event triggers the callback only once.
    I forgot to mention that the host application events work just fine without these issues.
    In fact, I tried to use documentAfterActivate before, but as far as I could find, there is no way to kind of filter out specific events within host application events.
    For instance, I can't specify something different to happen when a new document is opened.
    As very much a side note:
    documentAfterActivate has its own side effect due to the way photoshop works.
    It is triggered when you:
    Create a new document
    Open a new document
    Switch to an open document
    It's the "Switch to an open document" part that makes this event listener also trigger when you close a document.
    Because when you close a document, photoshop switches back to the previous document and that in turn triggers the event listener when it shouldn't, I suppose.
    Of course it doesn't trigger the event when you close the last document as there is no document to switch to at that point.
    ...but this is beyond the scope of the original question.

    I was so tired last night that when I found out the cause of it, I never even thought about unregistering...
    I decided to unregister it when the panel is opened instead.
    This does indeed get rid of the issue.
    Thanks, cbuliarca.
    (function () {
      var csInterface = new CSInterface();
      function init() {
           themeManager.init();
           function registerPhotoshopEvent(in_eventId, register) {
                // Added the next line
                var register = register === "clear" ? "UnRegisterEvent" : "RegisterEvent";
                // Modified the next line
                var event = new CSEvent("com.adobe.Photoshop" + register, "APPLICATION");
                event.extensionId = csInterface.getExtensionID();
                event.appId = csInterface.getApplicationID();
                event.data = in_eventId
                csInterface.dispatchEvent(event);
           var number = 0;
           csInterface.addEventListener("PhotoshopCallback" , function(event) {
                number = number + 1;
                console.log( number );
           var closeEventid = "1131180832"
           // Added the next line
           registerPhotoshopEvent(closeEventid, "clear");
           registerPhotoshopEvent(closeEventid);
      init();

  • Why LOOP AT XVBAP is triggering multiple times in user-exit in 1 item order

    Hi,
    Just curious,
    I put the break point at LOOP AT XVBAP in user-exit of MV45A include of sales order transaction, then I created a sales order with ONLY one item(10) of 1 quantity (meaning, ONLY one schedule line)....then, Why my break-point(LOOP AT XVBAP) is triggering multiple times? even though there is ONLY one item/1 quantity? is supposed to trigger only 1 time(one iteration) right?
    why mupltiple iterations are happening?
    thank you

    Hello ,
    yeah thats true , that exit programs will called several types  by SAP itself , so u need to find right FORM exits for ur requirements.
    regards
    Prabhu

  • Process Chain Triggers Multiple times

    Hi All,
    I have Meta process chain say ZAAA  which has multiple Local Chains example ZBBB , ZCCC and ZDDD. .This Local chain ZCCC trigger multiple times of  in one day . we had a issues today  with deactivation of Transformations and DTP in different levels because of that Local Process chain ZCCC is failed along with other process chains . when I reach to ZCCC started by repeat or repair ,before Local Chain ZCCC finished whole process ,ZCCC triggers second time .
    Now first times  triggered process chain ZCCC is in  yellow , and second time triggered process chain ZCCC gone through all the way to gree ,  and Meta chain showes red.
    what I have do make Meta chain green.
    Regards
    Hari

    Hi Hari,
    I wonder what you mean by below statement:
    one of the sub pc still yellow first time trigger and went to red and second time trigger whole process is green. all Sub PC are green
    For the sub pc mentioned above, you trigger it all over again? Or you repeat/repair the step failed?
    If you trigger it the second times all over again it is a new run and the first run remain fail,ed so the meta chain will never get green, if you want to make the meta chain green, you need to repeat/repair the step failed in first run.
    Regards
    Bill

  • IPhone : webViewDidFinishLoad being triggered multiple times

    In my app I have a web viewer and in my code I do a 'loadRequest' to populate it. I'm trying to determine when the page finishes loading using the 'webViewDidFinishLoad' delegate. For most pages like yahoo, or google, the delegate is only called once when the load is finished. For abcnew.com, the delegate gets triggered 3 times. I do a NSLog() every time my delegate code is entered, so I'm just counting my log entries from the console window.
    I'm wondering why 'webViewDidFinishLoad' is getting called 3 times for abcnews.com but only once for most other sites I try.
    Thanks,
    Tony

    It probably does. I was just trying different pages to see what would happen. That is when I noticed abc.com triggers the delegate three times, yet google.com and yahoo.com only once. I guess I'll have to do some more research to better understand what webViewDidFinishLoad is really doing.

  • Output type triggering multiple times.

    Hello All,
    I have a PO output type configured with multiple issuing setup and it shoots mail to my inbox with PO details.
    My concern is: I could see the output type triggered only 2 times,but i have received more than 5 mails in my Inbox.
    How is this happening? I checked with the spool history n all. i couldn't find any loop holes.
    Do anyone have any suggestions of where can i check further.
    Thanks
    Dhilipan

    Hi,
    Goto SOST - Transmission Request to see how many times message has been triggered. Hope it will give u some idea.
    Regards,
    Ram

  • EEM - same event is triggered multiple times in a short period

    I have a applet that will monitor the routing flapping..
    event manager applet route-flag
    event routing network 10.1.2.0/24 type modify
    action .....
    I like to have a hold down timer feature of this EEM appet. Let's say the event is triggered immediately when there is one change to the 10.1.2.0/24 network, but do not trigger it again if there is another change to within 60 sec. So what I want is the action will only run once no matter how many changes within 60sec.
    How can I achive this?
    Thanks in advance.

    There isn't a native feature to do this.  You could do something using multiple applets like:
    event manager environment q "
    event manager applet route-flag
    event routing network 10.1.2.0/24 type modify
    action 010 cli command "enable"
    action 011 cli command "config t"
    action 012 cli command "event manager applet route-flag"
    action 013 cli command "event none"
    action 014 cli command "event manager applet reenable-route-flag"
    action 015 cli command "event timer countdown time 60"
    action 016 cli command "action 1.0 cli command enable"
    action 017 cli command "action 2.0 cli command $q config t$q"
    action 018 cli command "action 3.0 cli command $q event manager applet route-flag$q"
    action 019 cli command "action 4.0 cli command $q event routing network 10.1.2.0/24 type modify$q"
    action 020 cli command "action 5.0 cli command $q no event manager applet reenable-route-flag$q"
    action 021 cli command "end"

  • PCIe-6321 & ConfigureChangeDetection C# - Need to "debounce" the detection - event triggered multiple times

    I am working on a C# NIDAQmx application for a hardware configuration that uses a PCIe-6321 to interface with downstream hardware.  There is a DI signal from a manual switch on the downstream hardware that I must monitor for the start/stop signal for my application's data acquisition operations.
    I was having inconsistent results using the ConfigureChangeDetection NIDAQmx functionality.  So I used the ReadDigChan_ChangeDetection sample and using Debug.WriteLine statements have verified that when the switch on the hardware is toggled, multiple ChangeDetected events are thrown before the signal settles into the actual High or Low state.
    Since I am not a hardware guru, I consulted another engineer, and was told that this is common with switches, and the signal and/or change detection needs to be "debounced". 
    Can this be done purely through additional configuration of the NIDAQmx DI task?  I saw properties for digital filtering, but don't understand their use.  I looked at the ReadDigChan_ChangeDetection_DigFilter sample, but it seems to imply that some other DI needs to be connected on the card to be used as the filter, which I don't have.  Only one DI is coming from the downstream hardware.
    Any help and/or advice will be greatly appreciated.

    I believe I have found the solution.  By searching the forums I came across a couple of posts that pointed to this article
    http://digital.ni.com/public.nsf/allkb/220083B08217CFD686257131007E5D2C?OpenDocument
    So i started playing with the corresponding properties in the C# task, and it looks like I may have to only set the following properties:
                    myTask.DIChannels[0].DigitalFilterEnable = true;
                    myTask.DIChannels[0].DigitalFilterMinimumPulseWidth = 10.240000e-6;
    According to error messages, the DigitalFilterMinimumPulseWidth for the PCIe-6321 can only be set to specific values.
    Using this in the ReadDidChan_ChangeDetection_Events sample appears to be successfully debouncing the ChangeDetection events to only 1 per physical switch toggle.
    If this is not the approach I should be using, please advise otherwise.

  • How to call BADI Triggering Multiple Times

    Hi ,
        I got one requirement of Duplicate check for that i implemeted one BADI  in that i called Duplicat check function Module also so when i entered first, last and email id it is giving the message as Data is saved. when i entered the same data is entered it gives the message as Account is Duplicate and it wont save at that time when i modified the data then it wants to save that means it wants to call the duplicate check badi once again but thing is it wont save again it is giving the message as duplicate so for each change the badi wants to trigger agin and again but it wont so how can i do this one pls tell me which badi is suitable
    Regards
    Ravi

    I think you can do it by using the same BADI. you can just create a static data to keep the first, last and email id. If the first, last and email id are the same skip the duplication check.
    for examples:
      Method badi.........
        STATICS static_name TYPE name VALUE 10.
        IF static_name is initial.
          static_name = im_name.
          perform duplicate_check.....
        ELSE.
          if static_name ne im_name.
            perform duplicate_check.....
          endif.
        ENDIF.
      Endmethod
    Cheers,
    Chaiphon

  • Action Listener Method called multiple times

    I have a page (fragment .jsff), containing a simple input text and a button called "search". When I click on "Search" the action listener is triggered multiple times. (The results are displayed in a table inside a panel collection).
    The results are actually coming back ok.
    When I debug the code, I can see the action listener method called twice.
    Do you know why is that?
    What should I be taking care of?
    This is my code :
    *** Fragment ****
    <af:commandButton text="#{identityBundle.search_label}" id="cb1"
    actionListener="#{UserDetailsBean.searchUsersListener}"
    disabled="#{!bindings.searchUsers.enabled}"/>
    *** Managed bean ***
    public void searchUsersListener(ActionEvent actionEvent) {
    // Add event code here...
    DCBindingContainer bindings = (DCBindingContainer)getBindings();
    DCIteratorBinding iter = bindings.findIteratorBinding("userIterator");
    DCDataRow row = (DCDataRow)iter.getCurrentRow();
    User user = (User)row.getDataProvider();
    boolean isSearchCriteriaPresent = false;
    if(user != null){
    String fn = user.getFirstname();
    if(fn != null && !fn.trim().equals("")){
    isSearchCriteriaPresent = true;
    user.setLastname(fn);
    user.setNonMTUserLogin(fn);
    try {
    Map <Object, Object> userMap = PropertyUtils.describe(user);
    for(Map.Entry<Object, Object> entry: userMap.entrySet()){
    if(entry.getKey() != null && entry.getValue() != null && !entry.getKey().toString().equalsIgnoreCase("class")){
    isSearchCriteriaPresent = true;
    break;
    } catch (IllegalAccessException e) {
    e.printStackTrace();
    } catch (InvocationTargetException e) {
    e.printStackTrace();
    } catch (NoSuchMethodException e) {
    e.printStackTrace();
    if(!isSearchCriteriaPresent){
    user.setFirstname("*");
    OperationBinding opBinding = (OperationBinding)bindings.getOperationBinding("searchUsers");
    opBinding.getParamsMap().put("user", user);
    opBinding.execute();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
    scopePageFlowScopeVar.put("userSearchCriteria", user);
    ADFContext adfCtx = ADFContext.getCurrent();
    Map sessionScope = adfCtx.getSessionScope();
    sessionScope.put("userSearchCriteria", user);
    setUserSearchCriteria(user);
    if(selectedUserID != null){
    selectedUserID.setValue(null);
    RichTable table = getUserResultsTable();
    DCIteratorBinding searchUsersIterator = (DCIteratorBinding)bindings.get("searchUsersIterator");
    Row[] rows = searchUsersIterator.getAllRowsInRange();
    if(rows.length > 0){
    RowKeySetImpl rks = new RowKeySetImpl();
    ArrayList keyList = new ArrayList();
    keyList.add(rows[0].getKey());
    rks.add(keyList);
    table.setSelectedRowKeys(rks);
    table.setDisplayRowKey(keyList);
    refreshState(table);
    if(!isSearchCriteriaPresent){
    user.setFirstname(null);
    else{
    deleteUserButton.setDisabled(true);
    resetPasswordButton.setDisabled(true);
    enableUserButton.setDisabled(true);
    disableUserButton.setDisabled(true);
    Thanks in advance for your help

    Hi,
    Can you try this?
    1. set partialSubmit=true for the "search" button
    2. set "search" button id as partialTrigger in your result table
    -Prasad

  • Need to identify user exit triggering first time

    Hi Friends,
                     i have written an include inside MV45AFZZ(We have access key for this standard prog). inside include i have written some code. Here my problem is, While running VA01 T.Code it is triggering multiple times, when ever a user enter values and hit the enter.
                       my code needs to get triggered once. How can i check this condition.
    Thanks,
    Sekhar.J

    Hi,
    create a statics variable and check that..
    ex..
    STATICS: V_FOUND.
    if v_found is initial.
    ***Execute your code here..
    Set the variable V_FOUND = 'X', so that it does not get triggered again.
    V_FOUND = 'X'.
    endif.
    Thanks
    naren

  • Email being sent multiple times when actions are triggered after creating an incident. Anyone has a resolution?

    Email being sent multiple times (3 times) when actions are triggered after creating an incident.
    Below is the snip of "Scheduled Actions" of the created Incident.

    Hi Ritesh
    Email is triggered based upon conditions and you set
    on closer look it is 3 different email on three 3 different requirement for e.g
    email triggered to reporter on new status
    email trigerred to processor on Proposed solution and New status
    Therefore, check the start condition for above 2 email actions and refer below blog
    Sending E-Mail from Support Message
    Thanks
    Prakhar

  • Element showing Multiple times in SOE.

    Hi,
    I have added one element called 'Basic' one time only in element Entries. But it is showing 2 times in SOE report and Run Results also.
    How to remove that. Pl. help.
    Thanks in advance.

    The Element was processed multiple times in the Payroll run and hence you can see the element twice in the Run Results. The possible reasons could be
    1. Element was prorated.
    How to check : Check whether the Start Date and End Date were populated in the run results screen for the two entries of the element.
    2. Multiple Element entries were created for the Element which is ruled out as you confirmed that there are no multiple element entries.
    3. Run results were triggered due to Indirect Results.
    you need to fire some queries to find out this.
    select * from pay_element_entries where element_entry_id in (select source_id from pay_run_results where run_result_id in (<id1>,<id2>) )
    where id1 and id2 are run_result_ids of the two run result entries for the element.
    Performing above checks should give you the reasons.
    Regards,
    Sharath

  • Using multiple timer in the same SessionBean

    Hello,
    Is it possible to use multiple timer in the same Stateless Session Bean. In my application a user can schedule some task to execute. To do so I was thinking of creating a Session Bean which would create calendar timer on user request and, when one of the timer expires, retrieve the task to execute thanks to the information stored in the timer.
    When I tried the solution explained above, it seems that the @timeout method is synchronized on 1 timer. For example if I create a timer that will be executed every 10 seconds and another one executed every 30 seconds, the timeout callback is called every 30 seconds but 4 times.
    My code looks like that :
    @Stateless
    @LocalBean
    public class TimeManager {
        public void onUserRequest(ScheduleExpression expression) {
            Timer timer = timerService.createCalendarTimer(expression, timerCfg);
        @Timeout
        void timeout(Timer timer) {
            logger.log(Level.INFO, (String) timer.getInfo());
    }Is there a way to do what I want?
    Thank you

    This doesn't make any sense to me. If i were to write a bunch of schemas for a particular applicaion, would
    I have them all in the same namespace? You would normally have one schema that describes the information model associated with the one namespace that the different documents in your application use.
    If so, why can't I load more than one in the same name space?The parser chooses the schema based on the namespace alone. There is no other information used to decide which schema to use, so you can only have one schema for the namespace.
    They all have different root elements.You can have different root elements in the one schema.
    I don't even need the namespaces, but I can't
    figure out how to get rid of them (the schema isn't valid with out them according to XML Spy). You can set the schema explicitily before parsing, but not (AFAIK) set after parsing has begun, except by using the mapping of namespace to schema location.
    I have also tried to use the external-noNameSpaceSchemaLocationproperty, but it doesn't seem like you can pass in an array of schemas to that one. It only expects a
    String as the Object you pass in to setProperty. Yes, you can only validate a document against the one schema.
    So, how can I load all my schemas so I don't have to reference them in the XML documents? Either combine your schemas so you have one schema for your namespace that validates elements which are defined in that namespace (the formal/correct way of doing it), or construct a filter that inserts a PI to point to the schema once the root element is opened (the pragmatic/bit of a hack way of doing it).
    Pete

  • FM RV_INVOICE_DOCUMENT_READ not getting KONV details when ran multiple times

    Hi, I'm calling the Function Module 'RV_INVOICE_DOCUMENT_READ' with the parameter KONV_READ as 'X' thru one of the Output type via Smartform driver program from VF02. I found that this FM was not returning KONV(XKOMV) details. When I debugged, I came to know that when this FM is run multiple times, only for the initial time it fetches KONV details. This FM was triggered by standard program first and later was called in my Smartform Driver program. Inside this FM, it was checking against an internal table 'TABGL' and was fetching KONV details if it is initial. For the first time this internal table(TABGL) will be initial and after fetching KONV details, it is filled with Condition record(KONV-KNUMV). So for the second time call of this FM, KONV details are not fetched. To confirm this I ran this FM from SE37. For the first time it fetched KONV details. In the same session I executed again. This time it didn't populate KONV details, whereas VBRK, VBRP, VBPA details were fetched even in the second run. Could you please let me know if we can use this FM for getting KONV details irrespective of number of times it has been called before. Thanks, Adithya M.

    Try to call RV_INVOICE_REFRESH before calling RV_INVOICE_DOCUMENT_READ again.
    Regards,
    Raymond

Maybe you are looking for