cancel
Showing results for 
Search instead for 
Did you mean: 

Business Graphic in a pdf file.

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Answers (1)

Answers (1)

former_member214651
Active Contributor
0 Kudos

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