billmack30
billmack30

Reputation: 21

Hide button on PDF before flattening in LiveCycle Workbench

  1. ASP.NET application asks user to fill in fields.
  2. User clicks a "Request Signatures" button in the application and a LiveCycle service is called to create the pdf.
  3. The pdf is saved in the ASP.NET application database.
  4. This pdf has to then be digitally signed by 3 people.
  5. A link to the pdf is shown to the first person in the workflow.
  6. User clicks on link and the pdf is shown in the browser for them to digitally sign.
  7. At the bottom of the pdf is a submit button, which the user clicks after signing.
  8. The pdf is submitted to a web page which updates the pdf in the database and through other database tables, is put in the next person's "to-do" list.
  9. 2nd & 3rd person repeat #5 - #8
  10. After the 3rd person signs, the pdf is considered complete. The pdf is to be flattened using LiveCycles Output service transformPDF

The problem is the "Submit" button on the form. I have made it "Visible - Screen only" to take care of anyone that wants to print a hard copy anytime during the process. However, I have a feeling the client will complain that the Submit button shows up on screen. Also, the final, flattened pdf should not show the button as it's being submitted to an official repository for these forms in which other forms don't have a submit button.

After the 3rd person signs, I can easily set the submit button presence to hidden. Then when it's flattened, it won't show up. The problem comes when the user wants a "Print View" before or during the signing process.

So my question is can I make a LiveCycle process that takes in a document variable (the pdf with the submit button) and output a document variable (the pdf without the submit button). Meaning the process would have to somehow run javascript inside the pdf to hide the submit button.

Upvotes: 1

Views: 694

Answers (1)

ph6
ph6

Reputation: 182

That event could be the prePrint event to remove the button from the layout. And you will need postPrint event to put the button back in.

on the prePrint event of the button(to hide the button): this.presence = "hidden";

on the postPrint event of the button(to show the button): this.presence = "visible";

Upvotes: 2

Related Questions