April 2009 Archives

LiveCycle PDF Generator Best Practices

| No Comments

Because of the unique way LiveCycle PDF Generator ES invokes native applications to do what it does (convert native documents to PDF), there are a number of configuration steps that need to be strictly followed as a matter of best practice.

WINDOWS
-------------
1) Determine the userID whose identity the J2EE appserver will "run as"
2) Login as that user and perform all installs (MS Office, Acrobat, LiveCycle). If Office has already been installed by your IT department as the 'Local Administrator' user, and if you do not have Local Administrator privileges, make sure that the user that the J2EE appserver will "run as" is a member of the local group 'Administrators'.
3) Make sure the Print Spooler service is turned on and set to run automatically. The Acrobat install will not be complete otherwise.
4) Make sure that multiple versions of Acrobat are not installed on the same machine. If there are, uninstall all of them and re-start the server.
5) Ensure that the server disks are performant (at least 7,200 RPM, with at least 8 MB cache) because there is lots of file I/O involved
6) Set the 'TEMP' and 'TMP' user environment variables to a dedicated folder such as C:\USER_TEMP (PDFG uses this) so that you control where file I/O occurs. This also helps with maintenance (cleanup of orphaned files)
6) Set the 'TEMP' and 'TMP' system environment variables to a dedicated folder such as D:\SYSTEM_TEMP (Acrobat conversions use this folder) for the same reason as the previous step.
7) Write a batch script to cleanup those folders on server re-start

MICROSOFT OFFICE
------------------------
1) Install Microsoft Office, OpenOffice and other native applications before you install either Acrobat or LiveCycle.
2) Activate each application. Please note that in Office 2007, Word , Excel and PowerPoint can be activated together but Visio needs to be activated separately.
3) Start each Office application manually and address all dialogs (registration, user experience improvement etc).
4) Open Word. Disable "Auto Recovery".
5) Set "Default file location" to a folder you can monitor and periodically cleanup such as D:\OFFICE_TEMP
6) Do the same for Microsoft PowerPoint and Excel
7) Perform some Advanced customization. Microsoft Word offers a LARGE number of customizations which might help you get the best output.

ACROBAT
------------
1) Install Acrobat before you install LiveCycle.
2) Start Acrobat. Check for updates and apply them.
3) Use it to convert a few documents (Word, Excel etc). Dismiss all dialogs that come up (registration, user experience improvement etc). This is absolutely CRITICAL. This is a major cause of problems. The user experience improvement dialog is especially insidious because it comes up only after a certain number of invocations. If you have a PDFG environment where things stop working after 2-5 invocations, chances are that this is the cause.
4) Perform a conversion manually using Word, Excel etc.

LIVECYCLE
--------------
1) Install, configure and deploy LiveCycle
2) Verify that Acrobat_PATH is set.
3) If it applies to your scenario, ensure the following environment variables are also set - Notepad_PATH, Photoshop_PATH, WordPerfect_PATH, PageMaker_PATH, FrameMaker_PATH, OpenOffice_PATH
4) If you are running a full 64-bit environment, make sure that you also install a 32-bit JDK. Also ensure that the environment variable JAVA_HOME_32 is set to this JDK. Details here.
5) Perform a conversion using the LiveCycle Admin Console (navigate to Services->LiveCycle PDF Generator ES->Create PDF).

If the conversion fails, check the J2EE appserver's log for details - JBoss (server.log), WebLogic (managed server log), WebSphere (SystemOut.log). In the case of WebSphere, the FFDC (First Fault Data Capture) logs might also provide detailed information. If these do not contain any useful information, check the Windows Event Log (Application).

To perform some investigations yourself, see here to get an idea of all of the file I/O that happens during a PDFG operation.


Even though Tomcat (the servlet and JSP container for JBoss) is a very capable HTTP server, fronting LiveCycle's JBoss instance with the Apache Web Server provides additional benefits. One of these is the performance boost provided by the caching of HTML pages, images, Javascript files, Flash SWF files etc. on the Apache Web Server so that the JBoss server does not have to waste its CPU cycles serving up these.

