cancel
Showing results for 
Search instead for 
Did you mean: 

Hide the Save button in tool bar in pdf form

former_member199223
Participant
0 Kudos

Hi All,

I need to hide the save button in the tool bar in pdf form out put. I need not hide the print button, hand tool and etc.

I have seen some forum threads,but i am not able to get the answer.

I have refered this links

http://help.sap.com/saphelp_nw04/helpdata/en/e1/fd9841e2ebb05fe10000000a1550b0/frameset.htm

The above link contains some scripts,The code id used for hide the hole tool bar not only save button.

I need to hide only save button in the tool bar.

How to hide the save button in the tool bar ?

Thanks and regards,

Boopathi M

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

try this....

// Get interactibe form handler.

IWDPDFDocumentInteractiveFormHandler iFormHandler =

WDPDFDocumentFactory.getDocumentHandler(wdThis.wdGetAPI(),

"InteractiveForm");

// Get appearance setter.

IWDPDFDocumentAppearance appearance =

iFormHandler.getDocumentContext().getAppearance();

// Set page layout option

appearance.setPageLayout(pageLayoutOption);

// Set show option.

appearance.setShowOption(showOption);

// Hide menu bar.

appearance.hideMenuBar(true);

// Hide tool bars.

appearance.hideToolBars(true);

// Hide window controls.

appearance.hideWindowControl(true);

// Show full screen.

appearance.showFullScreen(true);

Former Member
0 Kudos

Hi Boopathi,

Have a solution for your query, albeit 3 years later I guess i started working on WebDynpro much later compared to you.

Hope you might have solved the issue when you faced the issue in 2007 but since the ABAP Webdynpro solution still doesn't appear anywhere in the forums, so thought of updating the message.

Below is the code for hiding the toolbars of Adobe form. Paste it in WDDOMODIFYVIEW method of your view.

DATA: LR_METHOD_HANDLER   TYPE REF TO IF_WD_IACTIVE_FORM_METHOD_HNDL,
             LR_WD_FORM TYPE REF TO CL_WD_INTERACTIVE_FORM.

  LR_WD_FORM ?= VIEW->GET_ELEMENT( 'INTERACTIVE_FORM' ).
  IF LR_WD_FORM IS NOT INITIAL.
    LR_METHOD_HANDLER ?= LR_WD_FORM->_METHOD_HANDLER.
    LR_METHOD_HANDLER->SET_HIDE_TOOLBARS( ABAP_TRUE ).
  ENDIF.

Regards,

Shashank Shirali

chintan_virani
Active Contributor
0 Kudos

How does the solution posted by you solve the question i.e. with your code complete toolbar will be hidden whereas the question was to hide a specific button i.e. SAVE

Former Member
0 Kudos

Hi,

I am facing the same problem. Anyone knows the solution?

Where can I get Adobe Designer version 8.2? Currently, I have version 8.0and cancelAction option is not available in the version.

Thank,

Apurva

former_member189058
Active Contributor
0 Kudos

Hi Boopathi,

I have a solution for this.,

Can u tell me which version of Adobe Designer are you working on???

Regards,

Reema.

former_member199223
Participant
0 Kudos

Hi Reema Shahbazkar,

Thanks for your reply

My Adobe LiveCycle Designer version is : 7.1.3129

My Adobe Reader version is : 8.0

Regards,

Boopathi M

Former Member
0 Kudos

Hi,

I am not able to paste the code, can you give me your mail id, so that I can mail you.

Hope this helps,

Amit

Edited by: Amit on Sep 10, 2008 8:18 AM

former_member189058
Active Contributor
0 Kudos

Adobe Designer 7.1 uses XFA 2.4

If you can upgrade to Adobe desinger 8.2 to be abel to use XFA 2.8 you can code in the following way:

Write the following code in the preSave method



if (do_not_save_condition == 1) then
  xfa.event.cancelAction = 1
endif

Adobe Quote

cancelAction specifies whether to cancel a forthcoming action.

This property applies only to the following scripting events: prePrint, preSubmit, preExecute, preOpen, and preSign.

The user experience is determined by the scripting event that contains the cancelAction reference:

u2022 preOpen - The drop-down list does not expand to display the list of values.

u2022 preSubmit - Form submission does not occur.

u2022 preSign - The form is not digitally signed.

u2022 prePrint - No print dialog boxappears, and the form is not printed.

u2022 preSave The form is not saved. The user experience is that no action occurred.

Edited by: Reema Shahbazkar on Sep 10, 2008 7:54 PM

Using this, the save button will still be visible but, you can prevent the form from being saved.

former_member199223
Participant
0 Kudos

Hi Reema Shahbazkar,

Thanks for your reply .

But i cannot update Adobe desinger 8.2 version .

Is there any other solution.

Regards,

Boopathi M

former_member189058
Active Contributor
0 Kudos

No there is no other solution ....

atleast I haven't come across any.

Regards,

Reema.

Former Member
0 Kudos

Hi,

You can try this:

// Get interactibe form handler.

IWDPDFDocumentInteractiveFormHandler iFormHandler = WDPDFDocumentFactory.getDocumentHandler(wdThis.wdGetAPI(), "<name of your form>");

// Get appearance setter.

IWDPDFDocumentAppearance appearance = iFormHandler.getDocumentContext().getAppearance();

// Hide menu bar.

appearance.hideMenuBar(true);

// Hide tool bars.

appearance.hideToolBars(true);

Regards,

Arafat

former_member199223
Participant
0 Kudos

Hi Arafat,

I created an adobe form using ABAP server ("SFP" T-code) not in web dynpro java.

You told to use this code:

// Hide menu bar.

appearance.hideMenuBar(true);

But this code for hide total tool bar not only save button in the tool bar.

Regards,

Boopathi M

former_member189058
Active Contributor
0 Kudos