Archive for the ‘LiveCycle’ Category

cathyj

Creating a Custom Object in LiveCycle Designer

Tuesday, June 14th, 2011

By Cathy Jin – Consultant

To improve form development productivity, we should always think of reusing existing content as much as we can.  Adobe LiveCycle Designer provides some good features to accomplish this such as using custom objects and form fragments.

If you have some designed objects which can be reusable within multiple forms, you can first group them into a subform and then create a custom object. For example, several business forms have an employee information section including first name, last name and employee ID number.

The benefit of using the custom object is that you treat it as one object instead of multiple objects. When using it, just drag it to your form like other standard objects. You only design it once all formatting and scripts associated with the objects are retained to be reused among all forms. If you like, you can change it later to meet requirements for a specific form. Changing the custom object in one form won’t affect other forms.

The basic steps are as follows:

(1)   Add an Object Library group

(2)   Select all objects in the form and wrap them into a subform

(3)   Drag the subform in the form to the opened new Object Library group tab

(4)   Fill in the custom object name and description for the Add Library Object dialog

After creating the custom object, you can reuse it by dragging and dropping the custom object to any location you want in other forms.

cathyj

How to Solve an Email Button Issue in a PDF Document

Tuesday, May 24th, 2011

By Cathy Jin – Consultant

One of our clients used Adobe Livecycle Form Designer to create a PDF document but ran into a problem with the email button they created for the form. When clicking the Email button of the PDF file via Acrobat Reader, they got the following dialog box message (they had a similar issue with the Save button).

Picture1

The solution was to enable Usage Rights first before you give out the PDF form to the end user. One of the ways is to use Acrobat Pro 8 or later version. I’ll take Acrobat Pro 9 as an example. The steps are as follows:

Select the Advanced menu –> Extended features in Adobe Reader –> Save now

If you are using the Acrobat X , you will notice the menu has been greatly changed from the previous version. Use the steps described below:

Select the File menu –> Save As –> Reader Extended PDF –> Enable additional features

The new file you saved will not have the same problem.

bileni

Inferring an XSD from XML

Wednesday, February 9th, 2011

By Bilen Imam – Consultant

When working with forms in LiveCycle, it is important to know the structure of the XML data that gets exported from the form and passed around the LiveCycle process. In ES2 Adobe has introduced the ability to create and use an Adobe Data Model to describe the structure. Workbench has a tool which will allow you to to create these models and Adobe is really trying to encourage developers to use it more, not just in LiveCycle development, but also in enterprise level development with Flex and Java.

However, being old school, I still found it more comfortable to use an XML schema file (.xsd) to describe the structure of the data in the form and to use in a LiveCycle process to be able to access the separate fields in a form.

Creating an XSD can be troublesome, creating it from scratch even more so. The easiest method to create the XSD file is by inferring it from an XML file. There are many XML editors that are able to do this, a few being:

Unfortunately you have to pay for these software. There are a few free options out there, my favorite being Trang. Its a small and simple command line tool that works in multiple platforms. The way to use it is to

  1. Download Trang. You can download Trang at http://www.thaiopensource.com/relaxng/trang.html
  2. Extract the files from the zipped download
  3. Run the command passing your input XML file (it can be multiple XML files) and specifying the result XSD file.

The syntax of the command should look like;

java -jar trang.jar input.xml input2.xml input3.xml output.xsd

And its as simple as that! You have your XSD file that you can use in your form and in your process to describe the structure of the data.

bileni

Importing a LiveCycle ES process into LiveCycle ES2 – UPDATE

Thursday, December 16th, 2010

By Bilen Imam – Consultant

Back in August I had a blog posting about moving LiveCycle ES 8.2 processes to an ES2 environment, found here. Since then, Adobe has put up a new tool in their Labs that that will install as a plugin to Workbench. With this archive migration tool installed, LiveCycle Workbench ES2(SP1) users can import a LiveCycle 8.x archive into the Workbench workspace directly to take advantage of the new features available in ES2. A new LiveCycle ES2 application is created and all the resources in the 8.x archive are imported into the ES2 application.

The new tool can be found at http://labs.adobe.com/technologies/lcworkbench_archivemigration/

bileni

Having your PDF connect to a webservice without databinding

Friday, July 16th, 2010

By Bilen Imam – Consultant

One of the most powerful features of PDFs is the ability to make webservice calls to pull in information as well to send information to some back end system.

Traditional, this is done through creating a data connection through the Data View palette and binding the request and response nodes to fields on the form.

dataConnection

However, using databinding can be a little restrictive in the fact that you have to actually bind to atleast one field for each webservice. This could potential result in you having alot of hidden fields on your form. However, there is a way to create a webservice without having to bind to a field. The alternative allows you to make a webservice call and have the results stored in a variable instead, all done through scripting. An added bonus is that you also have the ability to create webservice calls dynamically.

First things first, you have to know the address of the webservice. You may have made it through some other server, but if you had created it using LiveCycle (i.e. a webservice endpoint), you can either hard code the address in (in which case skip to the Note), or you can dynamically establish the location of the server. However, the following instructing on how to dynamically establish the server address will only work if you are rendering the form from Workspace;

var server = event.target.URL;

Once you open the form in WORKSPACE, the server will contain an address. This address will contain the address of the server, it’ll be in a format of;

http://lcserver:8080/workspace/tksdfjh

So what you’ll have to do is to strip out the first part of the address;
myServer = server.substring(0,server.indexOf(“/”,8));

And you just tack on the endpoint to the server;
var myUrl = myServer + “/soap/services/myWebService?wsdl”;

Again, this makes it pretty handy if your webservice resides in a test server and a production server (as an example) and you’re transferring the form between servers and you don’t want to have to keep changing the address.

******
Note: if your webservice is not on the LiveCycle server, and the address is the same no matter where you use the form, you can start from here
******

And then once you have the address you make a connection to it

var connection = Net.SOAP.connect(myUrl);

Now once you have this connection, you can call the methods of the service using the dot notation;

var result = connection.myMethod({“paramenter1″: value, “parameter2″:value2});

Note the way that the parameters are passed in.

Now that you get the result back, you have to know what type of data is coming back (i.e., is it a complex or simple object). But you now have the ability to manipulate that object anyway you wish, without having make a binding.

bileni

Checking the Digital Signature on a PDF form

Friday, May 14th, 2010

By Bilen Imam – Consultant

When designing a form using LiveCycle Designer, you have the ability to insert a digital signature field. This in turn enables the user to insert a digital signature into the form. This provides assurances that the form has not been altered since the document has been signed, and allows Acrobat Reader to verify the identity of the person signing the form.

However, you may sometimes need to verify the signature before the form is sent to be processed (say through a electronic submission to a LiveCycle server). You may want to check if the form has been signed at all, or check the validity of the signature. To do this with Javascript you need to first access the field.

var digSig = event.target.getField("form1[0].#subform[0].Submit[0].Signature[0]");

It is important to use the fully qualified path to the field. This can be accomplished by using the ctrl+click feature of Designer.

Once that is done, you can use the variable to check the status of the signature field;

var status = digSig.signatureInfo().status;

The possible values you can get are

-1: not a signature field
0: signature is blank
1: unknown status
2: signature is invalid
3: signature is valid, identity of signer could not be verified
4: signature and identity of signer are both valid