When using PDF rendering, you need to set values for several properties in emxSystem.properties to define access to the AdLib server.
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.
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>
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
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.
To see the correct style sheets and images:
-
Create a common directory in the FTP system under AdLib's input folder.
-
Copy the common/images and common/styles as images and styles.
-
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.
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:
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>
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.