Expand my Community achievements bar.

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

Adobe Acrobat Aborts

Avatar

Former Community Member

I'm developing a form in LiveCycle, but when I try to display it as a PDF, Adobe Acrobat aborts with absolutely no information why.  The problem is somewhere in the form's Javascript, but I could use some help in finding out where the problem is.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I found the problem.

At one point in the Javascript for a textbox, I had this:

 

if (MNPD.formStream.ND_RoutingStep == 0 && MNPD.ND_FillerPrint.rawValue != "True") {

   ---- more code follows ---

If you look at the first comparison, you will see that I should have been comparing the rawValue of MNPD.formStream.ND_RoutingStep to 0, not the textbox itself.   Adobe Acrobat doesn't like it when it has to compare apples to oranges.  Javascript needs a better Intellisense.

I found the problem by eliminating fields field-by-field until I found the offending textbox, then commenting Javascript line-by-line until the offending line showed. 

View solution in original post

5 Replies

Avatar

Level 10

How do you open the PDF?

Do you use the PDF Preview of Designer or do you open the file with Acrobat?

What do you mean with abort?

Is Acrobat closed directly or is the screen blank?

Avatar

Former Community Member

I used the PDF Preview, then Adobe Acrobat. Kaboom both ways.

I get the message that program has encountered a problem and needs to close with a choice to send an error report or not.

Avatar

Level 10

Sounds like a precessing error.

Save a copy of your file and remove all scripts from it and test if the problem still occurs.

If yes, the template may be garbled and cannot be processed by the PDF Viewer.

This may force you to rebuild the form from scratch.

Avatar

Former Community Member

That is definitely NOT what I need to hear.

Avatar

Correct answer by
Former Community Member

I found the problem.

At one point in the Javascript for a textbox, I had this:

 

if (MNPD.formStream.ND_RoutingStep == 0 && MNPD.ND_FillerPrint.rawValue != "True") {

   ---- more code follows ---

If you look at the first comparison, you will see that I should have been comparing the rawValue of MNPD.formStream.ND_RoutingStep to 0, not the textbox itself.   Adobe Acrobat doesn't like it when it has to compare apples to oranges.  Javascript needs a better Intellisense.

I found the problem by eliminating fields field-by-field until I found the offending textbox, then commenting Javascript line-by-line until the offending line showed. 

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] ----