21 Replies Latest reply on Feb 19, 2016 7:26 AM by lev.savranskiy

    Weird bug  with DC template spawning

    lev.savranskiy Level 1

      Hi all!

       

      Here is Weird bug  with DC template spawning i am struggling to solve.

      I do my development in Adobe Pro XI.

      Recently i got complaints from users saying  template spawning would not work in Adobe DC.

      I installed Adobe DC reader and found this weird bug

      I created simple PDF to illustrate it.

       

      1. PDF has hidden template named "RawDataPage"
      2. PDF has 6 pages initially
      3. First page contains 4 buttons.
      4. Button 1  adds 1 template  after page 6, Button 2  adds 2 templates  after page 6 and so on
      5. Close PDF without saving after button click, just observe spawning
      6. You can find PDF files and screenshots at dropbox link https://www.dropbox.com/sh/qap5j5tzyomrlxw/AABGFv6Z0jGKE62SO6pgy2YSa?dl=0
      7. I am going to update shared  folder upon information arrival
      8. find all js code below inline

       

      
      
      
      
      
      
      
      
      
      
      //<AcroForm>
      //<ACRO_source>ButtonApply1:Annot1:MouseUp:Action1</ACRO_source>
      //<ACRO_script>
      /*********** belongs to: AcroForm:ButtonApply1:Annot1:MouseUp:Action1 ***********/
           getTemplate("RawDataPage").spawn(6, false, false);
      
      
      //</ACRO_script>
      //</AcroForm>
      
      
      //<AcroForm>
      //<ACRO_source>ButtonApply2:Annot1:MouseUp:Action1</ACRO_source>
      //<ACRO_script>
      /*********** belongs to: AcroForm:ButtonApply2:Annot1:MouseUp:Action1 ***********/
           getTemplate("RawDataPage").spawn(6, false, false);
           getTemplate("RawDataPage").spawn(6, false, false);
      
      
      //</ACRO_script>
      //</AcroForm>
      
      
      //<AcroForm>
      //<ACRO_source>ButtonApply3:Annot1:MouseUp:Action1</ACRO_source>
      //<ACRO_script>
      /*********** belongs to: AcroForm:ButtonApply3:Annot1:MouseUp:Action1 ***********/
           getTemplate("RawDataPage").spawn(6, false, false);
           getTemplate("RawDataPage").spawn(6, false, false);
           getTemplate("RawDataPage").spawn(6, false, false);
      //</ACRO_script>
      //</AcroForm>
      
      
      //<AcroForm>
      //<ACRO_source>ButtonApply4:Annot1:MouseUp:Action1</ACRO_source>
      //<ACRO_script>
      /*********** belongs to: AcroForm:ButtonApply4:Annot1:MouseUp:Action1 ***********/
           getTemplate("RawDataPage").spawn(6, false, false);
           getTemplate("RawDataPage").spawn(6, false, false);
           getTemplate("RawDataPage").spawn(6, false, false);
           getTemplate("RawDataPage").spawn(6, false, false);
      //</ACRO_script>
      //</AcroForm>
      
      
      
      
      
      
      
      
      

       

      I expect code to be working in the same way both in Adobe XI and DC

      See versions below

      VERSION XI - 11.0.13VERSION DC 15.010.20056
      proXI-version.jpgreaderDC-version.jpg

       

       

       

      Now compare results


      Button 1 ->ADDED 1  OK in both Acrobates

       


      Button 2 ->ADDED 2  OK in both Acrobates

       


      ADOBE PRO XIADOBE READER DC
      Button3 - > ADDED 3 - OKButton3->ADDED 3 - page 8 is broken
      proXI-added3 tpl.jpgreaderDC-added3 tpl.jpg
      Button4->ADDED 4 - OKButton4->ADDED 4 - pages 8,9  BROKEN
      proXI-added4 tpl.jpgreaderDC-added4 tpl.jpg

       

       

       

      MORE WEIRD STUFF

      1. SAVE PDF WITH  ADDED 4 PAGES FROM READER
      2. OPEN IN ADOBE XI
      3. SCROLL TO PAGE 7
      4. Error reading (14)
      5. Zoom jumps to 5983%

        TEMPLATE_SPAWN_DC_ISSUE_SAVED _FROM_READER_OPEN_IN_PRO.jpg