|
Blogs
Introduction We will start by looking at the BSP application that I am trying to represent in the Adobe Forms Tool.
Long Text Area
Tables I had sent my internal table through the Form interface and added it via drag and drop to the Context. I could see the table, and its components in the data view of the forms designer. You start the table creation process by dragging a subform object from the Library palette/Standard tab. This first subform represents your entire table, so place it where you want your table to be. Also resize it large enough to easily insert additional elements inside the subform area. Next you need to insert two more subforms. One will become your header and one will become your table body. Now you can insert the individual fields that will make up your Table header and body elements. You can insert static text, text fields or any of the other standard form elements. Drag and drop the fields from your internal table represented in the Data View to bind to the data from your context. The size that you make the individual elements doesn't really mater at this point nor does your exact alignment. You can see that they are quite a mess in my designer at this point. They will be resized in a few steps. Notice that you have to type static headers. I never found an easy way to bring in field titles. You can see from my screen shot earlier that the language dependent field descriptions map through the interface and into the content. You can see them in the data view under Descriptive info. It sure would be nice if these automatically mapped to the table headers or to text fields that are bound to context items. Finally we are ready to turn this mess into a table. We return to our highest level subitem that represents the table itself. We need to go to the Object palette, Subform tab. The default Subform type is Position Content. We need to change this to Flow Content. Now a new option opens up that allows us to choose the Flow Direction. For this element we choose table. Now we reach the point where we will define our column sizes. A new field has appeared where we must list all the column widths separated by commas. We had two columns that we will make 4 inches each. The process is now repeated for the subform that represents our table header and our table row. The layout in the designer now looks much nicer. What we have so far will give us a nice looking table with exactly one row. We must go into the subform that represents our table row and in the Object Palette/Binding tab make the proper setting so that the row will repeat for each item in the internal table that is bound from the context. To do this we set the Repeat Subform for Each Data Item option. If you want to get fancy you can even set an overflow leader so that the table header is repeated if the table must span more than one page.
Images and Icons However static images were not going to cut it for my need. The first thing I decided to do was to get my Icon content into a binary string variable so that it could be passed into the form interface. I accomplished this with the following code. We already have the internal table the contains our icon binary content in our context. Now I needed to manually add the special element type of Graphic to the table node of the context. There are two types of Graphic Nodes within Adobe Forms Context - Graphical Context and Graphical Reference. With Graphical Reference, you only have to supply a URL where the image content can be read from. I had originally started to use this option and just pass the URL to the icons. However there appears to be a bug in my WebAS 640 SP12 system that produces a short dump for this type of graphic node if it is placed in a table node (Updated 7/18/2005: This problem is now fixed via OSS note 862915). This left me with only the Graphic Context Option. I therefore just supply the fields of my table that contain the content and the mime type. Also note that there is a bug in SFP in 640 SP12 that causes the Graphic Context not to syntax check if the mime type is supplied via a content attribute instead of static string. This problem is also solved via OSS note 862431. The graphic node now appears within your data view in the forms design and can be dragged onto the form and placed within a table row subform. I did find one problem however. When it drug this node element over to my form, it didn't generate a image field. By default it created a text field. I had to manually change it to an image field.
Form Paging
Form Output Also because I had used the Adobe tool, the default format is PDF. Therefore I don't have to do any conversion if I want to offer the content as a downloadable PDF file as well. There is a flag in the output parameters structure of the open Job function module (FP_JOB_OPEN) called getpdf. If you mark this flag, the binary content of the document will be returned to your application in the formoutput return structure. This single binary string is all ready your document in the PDF format. No further manipulation is necessary.
In case anyone is interested this is what the finished document ended up looking like in PDF, I have included some screen shots. I have marked over the top of some sensitive information. I should also note that capturing the form as an image and shrinking it did lose some of the detail of the lines and shadows around the tables and table headers.
Thomas Jung
| |||||||||||||||||||||||