Skip to Content
Former Member
Apr 01, 2014 at 02:20 PM

Dynamic Adobe Forms - Strange JavaScript Issues


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

var vPage =;
Script.setHeaderline(vPage, this.rawValue, this.parent.FLAG_HEADER_LINE.rawValue);

data.BODY.HIERARCHY.GS_HIER.HEADER::ready:layout - (JavaScript, both)
var vPage =;

if (Script.gHeader == "X") {
  this.presence = "visible";
else {
  this.presence = "hidden";
var gHeader = "Y";
var level_hier = 5;
var new_page;
var gPage = 1;
arrHeader = new Array();

function setPage(in_page) {
  gPage = in_page;

function getPage(out_page) {
  out_page = gPage;
  return out_page;

function setHeaderline(in_page, in_nodetype, in_flag_header_line) {
  if (in_page != gPage) {
       if (in_nodetype == "1" && in_flag_header_line != "X") {
            arrHeader[in_page] = "X";
  else {
       arrHeader[in_page] = "N";
  } }
  gPage = in_page;

function getHeaderline(in_page) {
  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,