Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

After saving and then reopening a dynamic livecycle PDF extra pages are added.

Avatar

Former Community Member

The livecyle dynamic PDF seems to work fine.

There are five default pages and several other pages (all associated with master pages) and these other page instances can be added by the user by clicking a button.

The problem is that if a user opens the form (it has 5 pages initially) and then saves the PDF. Even if the user has not added any of the other pages, then an instance of each is added to the form.

So now there will be 12 pages (for example) when the user reopens the saved PDF.

Any ideas? Thank you.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

In our case, our PDF had an embedded schema. Each page needed to be bound to individual sections of the schema.  So we had three pages that were trying to bind to the same area of the schema and were confusing ADOBE.This was fixed by doing the following:

1. Copy the section and paste it into the schema and rename the first root element/tag to something unique.

2. In your PDF, bind to the new section elements.

3. FYI, we also found that the binding to other elements was off in some cases. We went through and, field by field, rebound ALL the items. We also wrapped fields in subforms and bound those subforms when it logically occurred.

    If you do that then all your field bindings will wind up looking like     $.ELEMENTNAME_IN_SCHEMA     . It wil look simple and clean, if you have bound and wrapped everything.

4. Finally, we also changed the minOccurs in the schema to = "0" for all elements. You may not need to do this, but it helped us.

This fixed our extra page problem. The trick is to separate everything logically into it's own section of the schema and to bind every level in a subform until you get your field to the element name.

View solution in original post

2 Replies

Avatar

Level 10

I have 2 options you can try to fix this problem.

1. Create a new PDF file and copy paste all you form into the new one. See if it works..

If it's not working you will have to debug you form manually..

2. Save your pdf with another name to debug it, Start deleting objects that have same names, or any object you think could be doing this and once you have found that object, change its name in the hierarchy form.

Then your problem should be fixed...

Avatar

Correct answer by
Former Community Member

In our case, our PDF had an embedded schema. Each page needed to be bound to individual sections of the schema.  So we had three pages that were trying to bind to the same area of the schema and were confusing ADOBE.This was fixed by doing the following:

1. Copy the section and paste it into the schema and rename the first root element/tag to something unique.

2. In your PDF, bind to the new section elements.

3. FYI, we also found that the binding to other elements was off in some cases. We went through and, field by field, rebound ALL the items. We also wrapped fields in subforms and bound those subforms when it logically occurred.

    If you do that then all your field bindings will wind up looking like     $.ELEMENTNAME_IN_SCHEMA     . It wil look simple and clean, if you have bound and wrapped everything.

4. Finally, we also changed the minOccurs in the schema to = "0" for all elements. You may not need to do this, but it helped us.

This fixed our extra page problem. The trick is to separate everything logically into it's own section of the schema and to bind every level in a subform until you get your field to the element name.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----