on 02-27-2008 12:18 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.