cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Adobe ToolBar

Murali_Shanmu
Active Contributor
0 Kudos

Hi,

I have earlier posted the same issue in a thread. I have a link on <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/45/2dbb13d79f3446e10000000a155369/frameset.htm">SAP Help</a> that talk about this.

I just added these 2 lines of code in my doInit method ofthe View that has the PDF.

data: lr_method_handler type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.

lr_method_handler->set_hide_toolbars( abap_true ).

I am not able to see set_hide_toolbars method available for the interface IF_WD_IACTIVE_FORM_METHOD_HNDL.

Can anyone help me out.

Regards,

Murali

Accepted Solutions (0)

Answers (2)

Answers (2)

Sigiswald
Contributor
0 Kudos

Hi Murali,

I think the only thing you need to do is the following. In Adobe LiveCycle Designer just add the <i>Hide Reader Toolbar</i> UI element somewhere on your page. This particular UI element can be found in the <i>WebDynpro</i> library; that's not the same as the <i>Web Dynpro ActiveX</i> or the <i>Web Dynpro Native</i> libraries.

If the library is not present, as was the case when I installed Adobe LiveCycle Designer, you can add it yourself. In the Library palette, click the small arrow and choose "Add Group". Choose "WebDynpro" as the name. Right click the new WebDynpro tab and choose "Group Properties". Enter the correct location, usually <i>C:\Documents and Settings\<uname>\Application Data\Adobe\Designer\en\objects\WebDynpro</i>.

Kind regards,

Sigiswald

Murali_Shanmu
Active Contributor
0 Kudos

Hi Sigiswald

Which Version of ADLC are you on. I also got this using ADLC 7.0. Now I am using ADLC 7.1. I dont find this control in this version. Now I want help using the code as mentioned in SAP Help.

Regards

Murali

Sigiswald
Contributor
0 Kudos

Hi Murali,

I also use ALCD 7.1; recently downloaded from SAP marketplace (01200615322000000757.CAB). Don't you have the following file on your file system? <i>C:\Documents and Settings\<user>\Application Data\Adobe\Designer\en\objects\WebDynpro\HideReaderToolbar.xfo</i>.

Kind regards,

Sigiswald

Message was edited by:

Sigiswald MADOU

Murali_Shanmu
Active Contributor
0 Kudos

That file was not present. Hold on, I am again downlaoding it and trying to re-install. Thanks,. Shall rever back.

Murali

Sigiswald
Contributor
0 Kudos

Hi Murali,

I think I know what the problem is: ALCD 7.1 indeed doesn't contain the controls in <i>objects\WebDynpro</i> anymore, only <i>objects\WebDynproActiveX</i> and <i>objects\WebDynproNative</i>. The reason I still have them is because apparently they were not removed when uninstalling my previous version of ALCD. I never even noticed... That makes me wonder if the Hide Reader Toolbar functionality is still supported. Too bad, but I don't know the answer. It's still mentioned in the Web Dynpro for Java manual of NW04s. We're installing the NW04s servers now, so I can't verify if it still works. Maybe, if you're lucky, you can try editing the XDP directly by adding the following section.


<field name="HideReaderToolbar" w="6mm" h="6mm" presence="invisible" x="1.0013mm" y="56.9997mm">
  <ui>
    <button/>
  </ui>
  <bind match="none"/>
  <calculate>
    <script contentType="application/x-javascript">
      if (typeof(app) == "object") {
        // DO NOT MODIFY THE CODE BEYOND THIS POINT - HideReaderToolbar.xfo
        var stopToolbar = app.setTimeOut("app.eval("SAPToolbarHide();");", 1);
        // END OF DO NOT MODIFY
        // hide toolbar in offline scenario
        app.toolbar = false;
      }
    </script>
  </calculate>
</field>

Kind regards,

Sigiswald

Murali_Shanmu
Active Contributor
0 Kudos

Hi Sigiswald,

It was very nice of you to reply in detail about the problem. As, I have also faced this same problem, It was present in the earlier versions. Now We have to hide the toolbar programatically. I am trying to find that option. Thanks for your support.

Regards

Murali

krishanu_biswas
Active Participant
0 Kudos

Hello Sigiswald,

I was wondering if you had a chance to try your hand on the PDFDocument API in the WD4 Java world of interactive form. We have a comprehensive set of APIs, to set/unset the appearance of the PDF document on the server. Please look into the following package for more details:

package com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.api

You might try sort of code below:

    // 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);

There are a plethora of methods available to do it all. I have just taken up a few. I was wondering if you can give it a try, It will make your life easier.

Best Regards,

Krish

Murali_Shanmu
Active Contributor
0 Kudos

Thanks Krish. I am looking for a Similar code in WD ABAP.

Regards

Murali

Sigiswald
Contributor
0 Kudos

Hi Krishanu,

Thank you for this valueable information. I didn't study the PDFDocument API in detail yet. Our application is still running on NW04, we're about to upgrade to NW04s in the coming weeks.

The following is actually a completely different topic, but nevertheless, it might be interesting anyway. What we have right now is a Web Dynpro for Java application in which we use the InteractiveForm UI element to render the pdf. But we don't use interactive forms in the standard way. We use the <i>mode=usePdf</i> option of the InteractiveForm UI element. This allows to render any (interactive) pdf file and, especially, it doesn't require creating a Web Dynpro context structure (at design time or dynamically at runtime), no data binding while designing the form template and the template can be stored anywhere (we store the xdp in KM). As a result, we have a single, generic, Web Dynpro application that can use different interactive forms. Of course, the main drawback is that there's no easy way to access the data the user entered in the form or to prefill the form with some data, but that's allright in our use case. It was especially important to be able to deploy many forms, developed separately in another team, without changing the Web Dynpro application. To be able to do all of this, we directly use the PDFObject API to generate the pdf based on the xdp template, to extract and import the data.xml, to generate a read-only copy of the pdf etc. An XML parser works fine to extract the data in the data.xml or to prefill it with data.

And indeed, as of NW04s, we really like to use the ZCI and the new PDFDocument API to do the same. I just hope this'll still all be possible...

Kind regards,

Sigiswald

chris_scott
Active Participant
0 Kudos

Hi Sigiswald,

Interesting to hear about your application using the usePdf mode. I'm doing something that sounds quite similar for a customer and I wondered if you'd ever come across this problem:

I don't seem to able to successfully clear the pdfSource context node in order to accept the next pdf.........every other context node I can clear by invalidating it or by creating and binding a new element, but not the actual one containing the pdf! If I hit refresh on the browser then no problem, but programmatically it seems impossible.

We're NW04s sp 11, data coming from ABAP RFC as type xstring going straight into the pdfSource node etc.

Any thoughts you have much appreciated.

Cheers,

Andy

Murali_Shanmu
Active Contributor
0 Kudos

Any Help.!!!!

Message was edited by:

Muralidaran Shanmugham