cancel
Showing results for 
Search instead for 
Did you mean: 

Does prePrint event works in SAP Adobe forms ?

0 Kudos

Hello ,

I have a requirement to hide a text field while printing in offline adobe form . I have added the below script editor

code using FormCalc language

----- data.#subform[0].TextField1::prePrint - (FormCalc, client) -----------------------------------

$.presence = "hidden"

The text field is still getting printing on the form . Does prePrint  event works in SAP Adobe forms ?

Thanks in advance .

Regards,

Kiran.

Accepted Solutions (1)

Accepted Solutions (1)

pavan_prabhu
Active Participant
0 Kudos

Hello KiranKumar,

     You should avoid using the prePrint event to hide or show the objects at run time. Refer the below link to know why.

Adobe LiveCycle ES3 * prePrint event

If you want to achieve this requirement, then write the script in Initialize event since it is an offline form. Then the issue will be resolved.

0 Kudos

Hi Prabhu ,

Thanks for the response . I can do this in Initialize event but the field will be hidden both in screen and also in print .

I need to hide the field only during print . Please let me know if you come across such a situation .

Thanks,

Kiran.

pavan_prabhu
Active Participant
0 Kudos

Hello KiranKumar,

     Use the property Invisible rather than hidden. Then the field will be visible in the layout but not in the print. Use the below statement in Initialize event.

$.presence = "invisible"

Former Member

Hi Kirankumar & Pavan

If using "invisible" then code in prePrint event is not a problem at all (as written in link provided by Pavan).

I've used event prePrint several times and it worked perfectly fine.

only remeber to set presence to "visible" in postPrint event otherwise text will not apear after printing.

Shai.

0 Kudos

Hi Prabhu,

If I add the code $.presence = "invisible" in Initialize event but the field is not visible in both

screen and print .

Hi Shai ,

Somehow prePrint event is not working for me . Does it have to do anything with the

printer ?

I am giving print from SAP .

Former Member
0 Kudos

Hi Kirankumar

What do you meen by "giving print from SAP"?

The printing must be handled by tha Adobe form for any event to be triggered.

The form interacts with SAP only via context or SUBMIT, it cannot react to printing from SAP.

Hope it helps,

Shai

Answers (0)