Tag Archive adobe form

Byfjourneau

Convert standard texts to string

The method below enables to convert standard texts to string (with carriage returns). It can be useful when standard texts need to be changed or completed before being printed on Adobe forms.
(Otherwise, it is recommanded to use the standard text objet for Adobe forms).

Read More
Byfjourneau

Hide a subform according to context node value

To hide a subform using javascript according a context node value in Adobe form :


// data.MAIN.SUBFORM_TO_HIDE::ready:form - (JavaScript, client)
var fieldToCheck= xfa.resolveNode("$record.MAIN.FIELD_VALUE");
if(fieldToCheck.value == null || fieldToCheck.value == "") {
    this.presence = "hidden";
}

Byfjourneau

Print form in Duplex

Spool, SAP-Script, Smartforms

Check this post : https://wiki.scn.sap.com/wiki/display/ABAP/Print+Duplex+from+SAP

Adobe form

The duplex printing of the adobe PDF forms can be achieved by setting the parameter available on Master Page of Adobe PDF.
This option is available in Adobe Live Cycle Designer 8.0 version.
The option is in the object view of the master page.

Read More
Byfjourneau

Adobe form, count number of elements in a subform with JS

The goal here is to define of there are data into the table, if not, we hide the subform. That means, we hide the whole table (border and header line).
There are several ways to proceed, this is one :

Table from context is binded like :

  • TABLE_TEXT_HEADER_PO binded with $.TABLE_HEADER
  • LINE_TEXT_HEADER_PO binded with $.DATA[*] (repeat subform for each data item is ticked)
  • HEADER_PO_TEXT binded with $.TEXT_CONTENT
Read More
Byfjourneau

Scripting language for Adobe forms

Check this post : https://blogs.sap.com/2015/07/15/overview-on-scripting-languages-for-adobe-forms-beginners/.

Hide field if empty

Using javascript :


//data.Main.HEADER.ADRESSE_CLIENT.NAME3::initialize - (JavaScript, client)

if(this.rawValue == "" || this.rawValue == null) {
    this.presence = "hidden";
}

  • “hidden” will hide the whole element and shift lower elements up.
  • “invisible” will hide only the TEXT INSIDE the element NOT the element itself (no shifting of other elements).
Read More
Byfjourneau

Generated Adobe form as PDF (to send it by mail for instance)

✔ Change some parameteres in the form ouput parameters :


  lst_outparms-device   = 'MAIL'.   " Format for mail sending
  lst_outparms-nodialog = 'X'.      " Do not display PDF
  lst_outparms-getpdf   = 'X'.      " and get PDF source.

 
✔ Retrieve the PDF code in form ouput structure of your form function :


  /1bcdwb/formoutput = ls_formoutput

 
✔ Convert PDF code in xstring to binary :


" DATA lt_att_content_hex  TYPE solix_tab. " Table type for mail attachment.

  CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
      buffer     = ls_formoutput-pdf
*     APPEND_TO_TABLE = ' '
*   IMPORTING
*     OUTPUT_LENGTH =
    TABLES
      binary_tab = lt_att_content_hex.

 
✔ Use the table lt_att_content_hex to send the PDF by mail, check post : Send mail using BCS class