on 06-08-2007 2:01 PM
hello: I need to read an image from km to incorporate it in Interactive Form, but for some reason when being generated the Form does not show it. The subject to dynamically obtain the images from km.
Thank you very much.
Hello,
Please review this link to import a KM image:
Now you must put the image to an attribute of context of type string. For it you do the following thing:
...
//Reading the image file......
BufferedInputStream bufIn = new BufferedInputStream(resourceimg.getContent().getInputStream());
byte[] imagebyte = new byte[bufIn.available()];
bufIn.read(imagebyte);
//Convertir a String
String imgString=new BASE64Encoder().encode(imagebyte);
wdContext.currentContextElement().setImgString(imgString);
...
Finally, in the Form you must add a Image Field, with the following properties:
-Tab field
URL: empty
Embebed Image Data
- Tab Binding
Default Binding: $record.ImgString
That is.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it is possible to transfer the content of the image in format XML (serializer).
In the tests it has been without problems, (1) now single it is to know like turning the image to XML JAVA and passing that value to the Node.
(1) I have taken the content result from the Embed Image Data and I have passed it like parameter from the Node to Adobe Form, and works!!!.
-The idea is to bring the image from km.
...
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 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.