Configuring the Settings for Generating PDF

You can configure the preferences for generating PDF reports.

Note: Use Adlib version 5.4.3 and above to render PDF from template.

See Properties for Generating PDF.

This task shows you how to:

Generating PDF Using Adlib

  1. Create or open the text file to contain customized properties. For more information, see Editing Properties Using MQL.
  2. To enable or disable PDF generation for reports, follow these steps:
    1. Add or edit this line in the file used to import properties into a page object:

      enoTemplate.RenderPDF = True

    2. Specify the value for this property depending on your business requirements:

      1. True = Report is generated in the pdf format.
      2. False = Report is not generated in the pdf format.

  3. To notify the product data owner of successful PDF rendition, add or edit this line:

    emxCPN.PDF.SuccessMessage = Rendering Successful

  4. To notify the product data owner if the PDF rendition fails, add or edit this line:

    emxCPN.PDF.ErrorMessage = Rendention Process Failed

  5. When finished updating the text file with all properties you want to modify, including the ones shown here, use the text file to modify the enoTemplate.RenderPDF.properties page object. For more information, see Editing Properties Using MQL.

Generating PDF Using Aspose

For generating PDF using Aspose, you must check the system font settings. If system fonts are installed, start the configuration settings from step 2.

  1. System fonts are installed by default in windows operating system. To check the availability of system fonts on Linux operating system, navigate to the below location:

    /usr/share/fonts

    Important: The Arial Unicode MS font library must be installed on the client computer to generate reports in Simplified Chinese and Japanese languages.

    If system fonts are not available, do the following:

    1. Install libmspack rpm package.

      1. Download the latest libmspack-0.5-0.1.alpha.el6.x86_64.rpm
        wget  http://dl.fedoraproject.org/pub/epel/6/x86_64/
        Packages/l/libmspack-0.5-0.1.alpha.el6.x86_64.rpm
      2. Install the rp
        rpm –ivh  libmspack-0.5-0.1.alpha.el6.x86_64.rpm

    2. Install cabextract rpm package.

      1. Download the latest cabextract
        wget  http://dl.fedoraproject.org/pub/epel/6/x86_64
        /Packages/c/cabextract-1.5-1.el6.x86_64.rpm
      2. Install the rpm package
        rpm –ivh  cabextract-1.5-1.el6.x86_64.rpm

    3. Install Microsoft ttf rpm package

      1. Download the Microsoft ttf rpm
        wget  http://nchc.dl.sourceforge.net/project/mscorefonts2
        /rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
        
      2. Install the rpm package
        rpm –ivh  msttcore-fonts-installer-2.6-1.noarch.rpm

  2. To enable or disable PDF generation for reports, follow these steps:
    1. Add or edit this line in the file used to import properties into a page object:

      enoTemplate.RenderPDF = True

    2. Specify the value for this property depending on your business requirements:

      1. True = Report is generated in the pdf format.
      2. False = Report is not generated in the pdf format.

  3. To generate the PDF, add or edit this line:

    enoTemplate.RenderPDF.BuiltIn = True
    Note: The default value is true. To generate PDF using Adlib, set the value as false.

  4. To configure the mail settings, do the following:
    • For Windows operating system:

      In the enovia.ini file located at <Installation Folder>/server/win_b64/code/bin set the following:

      MX_SMTP_HOST = IP address/ Name of the SMTP server
    • For Linux operating system:

      1. For the mxEnv.sh, mxEnvNotVerbose.sh, mxEnvVerboseCAS.sh, and mxEnvCAS.sh files at the below location <Installation Folder>/server/scripts, set the following:

        MX_SMTP_HOST = IP address/ Name of the SMTP server

      2. Export MX_SMTP_HOST.

        For example

        MX_SMTP_HOST=SMTP.MATRIXONE.NET
        export  MX_SMTP_HOST

        Note: If the key is not available in the above files, add the key and restart the server.