A lot of times you have a need to extract or import the data from Excel file into LiveCycle form in a programmatic manner. To accomplish this I have written a simple component. This component makes use of Apache POI classes to extract data from the Excel file. The sample component is not generic for all Excel files, but it was written for extracting data from a specific Excel file. With little modifications you can get this code to work with any Excel file. The code creates a map of xml documents where each xml document corresponds to a row in the excel document. You can deploy this component using workbench and use it as part of your process. To build the component please follow steps mentioned below
Download the eclipse project from here Eclpse Project
Import the eclipse project into your eclipse IDE
Download the following jar file. The eclipse project depends on these jar files
Jar Files needed for the eclipse poject
Build the component and deploy it using workbench
Test it by providing the excel file which is available here as an attachment to the pdf file Parsing Excel files
Create a simple process using the component
Test the process with Excel file from the previous step

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote cast)
Posted in Adobe LiveCycle ES3 | Tagged , , | Comments Off on

Parsing Excel file

A lot of times you have a need to extract or import the data from Excel file into LiveCycle form in a programmatic manner. To accomplish this I have written a simple component. This component makes use of Apache POI classes to extract data from the Excel file. The sample component is not generic for all Excel files, but it was written for extracting data from a specific Excel file. With little modifications you can get this code to work with any Excel file. The code creates a map of xml documents where each xml document corresponds to a row in the excel document. You can deploy this component using workbench and use it as part of your process. To build the component please follow steps mentioned below
Download the eclipse project from here Eclpse Project
Import the eclipse project into your eclipse IDE
Download the following jar file. The eclipse project depends on these jar files
Jar Files needed for the eclipse poject
Build the component and deploy it using workbench
Test it by providing the excel file which is available here as an attachment to the pdf file Parsing Excel files
Create a simple process using the component
Test the process with Excel file from the previous step

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 6.3/10 (3 votes cast)
Posted in Adobe LiveCycle ES3 | Tagged , , | Comments Off on Parsing Excel file

Form Manager API

