cancel
Showing results for 
Search instead for 
Did you mean: 

getting Dynamic image in PDF ( form R/3 as URL )

Former Member
0 Kudos

Hi gurus ,

I am using a wd java application . In that i want to show employee pic in adobe form . I have RFC in place , that gives me URL (ex : http://retep. ) containing employee pic Context is of type string

Now i have craeted a image field in PDF .when i directly binding context data to image dield , Image is not being displayed. i am not sure about scripting and how to bind that context to image field , so that based on the url it dynamically displayes employee pic.

Any suggestions are most welcome .

Regards

Abhay

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In RFC instead of giving the URL ,tell them to give the image as a bytestream.And convert that byte stream into gif or jpg image using the following code,,,,,

byte[] pdfContent=wdContext.nodeOutput().currentOutputElement().getTestform();

IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.JPG_IMAGE/* or u can use GIF_IMAGE*/);

try{

wdContext.currentContextElement().set<this is a user created attribute of typw string>Pdfurl(pdfResource.getURL());

}catch (Exception e) {

wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);

}

And bind this pdf url to an iFrame or adobe interactive form it wil work..

xxxxxxxxxxxxxxxxxxxxxx

Warm regards

Shanto Aloor

Edited by: Armin Reichert on Apr 26, 2008 7:06 PM