Configuring PDF Rendering

Configurable form pages can be rendered in PDF format using AdLib eXpress on a Windows system. AdLib eXpress is not available for Unix. If the ENOVIA platform application server runs on a Unix operating system, the AdLib interface can be configured to point to the Windows-based AdLib installation.

ENOVIA products support AdLib 4.

This task shows you how to:

Install and Configure AdLib

You need to install and configure AdLib if you want your system to support PDF rendering.

  1. Install AdLib eXpress on Windows per the instructions in the AdLib eXpress installation guide.

  2. Start AdLib eXpress.

  3. Click Stop Monitoring.

  4. Click Tools > Select AdLib eXpress Server Options.

  5. In the Folders tab, select the Processing New and Updated Files Only option.

  6. In the Processing tab, ensure the Check Input Folder Every is selected and set to 4 sec.

  7. Select the Enable DPI XML Job Ticket Processing option. This is the document processing information option.

  8. In the Output tab, ensure the Preserve File Extension option is cleared.

  9. Click OK.

  10. Click Start Monitoring.

Enable PDF Rendering

You need to perform several steps to enable PDF rendering for your system.

  1. To enable PDF rendering on any configurable form page, you must set the emxFramework.RenderPDF property in emxSystem.properties to true. By default, it is set to false.

    emxFramework.RenderPDF = true

  2. To show the Render PDF icon on all configurable form pages, set the emxFramework.RenderPDF.ShowIconByDefault property in emxSystem.properties to true. By default, it is set to false.

    emxFramework.RenderPDF.ShowIconByDefault = true

  3. To override the specified settings, pass the URL parameter renderPDF to emxForm.jsp:


    • renderPDF=true: the Render PDF icon is shown in the toolbar
    • renderPDF=false: the icon is not shown in the toolbar, irrespective of whether the property emxFramework.RenderPDF.ShowIconByDefault is set to true or false.

    If emxForm.jsp is passed the URL parameter renderPDF, but the global setting emxFramework.RenderPDF is set to false, the URL parameter is ignored.

Configure System Properties for AdLib

When using PDF rendering, you need to set values for several properties in emxSystem.properties to define access to the AdLib server.

  1. Set up an FTP server on the same machine as the AdLib server.

    The FTP server must be installed on the same machine as the AdLib server in order to enable the file transfers to AdLib.

  2. Configure the following settings specific to the AdLib interface in emxSystem.properties:

    emxFramework.PDF.FTPInputFolderPath = <input folder for Adlib>
    emxFramework.PDF.FTPOutputFolderPath = <output folder for Adlib>
    emxFramework.RenderPDF.HostName = <AdLib server name>
    emxFramework.RenderPDF.UserName = <FTP login name>
    emxFramework.RenderPDF.Password = <FTP password>

  3. Specify how often, in seconds, the application should check to see if the rendered file is ready. By default, this value is set to 1 second. It can also be changed to less than 1 second, for example, 0.5 second. When the FTP server sends the files to AdLib's input folder, the application sleeps for the amount of time specified in the following setting:

    emxFramework.RenderPDF.SleepInterval = 1

  4. Specify the retry timeout limit which is set to 60 seconds by default. If AdLib does not render the PDF output within the retry timeout limit, the application deletes the files from AdLib's input/output folders and closes the transaction. The following property is used to define the retry timeout limit:

    emxFramework.RenderPDF.RetryTimeOutLimit = 60 <seconds>

    After the HTML file is copied to the input folder, the application tries to read the rendered PDF file from the output folder once every n seconds (based on the SleepInterval property), until it reaches the timeout limit (based on the RetryTimeOutLimit property). If the rendered file is available, it streams the file back to the user in PDF format, cleans up the files, and completes the transaction. If the rendered file is not available even after the timeout limit, it cleans up the files and completes the transaction.

  5. To see the correct style sheets and images:

    1. Create a common directory in the FTP system under AdLib's input folder.
    2. Copy the common/images and common/styles as images and styles.
    3. Duplicate the ENOVIA common/images and common/styles folders under the AdLib input folder:

          C:\Adlib Express\Input\Common\Images

      Some systems may be configured differently. If images do not show up when using the above directory path to the images and styles folder, use C:\Adlib?Express\Common\Images as the input folder.

  6. To add a watermark to PDF-rendered pages using the emxFramework.RenderPDF.WaterMark property in emxSystem.properties. By default this property has no assigned text and hence the watermarking is disabled. The text format can be any one of the following:

    Watermark - Text Format Example Values

    Static text

    Dassault Systemes Enovia Corp. Report

    Part Properties

    String resource key

    emxFramework.PDF.WaterMarkText

    emxEngineeringCentral.Part.Properties

    Text with macros supported by ENOVIA Business Process Services

    $<name>

    Name: $<name> - Revision: $<revision>

    State: $<current>

    Title: $<attribute[attribute_Title]>

    For example, to include the item name and revision as a watermark for the PDF output, set the following in emxSystem.properties:

    emxFramework.RenderPDF.WaterMark = Name: $<name> - Revision: 
    $<revision>

  7. Define whether to clean up the files in AdLib's input and output folders. For example, an application server failure might leave some files in the folders. By default all files will be cleared from the input and output folders at server restart. Set this property to true to enable cleanup; or false to disalbe cleanup on server restart:

    emxFramework.RenderPDF.CleanupOnRestart = true/false

When a user clicks the Render PDF icon, the content of the form is written as an HTML file to the server and the AdLib eXpress engine transforms it into PDF. A modal dialog informs the user that the PDF rendering process has been initiated. The resulting PDF file is read from the server and streamed to the user when the rendering process is complete.