If you don't have the Apache Web Server installed yet, you can download it from here. These instructions assume that you are using version 2.2

First, Apache Web Server has to be configured to front JBoss. Instructions here.

Enabling caching is fairly straightforward. You don't need to do anything on the Tomcat/JBoss end. Edit the Apache Web Server's configuration file (httpd.conf) using a text editor.

1) Enable mod_mem_cache by removing the comment against the following entry:
LoadModule mem_cache_module modules/mod_mem_cache.so

2) Configure the cache by adding the following to the end of the httpd.conf file:
# http://httpd.apache.org/docs/2.2/en/mod/mod_mem_cache.html
<IfModule mod_mem_cache.so>
  CacheEnable mem /
  MCacheSize 40096
  MCacheMaxObjectCount 1000
  MCacheMinObjectSize 1
  MCacheMaxObjectSize 20048
</IfModule>

3) Save the file.

4) Re-start Apache Web Server

5) Access LiveCycle URLs such as /adminui multiple times.

5) Verify by checking the Apache Web Server access log. Instead of HTTP status codes such as 200, there should be more 304 codes logged. See here for more on HTTP Status Codes.

Fronting LiveCycle/JBoss With Apache Web Server

| No Comments

There are use cases where LiveCycle administrators want to expose only a subset of its functionality to users and programs outside of the machine LiveCycle is hosted on. Firewalls can be used to block certain ports. Apache Web Server can be used as a reverse proxy so that only certain URLs are "visible" to external callers.

1) Download and install Apache Web Server 2.2 from here.

JBOSS CONFIGURATION
------------------------------

2) Assuming that the DNS name of the machine hosting the Apache Web Server is apache.company.com, edit the Tomcat configuration file ($JBOSS_HOME/jboss-4.2.0_mssql2005/server/all/deploy/jboss-web.deployer/server.xml) of the JBoss instance hosting LiveCycle so that the HTTP Connector configuration looks similar to this:
<Connector port="8080" address="${jboss.bind.address}"
proxyName="apache.company.com" proxyPort="80"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />

APACHE WEB SERVER CONFIGURATION
-------------------------------------------------

3) Edit the configuration file of Apache Web Server (httpd.conf) and enable proxying by uncommenting the following lines:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

4) Also add the folowing lines for additional configuration
# Prevent Apache from acting like a forward proxy
ProxyRequests Off

# Control Client Access
<Proxy http://jboss.company.com:8080/>
  Order Deny,Allow
  Allow from all
</Proxy>

# Set TCP/IP network buffer size for better throughput (bytes)
ProxyReceiveBufferSize 4096

5) Assuming that the DNS name of the machine hosting the JBoss AS is jboss.company.com, add Reverse Proxy configuration
The following is a simplistic configuration where every request (/) is allowed:
ProxyPass / http://jboss.company.com:8080/
ProxyPassReverse / http://jboss.company.com:8080/

Here's a more restrictive configuration, allowing access only to the web UI of Rights Management and nothing else:
ProxyPass /edc http://jboss.company.com:8080/edc
ProxyPassReverse /edc http://jboss.company.com:8080/edc
ProxyPass /um http://jboss.company.com:8080/um
ProxyPassReverse /um http://jboss.company.com:8080/um
ProxyPass /rightsmgmt_help_en http://jboss.company.com:8080/rightsmgmt_help_en
ProxyPassReverse /rightsmgmt_help_en http://jboss.company.com:8080/rightsmgmt_help_en

More details are available here.

6) Re-start the Apache Web Server.

7) Re-start the JBoss instance that hosts LiveCycle ES

8) Verify by pointing your browser at the Apache machine:
http://apache.company.com/edc/Main.do

About this Archive

This page is an archive of entries from April 2009 listed from newest to oldest.

March 2009 is the previous archive.

May 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.