Hi,
Can we add Image to the form same like as we do with Floating Fields ?? I need to pass the image path ('C:\images\sample.jpg') & it should be displayed in ImageField.
Thanks,
Abhinav
Solved! Go to Solution.
Views
Replies
Total Likes
Its step 3 that is the issue. The XML data isn't the same as the XFA field properties (of which .rawValue is one)
When you created your form, you also created an XML data structure. If you don't manually bind sample XML or a schema to the form then Designer will create a default one for you. The default one will follow the same structure of your form, but it will not include the field properties - its just the data.
Note: If you are bound your form to a schema or sample XML then it will use that structure rather than the default.
The easiest way to see what it looks like is to open the form in Desinger.
This will save a sample XML file with jiberish standing in for real data. This is the XML format that you will need to use to insert the base64 data into the field.
One thing to keep in mind is that you are replacing ALL of the data when you do this type of re-render. If your form already has data, you will need to extract it (using Process Form Submission) and modify the resulting XML before re-rendering the form.
Views
Replies
Total Likes
This is really more of a Form/Designer question then a Generator question, but I'll do my best to help out:
I'm assuming that you don't just want the default functionality of an image field (where the user clicks on the field and then browses to the image). Do you want to do this from the form itself (no server side rendering), or are you adding the image as part of a server side rendering of the form?
If its in the PDF itself you'll need to make a call to get the image data (such as a web service call), then add it to the image field using some script. Since you are making a service call and (presumably) saving the form afterwards, you'll need to add Reader Extensions to the document.
If you are doing it server side, as part of a process, then you will have to do the following:
Views
Replies
Total Likes
Thanks Hodmi.
Yes, I am rendering image at server side. I did the same way you suggested for server side, but it doesn't works.
Steps I did:
But this is still not working. I dont know where I am wrong.Pls help.
-
Abhinav
Views
Replies
Total Likes
Its step 3 that is the issue. The XML data isn't the same as the XFA field properties (of which .rawValue is one)
When you created your form, you also created an XML data structure. If you don't manually bind sample XML or a schema to the form then Designer will create a default one for you. The default one will follow the same structure of your form, but it will not include the field properties - its just the data.
Note: If you are bound your form to a schema or sample XML then it will use that structure rather than the default.
The easiest way to see what it looks like is to open the form in Desinger.
This will save a sample XML file with jiberish standing in for real data. This is the XML format that you will need to use to insert the base64 data into the field.
One thing to keep in mind is that you are replacing ALL of the data when you do this type of re-render. If your form already has data, you will need to extract it (using Process Form Submission) and modify the resulting XML before re-rendering the form.
Views
Replies
Total Likes