LiveCycle ES4 saw the (re)introduction of Form Manager. In simple terms Form Manager simplifies the process of managing forms. The official documentation for Form Manager can be found here
Once you have your required forms in Form Manager, you can start to build and manage Forms Portal. There are 2 ways to build forms portal.

  • Using Form Manager API
  • Using Forms Portal Components in CQ
  • FormPortalSample Portal

    In this post we will discuss the first option(using the Form manager api. In your web application you will need to make a ajax call as shown in the code snippet below.

    $(“#searchforms”).on(“click”,function()
    {
    var nameOfForm = “*”+$(“#formstosearch”).val();
    $.ajax({
    type:’POST’,
    url:”/lc/libs/formsmanager/manage.json?func=searchForms”,

    data:{
    appPath:””,
    cutPoints:”title|description|author|formUrl|pdfUrl”,
    relation:”NO_RELATION”,
    includeXdp:”false”,
    maxSize:0,
    offset:0,
    orderings:JSON.stringify([]),
    statements: JSON.stringify([{“name”:”title”,”value”:nameOfForm,”operator”:”CONTAINS”},{“name”:”status”,”value”:”true”,”operator”:”EQ”}])
    },
    success:function(data)
    {
    }

    Lets take a look at the code above
    #searchForms is the id of a button in the html page. When clicked the above code gets executed.nameOfForm is a variable which holds the value the user typed in the search box.
    Next is the ajax call which is being made to fetch the forms whose title starts with the value entered in the “#formsToSearch” field and forms whose status is “true”(meaning active)
    The ajax call has the following parameters
    appPath – This is application from which you want to search forms from. in our case we are searching for all forms in the repository
    cutPoints: These are the attributes of the form that are returned in the search results
    relation:Indicates what related objects to fetch. No_RELATION means no related objects to fetch
    statement: can have multiple statements. each statement will have name,value,operator. In our case the first statement is looking for forms whose title contains the value of the variable. The second statement is searching for forms whose status equals true(meaning active)

    Once the query is executed, the success handler function can access the results which are stored in the variable.
    You can then loop through the data elements and access title,description and other attributes using the data[i].title or data[i].description syntax

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 3.5/10 (6 votes cast)
    Posted in Adobe LiveCycle ES4 | Tagged , , | Comments Off on Form Manager API

    Task Summary Page

    Workspace in LiveCycle ES4 now shows a new tab called the “Summary” tab. As the name indicates this tab can be used to summarize the current task details. By default the “Summary” tab does not have any content in it. The process developer can create the content of the “Summary” tab. In general it is used to show some extra information related to the current task- such as Task Summary or display the driving directions specific to the address mentioned in the task.
    The document listed hereTask Summary URL explains in detail the steps needed to display some task specific information in the summary tab. The pdf also has the necessary collateral to compete the short tutorial.
    you would need the following to successfully complete the steps mentioned in the document
    LiveCycle ES4 Server
    Livecyle ES4 Workbench
    and some experience with LiveCycle
    If you have any questions- Do not hesitate to ask

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 2.3/10 (3 votes cast)
    Posted in Adobe LiveCycle ES4 | Tagged , , | Comments Off on Task Summary Page

    Understanding reader extensions licensing

    We get many questions about reader extensions. That’s not surprising really because there are numerous ways to use reader extensions in an enterprise capacity as well as in a work group or consumer type of way. We also get many questions about the aspects of licensing reader extensions based on the fact that reader extended forms can be created from our Acrobat family of products as well as our LiveCycle family of products. The licensing programs for Acrobat and LiveCycle are designed to serve different uses and organizational needs. They scale from desktop use to enterprise levels

    Before we go too much further though, let me tell you what a reader extended document is.

    The reader extensions capability digitally signs a PDF form or document to enable certain features in the free Reader product on a per-file basis. These are features otherwise found in the full Acrobat product.  Extending features in a PDF document allows the content creator to offer more advanced capabilities to end users with free Reader without requiring them to purchase the full Acrobat product.  Examples of the features which are enabled by reader extensions include commenting, digital signatures, and saving forms and data offline.  We usually see customers take advantage of this technology to capture data in a form using reader extensions based on the ability for someone to fill out a form inside of the free Reader product, save it to their desktop, and then email it to the person needing this information.

    LiveCycle and Reader Extended Forms:

    Here’s an example of a reader extended form:  http://www.irs.gov/pub/irs-pdf/f1040.pdf.  This example was created using LiveCycle Enterprise Suite. LiveCycle is a server based product for automating form and document processing in enterprise organizations. The use of reader extensions in LiveCycle is targeted for large distribution use cases.  Other services available in LiveCycle can be used to generate PDF documents and forms and automate their processing in conjunction with other enterprise systems. LiveCycle’s reader extensions capabilities are licensed on a per-document (or form) or a per-recipient basis. Its usage can scale to extract information from an unlimited number of documents or an unlimited number of recipients.   A LiveCycle customer can purchase more document or recipient licenses as their business needs require.   For example, a state that wants to develop a single tax form to collect information from its 2 million citizens might purchase a per-document license for their form.  However, a government department of 6,000 planning to develop several human resources forms might be better served with per-recipient licenses.

    Acrobat and Reader Extended Forms:

    As I mentioned earlier, you can also create a reader extended form by using Acrobat.  Acrobat is a desktop product for producing and working with PDF documents on an individual basis.  The reader extension capabilities in Acrobat are intended for small scale distributions.    Acrobat provides capabilities to extract data into spreadsheets for further processing.

    The use of reader extension features in Acrobat is governed by the end user license agreement (EULA). Please see section 16.8.3 of the Acrobat  EULA  for the official description of  the proper use of Acrobat’s reader extension capabilities. Essentially it says, a licensee of Acrobat may either distribute a particular PDF form or document to an unlimited number of unique recipients provided they extract data from no more than 500 recipients OR extract data an unlimited number of times from no more than 500 recipients.  Let’s look at an example. A government department is creating a conference with a maximum capacity of 400 attendees. They develop a form for conference registration and publish it to their public website.  When the forms are received they extract the data from the first 400 forms they receive in order to fill up their conference seats. In this case, an Acrobat license is appropriate.

    In another example, a company of 350 employees creates a timesheet form that their employees complete each week.   The company can extract the data from this form an unlimited number of times.  In this case, an Acrobat license is appropriate.

    In our last example, a company posts a form to a public website hoping to gather data from as many respondents as possible, likely more than 500 respondents.  In this case, a LiveCycle license is appropriate as an Acrobat license cannot be used to gather data from more than 500 respondents.

    Licensing Examples

    Use Case

    Appropriate Software License

    Tax forms in a state with a population of 2 million LiveCycle Reader Extensions per-document
    Conference Registration for a conference of 400 participants Acrobat
    Timesheet form for a company of 350 Acrobat
    Several human resource forms for a government department of 6,000 LiveCycle Reader Extensions per-recipient

    Summary

    Adobe is committed to helping our customers understand our products and licensing strategy.  If you have questions about your use of Reader Extensions, please contact PublicSector@adobe.com for further assistance.

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 8.7/10 (28 votes cast)
    Posted in Adobe LiveCycle ES3 | 8 Comments

    LiveCycle Mobile Forms: bringing all the capabilities of XFA-based forms in HTML5

    Browser PDF viewers and LiveCycle forms

    Browsers like Google Chrome and Mozilla Firefox recently started to provide their own PDF viewers to display PDF documents. These native PDF viewers usually do not match the full capabilities provided by Adobe Reader. Specifically, they do not support XFA-based LiveCycle forms. As a result, end users are not able to fill and submit the form for further processing.

    Adobe issued an advisory to help users configure their browser settings to make Adobe Reader or Adobe Acrobat their default PDF viewer. See http://helpx.adobe.com/livecycle/kb/xfa-forms-firefox-chrome.html for configuring the PDF viewer for Mozilla Firefox and Google Chrome.

    Adobe appreciates that there are business scenarios where it’d be extremely difficult for LiveCycle customers to get their users to change the browser settings. For example, if a customer publishes LiveCycle forms on a public facing portal, it is going to be an impediment to the business if that portal asks its users to change their PDF viewer settings before opening the form. In many scenarios, the applicant may just take her business to some other competitor.

    If these scenarios resonate,  it’d be worthwhile to review the support for HTML5-based rendition of LiveCycle forms, introduced in LiveCycle ES4 release.

    Introducing Mobile Forms (powered by HTML5)

    LiveCycle ES4 provides support for rendering the LiveCycle forms into HTML5 such that the forms can be opened in browsers that provide HTML5 support, including those running on the mobile devices like iPad. The HTML5 rendition of the forms maintains the layout of the form and supports most form logic (such as JavaScript, form calc, and form validations) embedded in the XFA form template. This way, your technology investments in XFA forms are carried over easily to devices where running of the Adobe Reader plugin is not feasible.

    Here is a side-by-side comparison of LiveCycle ES4 rendition of a few LiveCycle sample forms in HTML5 and PDF — http://helpx.adobe.com/livecycle/help/experience-mobile-forms-capabilities.html.

    Upgrading to LiveCycle ES4

    LiveCycle ES4, with its support for HTML5 Forms, extends your business processes to your mobile workforce and clients, increasing productivity while providing access to any user equipped with a desktop, smartphone, or tablet.

    Interested in upgrading to LiveCycle ES4? See http://helpx.adobe.com/livecycle/help/mobile-forms/upgrade-livecycle-es4.html.

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 3.8/10 (10 votes cast)
    Posted in Adobe LiveCycle ES4, General Interest | Tagged , , , , , , | 2 Comments

    Managing LiveCycle Applications with ant

    Adobe LiveCycle ES4 introduces out of the box ant tasks which can help in managing LiveCycle Applications (like import, export, deploy etc).

    In past, Livecycle client SDK provided following public APIs for managing applications:

    public boolean deployApplication(String anApplicationName, 
        String anApplicationVersion) 
        throws ApplicationManagerClientException
    
    public boolean undeployApplication(String anApplicationName, 
        String anApplicationVersion) 
        throws ApplicationManagerClientException
    
    public String importApplication(Document aRequest) 
        throws DesigntimeServiceException
    
    public Document export(ArrayList exportReqs,
        String lcaDescription) 
        throws DesigntimeServiceException

    In addition to these APIs,  LiveCycle ES4 also provide convenient ant tasks which internally use these APIs.

    Declaring and using the ANT tasks

    To use the new ant tasks, following section needs to be added in the ant (i.e. build.xml) file:

    <!-- common section -->
    <property name="lc.sdk.home" 
        value="C:/Adobe/Adobe LiveCycle ES4/LiveCycle_ES_SDK" />
    <path id="application.client.classpath">
      <pathelement 
        location="${lc.sdk.home}/client-libs/thirdparty/axis.jar"/> 
      <pathelement 
        location="${lc.sdk.home}/client-libs/thirdparty/saaj.jar"/> 
      <pathelement 
        location="${lc.sdk.home}/client-libs/thirdparty/wsdl4j.jar"/> 
      <pathelement location=
        "${lc.sdk.home}/client-libs/thirdparty/commons-logging.jar"/>
      <pathelement 
        location="${lc.sdk.home}/client-libs/thirdparty/jaxrpc.jar"/> 
      <pathelement location=
        "${lc.sdk.home}/client-libs/thirdparty/commons-discovery.jar"/> 
      <pathelement location=
        "${lc.sdk.home}/client-libs/thirdparty/commons-collections-3.1.jar"/>
      <pathelement location=
        "${lc.sdk.home}/client-libs/thirdparty/activation.jar"/>
      <pathelement location=
        "${lc.sdk.home}/client-libs/thirdparty/mail.jar"/>
      <pathelement location=
        "${lc.sdk.home}/client-libs/common/adobe-livecycle-client.jar"/>
      <pathelement location=
        "${lc.sdk.home}/client-libs/common/adobe-usermanager-client.jar"/>
      <pathelement location=
        "${lc.sdk.home}/client-libs/common/adobe-repository-client.jar"/>
      <pathelement location=
        "${lc.sdk.home}/client-libs/common/adobe-application-remote-client.jar"/>
    </path>
    <taskdef name="deploy" classname=
      "com.adobe.livecycle.applicationmanager.ant.tasks.DeployApplicationTask">
      <classpath refid="application.client.classpath"/>
    </taskdef>
    <taskdef name="undeploy" classname=
      "com.adobe.livecycle.applicationmanager.ant.tasks.UndeployApplicationTask">
      <classpath refid="application.client.classpath"/>
    </taskdef>
    <taskdef name="deleteapp" classname=
    "com.adobe.livecycle.applicationmanager.ant.tasks.DeleteApplicationTask">
      <classpath refid="application.client.classpath"/>
    </taskdef>
    <taskdef name="exportlca" classname=
    "com.adobe.livecycle.applicationmanager.ant.tasks.ExportLCATask">
      <classpath refid="application.client.classpath"/>
    </taskdef>
    <taskdef name="importlca" classname=
    "com.adobe.livecycle.applicationmanager.ant.tasks.ImportLCATask">
      <classpath refid="application.client.classpath"/>
    </taskdef>

    After this section the defined tasks can be used as follows:

    <!-- This would import MyProcess on the server -->
    <importlca file="MyProcess.lca" 
      propertiesFile="lcserver.properties" />
    
    <!-- This would export application MyProcess from server 
    to file MyProcess.lca on the local machine -->
    <exportlca file="MyProcess.lca" appname="MyProcess" 
      appversion="1.0" propertiesFile="lcserver.properties" />
    
    <!-- This would deploy the imported application
    on the server -->
    <deploy appname="MyProcess" appversion="1.0" 
      propertiesFile="lcserver.properties" />
    
    <!-- This would undeploy the deployed application 
    on the server -->
    <undeploy appname="MyProcess" appversion="1.0" 
      propertiesFile="lcserver.properties" />
    
    <!-- This would delete the application on the server -->
    <delete appname="MyProcess" appversion="1.0" 
      propertiesFile="lcserver.properties" />

    The lcserver.properties file used in the example is of following form:

    serverUrl=http://<lc-server-ip>:<lc-server-port>
    username=administrator
    password=password
    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 6.7/10 (6 votes cast)
    Posted in Adobe LiveCycle ES4 | Comments Off on Managing LiveCycle Applications with ant

    Built-in profiler in LiveCycle ES4 for performance analysis

    New LiveCycle ES4 features like Forms Manager, HTML Workspace etc. require CQ repository as part of the installation. This embedded Adobe CQ, comes with a built in threads profiler. More information about this can be found at this CQ article. This profiler, being part of same container in which LiveCycle is running, collects thread data for LiveCycle classes and services as well.

    For Adobe LiveCycle ES4, built in profiler can be found at

    http://<server>:<port>/lc/system/console/profiler

    To use profiler, just reach above mentioned screen and click on “Start Collecting” button. This will start the profiler. To stop profiler, just click on “stop” button. Collected data will be shown on screen.

    Data will be shown in two parts

    1. Packages: Which code is executing
    2. Top 20 stack trace(s): Stack traces with highest count

    Before running the profiler, one can change few configurations to weed out unwanted threads and packages.Following screenshot shows self explaining configurations you can modify before starting profiler

    profiler

    This is available on Correspondence Management Publish instance as well.

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 7.2/10 (5 votes cast)
    Posted in Adobe LiveCycle ES4 | Comments Off on Built-in profiler in LiveCycle ES4 for performance analysis

    XFA-based PDF forms on Firefox 19

    With the release of Firefox 19, Mozilla introduced a built-in PDF viewer. However, the XFA-based PDF forms do not open in the PDF viewer, by default. To open these forms using Firefox 19, you’d need to configure Firefox to open PDFs in Adobe Reader or Adobe Acrobat.

    For more details on how to accomplish this, see the knowledge base article at http://helpx.adobe.com/livecycle/kb/xfa-forms-mozilla-firefox-19.html.

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 7.2/10 (6 votes cast)
    Posted in General Interest | Tagged , , , | Comments Off on XFA-based PDF forms on Firefox 19

    Mobile Workspace offline internals

    With LiveCycle ES4, Mobile Workspace has enabled working without network connection. Offline support has mainly been achieved by caching and storing the data locally on the device. From the offset, the application assumes to be in offline mode. This has following major advantages:

    1. Any action performed by the user is stored offline ensuring that the user gets best experience.

    2. Make sure that the user action/data is not lost due to intermediate network disconnection.

    The offline app is constantly made to sync to the server by a background thread which has a timer setting that can be controlled by the user. The application also provides an on demand sync to the server using the refresh button at the top right of the main screen. It is possible to configuring the background sync thread frequency from the settings screen. Here we can see that the user is trying to change the sync frequency from 4 hours to 15 minutes.

    settings_screen

    The possible sync frequencies are 15 minutes, 1 hours, 4 hours, once per day or Manual. These can be selected from the drop down in the ‘General’ tab of the settings screen.

    sync_time_setting

    Once the user settings are saved, the background sync thread is updated as per the new settings.

    sync_settings_complete

    Data storage and caching

    Going into the internals of the data being stored on the device, application users disk storage, browser cache backed up by disk and the database in the form of webSql to store the complete data of the application. The main data associated with a task is

    a. Task metadata in the form of JSON associated with task object. This also includes the attachments metadata.

    b. Attachment files associated with the task.

    c. Form corresponding to the task and the form data, if any stored on the server.

    The application caches all this data efficiently onto the device so that the complete functionality can be replicated when there is no network connection. The task metadata and the other data in the form of task JSON is stored in the database in proper tables per user per server for efficient update and retrieval. Now comes the question of the attachment files  associated with the task. These files are downloaded and stored on the disk within the task specific directory. Lastly the form and the data associated with the form are cached with the help of browser cache. Browser cache of UIWebView uses NSURLCache concept to backup the shared cache of the application by disk. The browser cache is set to 40 MB which is sufficient to store the resources and the XDP of the forms associated with the task.

    Caching configuration

    By default the form and the attachments associated with the task are not cached onto the device. This comes with a background that the application should not blindly cache everything and it should be configurable for the user to decide what all data needs to be offlined. the default value of ‘Fetch forms’ and ‘fetch attachments’ is OFF in the ‘General tab of the settings screen.

    fetch_attachments fetch_formsOnce the user enables the caching or either forms or attachments then any subsequent refresh will cache the forms or attachments for the new tasks being synced form the server.

    VN:F [1.9.22_1171]
    Was this helpful? Please rate the content.
    Rating: 7.0/10 (3 votes cast)
    Posted in Adobe LiveCycle ES4 | Tagged , , , , , , , , | Comments Off on Mobile Workspace offline internals