Skip to Content
avatar image
Former Member

Business Graphic in a pdf file.

I have to create a downloadable pdf file containing a dynamic business graphic.

Can you suggest the best technique to achive that?

Thank you in advance.

Livio.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    May 21, 2010 at 06:00 AM

    Hi Livio,

    As Poojith said that there are no UI element for BG in interactive PDF form builder so it may not be possible to implement a BG in a Adobe form in runtime.

    But you can implement it in the NWDS as a WebDynpro project.After that you can configure a print button which triggers the Print action,so that you can take a print from your WD applications.

    Regards,

    Sukalyan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sukalyan,

      I finally succeeded.

      I made a Web Dynpro View containing a BG UI element, where I drew my graphic. Then I got a .gif image of the graphic with the following code:

      public void wdDoModifyView(IWDView view, boolean firstTime) {
         ...
         IWDBusinessGraphics bg = (IWDBusinessGraphics) view.getElement("myBusinessGraphicsUIElem");
         byte[] img = bg.getImageAsByteArray(null, null);
         String img64 = Base64.encode(img);
         ...
      }
      

      As shown in the code, the image is encoded in a base64 string and (not shown) is inserted in a node context, in an attribute of type String. The node is shared with an Interactive Form, where there is an Image Field.

      Just bind the base64 string to the Image Field, and that's all.

      Regards,

      Livio.

  • May 21, 2010 at 04:27 AM

    Hi,

    I am not sure if this can be done in an Interactive form. There are no UI elements in the Interactive form library to achieve this.

    Regards,

    Poojith MV

    Add comment
    10|10000 characters needed characters exceeded