Skip navigation
Currently Being Moderated

prePrint event scope affects all other print events?

Jul 5, 2012 2:44 PM

Tags: #livecycle #hidden #scope #print

A PDF requirement is to have one document print in different versions for different recipients -- e.g., court, DA, public defender ..

They aren't all allowed to see the same data on people in the system, and in one instance, the form must be secured as read only.

Sure, there are a few different ways to do this, but the workflow chosen was to complete a PDF form, and then intercept the print or email functions to hide and secure pages.

The people who fill out the form need the entire document.

My approach was to offer a standard print button from the tool palette. No problem.

Then I added another print button from the tool palette, and set the pre-print and post-print events to intercept and change the number of pages output (leaving out pp 4-6). Works fine.

form1.page1.btnPrintLimited::prePrint - (JavaScript, client)

    TextField1.rawValue = "Secure prePrint";
    page4.presence = "hidden";
    page5.presence = "hidden";
    page6.presence = "hidden";

Then, returning to the standard print button, it seems that now all jobs are rendered with the same pages missing as were defined in the pre-print and post-print events for the OTHER button.

What gives? I thought that the scope for control events would be limited  to those events themselves.

I even tried in the pre-print and click events for the standard report to force the visibility of pages suppressed in the events, e.g.,

form1.page1.btnPrintNormal::click - (JavaScript, client)

    page4.presence = "visible";
    page5.presence = "visible";
    page6.presence = "visible";, "0", ( -1).toString(), 0, 0, 0, 0, 0);

Is my approach a faulty one? Should I be trying something else?


I'm using LC Designer ES2.


Would appreciate any guidance.


Kind regards,


  • Currently Being Moderated
    Jul 5, 2012 2:55 PM   in reply to Bivalvinore504

    Hi Brian,


    There are three classes or groupings of events:

    • Process events.
    • Interactive events
    • Application events


    See a table and example form here: Also have a look at this example, as it shows you how often some process and application events fire:


    Okay, so interactive events like mouseEnter and click are restricted to the object that contains the script.


    However process and application (including prePrint and postPrint) fire for all objects that contain script in those objects.


    I hope the examples clear that up for you.


    I think you might have to consider a role based approach to the form. So for example if you can determine who is looking at the form, then using an if/else statement, print the appropriate pages.


    Good luck,



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points