Weird bug with DC template spawning
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.
- PDF has hidden template named "RawDataPage"
- PDF has 6 pages initially
- First page contains 4 buttons.
- Button 1 adds 1 template after page 6, Button 2 adds 2 templates after page 6 and so on
- Close PDF without saving after button click, just observe spawning
- You can find PDF files and screenshots at dropbox link https://www.dropbox.com/sh/qap5j5tzyomrlxw/AABGFv6Z0jGKE62SO6pgy2YSa?dl=0
- I am going to update shared folder upon information arrival
- 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.13 | VERSION DC 15.010.20056 |
|---|---|
![]() | ![]() |
Now compare results
Button 1 ->ADDED 1 OK in both Acrobates
Button 2 ->ADDED 2 OK in both Acrobates
| ADOBE PRO XI | ADOBE READER DC |
|---|---|
| Button3 - > ADDED 3 - OK | Button3->ADDED 3 - page 8 is broken |
![]() | ![]() |
| Button4->ADDED 4 - OK | Button4->ADDED 4 - pages 8,9 BROKEN |
![]() | ![]() |
MORE WEIRD STUFF
- SAVE PDF WITH ADDED 4 PAGES FROM READER
- OPEN IN ADOBE XI
- SCROLL TO PAGE 7
- Error reading (14)
- Zoom jumps to 5983%






