|
|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (1)
View page history
... Please click [here|Image Inserter DSC] for full reference on Image Inserter DSC.
h2. Using Avoka Image Inserter DSC
h3. Scenario
Previously when displaying images in forms using Reader Extensions 7.x up until 8.0, we can use a URL to specify the image URL dynamically, and the image will be loaded when the form is opened. However, since the release of Reader Extensions 8.1, the feature of specifying image URL has been removed due to security concerns.
One of the _possible_ solutions is to embed the image to the form when designing the form, but in this way, we will not be able to dynamically determine what image is to be displayed according to the value of particular form field.
Avoka Image Inserter allows you to insert the image to an XML dynamically by doing the image lookup based on the image URL specified in an XML field, apply encoding to the image content, and then insert it back to a specified XML field to be displayed. This XML is then merged to a Form variable where there is an Image Field (NOT Image) bound the XML field containing the encoded image.
The original extracted XML data from the Form might look like this: {code:xml} <imageType> <image>http://test-lces:8080/images/MyPicture.jpg</image> <imageContent/> </imageType> {code} We need the XML to look like the following, in order for the Form binding to work correctly so that the image can be displayed on the Form: {code:xml} <imageType> <image>http://test-lces:8080/images/London.jpg</image> <imageContent>/9j/4AAQSkZJRgABAQAAAQABAAD//g ... D5T/2Q==</imageContent> </imageType> {code} \\
h3. The Image Inserter Service
This is developed by Avoka Technologies, containing an operation, called "Insert Image", that does the following:
1. Reads in a specified XML field value from an XML, which contains the image URL.
2. Downloads the image from the URL.
3. Performs encoding to the downloaded image
4. Inserts the encoded content to the specified field of the XML.
!operation.jpg!
To obtain an evaluation copy of the Image Inserter Service, go to the Avoka Website: [http://www.avoka.com] and follow the links. The Image Inserter DSC, once installed, will appear as a new service under the category Avoka in your LiveCycle WorkBench.
!service.jpg!
h3. The Process
!process.jpg!\\ \\
|
As shown in the figure above, the step that we are interested in is the second step that does the image insertion to an XML, then the XML data is merged into a Form to be reviewed by a User step. In most cases, you will have the XML data extracted from a submitted form instead of having the first step shown there to initialize an XML variable.
|
| For demonstration purposes, we have provided the exported [sample process|^ImageInserterTest.xml], [form|^myForm.xdp] and its [schema|^my.xsd] for the process described above, as
an
attachment to this article. You can import it as a process to your LiveCycle ES via workbench, for guidance in setting up property values for Insert Image operation steps. |
\\
|
... h3. Setting Properties for "Insert Image" Operation
!insertImageProperties.jpg!\\ \\ To configure the properties of the "Insert Image" operation step, click on that step, then click on the "Properties" view on your Workbench. It will show a dialog box as seen above.
You will need to specify the XML field, which will contain the image URL via XPath Expression as well as the XML field to write the encoded image content to via XPath Expression. \\
h3. Setting Properties for "Set Value" Operation to Merge XML data to Form
!mergeProperties.jpg!\\ |
|
|