Expand my Community achievements bar.

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

SAP and Adobe Form - Scripting Issues

Avatar

Level 1

Hello experts,

before i start with the the issue, I would like to describe some functions which we have developed in our adobe form (not interactive Form!).

  1. We are displaying XHTML Text coming from SAP , in order to load the XTHML into the controls we are calling the following line of code during the initialize event:

    1. this.value.exData.loadXML(this.rawValue); 
  2. We are printing a table which contains 3 position types (SAP DATA)
    • Product items
    • Groups
    • Texts/Pictures (XHTML/Binary Data)

        On each new page a header line shall be printed if the type is product item. This codding is placed inside the layout:ready event:

  1. data.BODY.HIERARCHY.GS_HIER.DATA.ALTERNATIVE_NODE_TYPE.NODETYPE::ready:layout - (JavaScript, both) 
  2. var vPage = xfa.layout.page(this); 
  3. Script.setHeaderline(vPage, this.rawValue, this.parent.FLAG_HEADER_LINE.rawValue); 
  4. data.BODY.HIERARCHY.GS_HIER.HEADER::ready:layout - (JavaScript, both) 
  5. var vPage =  xfa.layout.page(this); 
  6. Script.getHeaderline(vPage); 
  7. if (Script.gHeader == "X") { 
  8.   this.presence = "visible"
  9. else
  10.   this.presence = "hidden"


SCRIPT SECTION: --> 

  1. var gHeader = "Y"
  2. var level_hier = 5
  3. var new_page; 
  4. var gPage = 1
  5. arrHeader = new Array(); 
  6. function setPage(in_page) { 
  7.   gPage = in_page; 
  8. function getPage(out_page) { 
  9.   out_page = gPage; 
  10.   return out_page; 
  11. function setHeaderline(in_page, in_nodetype, in_flag_header_line) { 
  12.   if (in_page != gPage) { 
  13.        if (in_nodetype == "1" && in_flag_header_line != "X") { 
  14.             arrHeader[in_page] = "X"
  15.        } 
  16.   else
  17.        arrHeader[in_page] = "N"
  18.   } } 
  19.   gPage = in_page; 
  20. function getHeaderline(in_page) { 
  21.   gHeader = arrHeader[in_page]; 

The first functionality was working always pretty good. For making the second functionality available we started calling the Adobe Forms using the Parameter DYNAMIC = 'X'. Unfortunaltey the first functionality is then not working anymore correctly. We have tried to change javascript processing to server side/client side and both, but in the mode DYNAMIC = 'X' it does not have any influence, all javascript is performed at the client and at runtime. The result is that some pdf reader can not see the XTHML texts and we are expierencing some other problems with pictures.

We need to have both functionalities working at the same time for all readers. I guess this is only possible if the javascript is processed at the server side and the ADS returns a finished/static PDF document.

Does anyone has an idea how to solve this issue ?

Thanks a lot,

 

Wladimir

0 Replies