Skip to Content
author's profile photo Former Member
Former Member

ADS - popup pdf not scrollable

When i used ADS to generate an embedded PDF within a Webdynpro screen, the embedded PDF is scrollable.

But if I pop the PDF onto a PDF on it's own that is not embedded in a Webdynpro view, the PDF won't have scrolling, pressing the print button abilities etc!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2004 at 03:19 AM

    An SAP developer suggested that I change the property in the following code from true to false :

    IWDWindowInfo windowInfo = (IWDWindowInfo) wdThis.wdGetAPI().getComponent().getComponentInfo().findInWindows("DisplayPDFSummSheetWindow");

    IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, false);

    wdContext.currentPopupElement().setWindowInstance( window );

    window.setWindowSize( 800, 600 );

    window.setWindowPosition(50, 50);;


    Would loading the PDF in another separate browser window solve the problem?

    The method createExternalWindow requires an URL for the PDF. How do I get the PDF's URL?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      //@@begin javadoc:onActionOpenWidow(ServerEvent)

      /** Declared validating event handler. */


      public void onActionOpenWidow( wdEvent )


      //@@begin onActionOpenWidow(ServerEvent)

      String fileName = "C:

      String fileUrl;

      try {

      File file = new File(fileName);

      FileInputStream in = new FileInputStream(file);

      ByteArrayOutputStream out = new ByteArrayOutputStream();

      int length;

      byte[] part = new byte[10 * 1024];

      while ((length = != -1) {

      out.write(part, 0, length);



      fileUrl = this.convertXstringToUrl(out.toByteArray(), "PDF");

      } catch (Exception e) {

      throw new WDRuntimeException(e);


      IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(fileUrl, "View File", true);;




      • The following code section can be used for any Java code that is

      • not to be visible to other controllers/views or that contains constructs

      • currently not supported directly by Web Dynpro (such as inner classes or

      • member variables etc.). </p>


      • Note: The content of this section is in no way managed/controlled

      • by the Web Dynpro Designtime or the Web Dynpro Runtime.


      //@@begin others

      private String convertXstringToUrl(

      byte[] doc_content,

      java.lang.String doc_type) {

      // setIFrameUrl()

      String url = "";

      if (doc_content != null && doc_content.length != 0) {

      MessageManager msgMgr;

      WDWebResourceType webResType = WDWebResourceType.PDF;

      if (doc_type.equals("PDF")) {

      webResType = WDWebResourceType.PDF;


      IWDWebResource webResource =

      WDWebResource.getWebResource(doc_content, webResType);

      try {

      url = webResource.getURL();

      } catch (WDURLException ex) {

      IWDMessageManager msg = wdComponentAPI.getMessageManager();






      } else {

      /** Todo: Error! */


      return (url);




  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2004 at 07:41 AM

    we've considered that method but the createExternalWindow() method requires the URL of the pdf. But our pdf's URL is dynamic coz it's generated on the fly. So far, we've been unable to get the PDF's url.

    Any other ideas? Or is this another bug that needs to be fixed?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I want to know that you can set the url which you mentioned to the context attribute or not.

      I think you can do it.

      And is it not possible for you to know the PDF file path?

      If the pdf file is located at server side, you are available to use my code.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.