how to Pass image file to eform
Hi All,
I have a business requirement to embed user photograph in pdf generated by e-forms.
property of type image is defined in pdf template and corresponding e-form map rule is mapped with clipboard property of type text. is this right configuration to make it work?
tried with following options with no luck.
1. using java io api (photo is the text property used in map rule)
String strFilePath=tools.getParamValue("FilePath");
java.io.File file = new java.io.File(strFilePath);
byte[] bytesArray = new byte[(int) file.length()];
java.io.FileInputStream fis = new java.io.FileInputStream(file);
fis.read(bytesArray); //read file into bytes[]
fis.close();
tools.putParamValue("FileBytes",bytesArray);
myStepPage.putString("Photo",tools.getParamValue("FileBytes"));
2. This is being failed as trying to assign output stream object to photo (text) property.
Hi All,
I have a business requirement to embed user photograph in pdf generated by e-forms.
property of type image is defined in pdf template and corresponding e-form map rule is mapped with clipboard property of type text. is this right configuration to make it work?
tried with following options with no luck.
1. using java io api (photo is the text property used in map rule)
String strFilePath=tools.getParamValue("FilePath");
java.io.File file = new java.io.File(strFilePath);
byte[] bytesArray = new byte[(int) file.length()];
java.io.FileInputStream fis = new java.io.FileInputStream(file);
fis.read(bytesArray); //read file into bytes[]
fis.close();
tools.putParamValue("FileBytes",bytesArray);
myStepPage.putString("Photo",tools.getParamValue("FileBytes"));
2. This is being failed as trying to assign output stream object to photo (text) property.
***Updated by moderator: Lochan to update platform capability***