Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

When Saving reader extended pdf, instances are added.

Avatar

Level 2

I have a form that looks and works as expected in Adobe until I save it as a Reader Extended PDF. Once I do that the form adds instances to the subform above and beyond the defaults I have set.

The form has a repeating subform with repeating rows. The default amount of subforms is 9 and default rows is 2 for each subform. However once I save it as a Reader Extended PDF the first subform defaults to 18 rows. The subsequent 8 subforms are correctly displaying 2 rows.

Any ideas.

I can send the form if possible...

17 Replies

Avatar

Level 10

Do you create instances of those rows in your docReady, formReady or layoutReady event in the form

If yes, well you recreate those instances each time you open the form if you didn't put any restriction for adding the instances

Avatar

Level 2

Robert,

Thanks for your insight. The user can add or delete a table (subform) with a click of an add or delete button. Additionally they can add or delete rows within these tables (subform) by buttons as well.

The code is initiated upon a button click. The AddRow button code written in Javascript is:

 

this.resolveNode('PortionTable._PortionRow').addInstance(this.parent.index);

if  (xfa.host.version < 8)  {

     xfa.form.recalculate(1);

}

Thanks, Rich

Avatar

Level 10

Well there has to be some code you have somewhere else...

if you have 9 default rows, do you set the minimum row to 9 in the properties or you add the instances yourself...

Because it seems like you add 9 instances each time you open the form...

If you open the form for the first time, then save it, close it, reopen, save again, close it and reopen, do you have 27 rows?

Avatar

Level 2

When I use the form, before saving as Reader Extended it works as designed. I have 9 tables, each with 2 rows. The minimum rows is 1 and the default is 2, with no maximum.

Once I save it as a Reader Extended file as reopen the form, the first table does not default to 2 rows, but rather 18 rows. All subsequent tables are defaulted to 2 rows as expected.

What is odd is that if I restrain the amount of rows in each table to a maximum of 10, then save and Enable Reader Extended, the first table will have 10 rows, the second will have 8, and the rest will default to 2. The first 2 tables have rows that add up to 18...

Avatar

Level 10

I would probably need to see your PDF to figure this out...

Avatar

Level 2

Here is a link to the orginal form (works properly), and the Reader Enabled version (incorrectly adds 18 rows to first table).

https://www.dropbox.com/sh/pyxixpzzbmk4tep/5e21LvkihW

Avatar

Level 10

The webpage is not available

Avatar

Level 2

ANy ideas on how to upload the file. The link seems to work for me... Thanks again.

Avatar

Level 10

You have an gmail account? Use google drive and put ur file accessible to people who have access to the link

Avatar

Level 10

you must set it as a pdf... its a document right now... I can't download it

Avatar

Level 2

Robert, I returned to an older working version and then built it back up to the current verison and the issue did not appear. I am not sure exactly what was causing the issue however I wanted to thank you for all of your help.

Rich

Avatar

Level 6

Rich - I'm having the same EXACT issue as you and was skeptical that I'd find someone in the same boat. The issue isn't present until after making the form Reader enabled. Prior to adding the reader extension the subform count is fine. However, as soon as the file is made Reader enabled, one of the subform mysteriously gets an additional instance added.

I have two Subforms (Subform A & B) that contain repeating subforms within them (miscGroup). By default, each repeating subform (miscGroup) has an initial value of 3 using the properties. Additional instances are added via an “Add” button. Before I make the form Reader Enabled both Subforms A & B contain 3 instances of repeating subform (miscGroup). However, after I save the file as Reader Enabled Subform A shows 4 instances of ‘miscGroup’, whereas Subform B has 3 (as desired). Both SubForm A & B are set side-by-side in a Western flow.

This is driving me nuts. Not sure if it’s a bug but I guess I'll have to do what you did...start from and older version and build it back up to current to see if the problem gets resolved.

In either case, this can't be a coincidence that two people are experiencing the same issue.  Must be some sort of bug!

Avatar

Level 10

Right!!! I forgot to mention that... it happened to me sometimes...

The way to debug this error could be really long...

Step 1: Save you PDF as... another name

Step2: Open this new save file

Step 3: Delete objects per objects in your hierarchy without deleting what is affected until the problem is fixed

Step 4: The last object you have deleted might be the problem... Change it's name or delete it and recreate the object

The problem why it happens it's because your form is a little complex, with a lot of similar names even if the objects are in a totally different path in the hierarchy. When Adobe Reader open your PDF form, it mix two different objects together and one of them is modified according to the other one.

The 4 steps above helped me resolve my issue. Hope it works for you guys.

Avatar

Level 6

Thanks for the feedback Robert.

I'm going to try renaming the subforms and see if that works. Right now the parent SubForms have different names (A & B - for example), but the nested repeating subforms are the same in each parent (miscGroup). I'll start there first and see what happens. If that doesn't work, I'll delete a couple objects to try to detect the cause.  I may even start over with a new file and copy objects over little by little to see if that works.  In either case, I agree it could be a lengthy debugging exercise for something so small. The issue is having to go back and re-add the exentension each time to test.

Avatar

Level 10

Even if I cannot download the sample forms from the links above I'm pretty sure the issue is caused by activation of the checkbox "Repeat row for each data item" for row where it's not neccssary.

I saw this several times of forms where nested tables or subforms were used.

An example: A table with a repeatable row that contains a table with a repeatable row.

The bad solution:

Table (repeat)

     Header (repeat)

     Row (repeat)

          NestedTable (repeat)

               Header (repeat)

               Row (repeat)

The better solution:

Table (do not repeat)

     Header (do not repeat)

     Row (repeat / do not repeat)

          NestedTable (do not repeat)

               Header (do not repeat)

               Row (repeat)

Avatar

Level 6

I've spent HOURS+++ trying to find a solution a similar problem only to discover that the "field names" within a repeating subform must be unique (not just the subform itself). Case in point, when I had a subform containing 3 fields: TextField1[0], TextField1[1], TextField1[2], I ran into an issue where a new instance of the subform was created each time the form was opened and saved. VERY AGGRAVATING! However, by changing the names of each field within the subform, the issue was resolved!

NOTE: Considering, I needed to use that same subform in my form again, I made sure to give the subform #2 a unique name, as well as the fields within the subform. Doing so allowed me to keep the data binding of the subform set at 'Use name (...)'

I hope this info helps someone else in the near future.