About the sample

The purpose of the ProcessLegacy sample package is to provide a starting point to those looking to continue to process legacy non-XML data through AEM Forms, as they move from Adobe Central Output Server or another solution to AEM Forms.

The sample package includes the cmb-legacy.ecma script that determines:

  • if the data needs to be run through a TDF file.
  • the print output format (PS, PCL, and so on) to use based on any -asp printer requested on the JOB card.
  • How to send the job to a printer, based on the -z option and its format. For example, direct to an IP address or a shared queue)

Prerequisites to working with the sample

  • Ensure that you have the appropriate packages for AEM Forms (adobe-aem-forms-pkg-<version>.zip), and Central Migration Bridge (adobe-aemfd-cmb-pkg<version>.zip) installed.
  • You are familiar with Central Output Server and AEM technologies.

Set up the sample package

Configure a logger (optional)

The sample package uses a custom logger to keep its log file separate from the system. You can change the logger at line 14 of the script, however if you want, you can set up a separate logger by performing the following steps:

  1. Go to AEM Configuration Manager at http://[hostname]:[port]/system/console/configMgr.
  2. Under the Sling menu, select Log Support.
  3. On the Log Support page, click Add new Logger
  4. In the two fields, specify the log file name (for example, logs\cmb.log) in th first field and the logger (for example, cmb-logger) in the second field.
  5. Click Save. A sample log file cmb.log is created in CRX's /logs folder.

Import the sample package

Click to download the following sample package and import in into AEM.


After the package is imported, you will see the in CRXDE Lite:

  • The cmb-legacy.ecma script in /etc/workflow/scripts/cmb.
  • a sample Field-Nominated data file, a sample XML file, a sample TDF file, and a sample XDP in /content/fd/cmb/samples/processlegacy.


All file names are lower case and there are reminder folders present to ensure that you remember to name everything in lower case. CRX is case-sensitive and when we extract the JOB name from the incoming data file, we convert it to lower case to eliminate inconsistencies and errors due to casing.


Generally, it is recommended to keep TDF files on a local disk instead of within AEM for high-performance. The sample chooses to move the TDF files within AEM to simplify maintenance (so that everything is in one place) and to eliminate the need to maintain multiple copies of your files on cluster nodes. However, it may not suit you if you are looking for extra speed.

Set up Central installation directory


Skip this section if your Adobe Central Output Server is installed at the default location.

The Migration Bridge also requires that your Adobe Central Output Server is installed on the same machine as your AEM is running on. However, it doesn't require Central to run (only installed).

Perform the following steps to change the location of Central Pro installation to the default location:

  1. Log in to Felix Console at http://[hostname]:[port]/system/console/configMgr.
  2. Go to OSGi> Configuration.
  3. Search for AEMFD OutputCentral Service.
  4. Click Edit (the pencil icon).
  5. Type the path to your Central Pro installation directory. For example, C:\Adobe\Central\ or /usr/adobe/central/.
  6. Click Save.

Run the sample

To run the sample:

  1. In a browser window, open the sample at http://[hostname]:[port]/crx/de/index.jsp#/content/fd/cmb/samples/processlegacy.
  2. Locate and open the sample.dat file, and copy its content to the clipboard.
  3. Right-click watchedfolder and select to create a new file with any name.
  4. In the new file, paste the content you copied from the sample.dat file.
  5. Change the IP address on the ^JOB line -z option or enter a UNC printer path. For example, -z123.456.789.012 or -z\\server\printer.
  6. Click Save All on the CRXDE Lite screen. Your file will be processed and you should see the output in less than a second.


You can do a number of other things using the cmb-legacy.ecma script. Feel free to examine it in detail and adapt it to your needs as you see fit.


法律声明   |   在线隐私策略